Jump to content
  • Advertisement


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


Getting all my RPG sprites moving

This topic is 5750 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

Okay. I am designing an isometric RPG engine, and I need help getting all the sprites to move. How would I go about designing "paths" for individual sprites, and then drawing that path?

Share this post

Link to post
Share on other sites
Your question is pretty vague.

What do you mean "design paths" for your sprites, and then draw them? Do you want your sprites to shoot out little paths that are drawn to the screen? I don''t think you do, so word your questions better

Anyway, are you talking about AI movement/pathfinding for your units? If so, you again have to be more specific. What do you want your sprite units to do? Walk around casually, like NPC''s usually do? Navigate around maps to try and find things?

In the meantime, if you''re thinking of AI, move your questions to the AI forum.

swift URL | browse my bookmarks [server may not always be on]

Sensimed | Info/download

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Here''s a way to program an NPC with a repeating path that he walks over and over:

#define PATH_WAIT 0
#define PATH_NORTH 1
#define PATH_SOUTH 2
#define PATH_EAST 3
#define PATH_WEST 4
#define PATH_DONE 5
//struct NPC

int path[32]; // up to 32 steps in his path


NPC npc;

npc.path[0] = PATH_NORTH;
npc.path[1] = PATH_NORTH;
npc.path[2] = PATH_WAIT;
npc.path[3] = PATH_EAST;
npc.path[4] = PATH_EAST;
npc.path[5] = PATH_SOUTH;
npc.path[6] = PATH_SOUTH;
npc.path[7] = PATH_WEST;
npc.path[8] = PATH_WEST;
npc.path[9] = PATH_DONE;

Share this post

Link to post
Share on other sites
I am going to take a stab in the dark here but I think he wants to know how to do pathfinding per unit. Then draw them, make them move till they get to the end point of the path.


find path from a -> b for all units
draw the units to follow the path till b is reached
if b is reached do something...
end loop

But thats just a guess

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!