Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / HeatSeeker 2: Multiple Boogaloo

Derek Darkly
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 16th Jul 2017 01:20 Edited at: 16th Jul 2017 01:25
This is my poor man's code put to use in a 200-entity scenario.

Imagine that the boxes are airplanes. Each plane has a random target assigned for it to follow.
I did not use airplane physics here, but the point is the objects will follow their target unless code is implemented to change targets, for example when a box is destroyed. If you add a little intersect object magic and some bullet effects, you have the beginnings of a dogfight. Or, if you want a ground vehicle, just take away the pitch rotation.

The coding is inefficient and sloppy, but the general concept works.

Send your parents to noisy sprite demo hell... enter the D-Zone


Login to view attachments

Login to post a reply

Server time is: 2024-02-23 18:54:29
Your offset time is: 2024-02-23 18:54:29