The Daily Click ::. Forums ::. Klik Coding Help ::. Turret AI / Tower Defense

Post Reply  Post Oekaki 

Posted By Message


Cornwall UK


VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
28th July, 2012 at 28/07/2012 15:32:50 -

This is a little example I made in response to a PM, but I thought others might be interested too:!535

It's basically just a simple "shoot-the-nearest-enemy" kind of engine (as used in "Tower Defense" clones etc).
Each turret selects the nearest enemy, rotates smoothly towards it (they lead moving targets), and shoots if within range and pointing in the right direction.
Bullet speed, rotation speed, firing range, firing rate, etc are adjustable via alterable values.


Post Reply



Worth A Click