Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

randomDecay

Double Dragon style player tracking

This topic is 5759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!