Double Dragon style player tracking
I''m creating a 2D sidescrolling double dragon-style game and I have some questions:
How does a game like Double Dragon have the enemies track the player. Do they find the angle between the player and enemy and set that enemy to the new angle? Or would they do something more simplistic and just do a bunch of if-statements and move the enemy closer to the player?
Another problem I have is determining if the enemy is in front or behind the player so they can attack. Because an enemy can''t do a forward punch from "above" or "below" the player....How would I handle this?
Any suggestions? Thanks.
I would just have the enemy gradually match the player''s y coordinate while simultaneously matching the x coordinate +/- some small offset (+ or - depending on if the enemy''s x coordinate started off greater than or less than the player''s)
Yes, the method used by those games is exactly what the anonymous poster explained. Its very simple.
Hey randomDecay, I love that genre and Ive been planning to develope a game like that, could I help you in any way? I can offer you the following.
1) I program in C/C++
2) I can do sprites for you
Well, if you need help just ask.
Hey randomDecay, I love that genre and Ive been planning to develope a game like that, could I help you in any way? I can offer you the following.
1) I program in C/C++
2) I can do sprites for you
Well, if you need help just ask.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement