Firing Arcs, Sprite-Based Detection or Values?

For questions about using Classic.

Post » Wed Jan 05, 2011 12:21 am

I need to know what the best method for this would be:

My game has ships and their weapons use firing arcs. So if an enemy is in one of these arcs the weapon will auto-target, AND I want a lot of ships, 20+

So, should I use a sprite to detect this (which would mean that the firing arcs are not customizable which I would rather avoid) OR values which could be customized, but maybe slower?
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Wed Jan 05, 2011 12:31 am

Top down, side view?
The ball behavior would be the simplest for side view.
Then the path behavior for top down.
"distance(.x,.y, enemy.x,enemy.y)/2"
Add node at clamp(normalrandom(radius),max +,max-) distance from the midpoint, x, or y depending on how the ship is facing, then add node at enemy x,y.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests