Roaming AI for Side Scroller (VB)
Need help creating a roaming theory that I can use for a 2d side-scrolling platform game. What I mean by roaming is travel infinitavely between to points until killed (used for the monsters). Any help or ideas?
Thanx.
Siberdemon
Unless you are going to do a full pathing method(see A-Star and the rest) you could build a path on a list.
struct movenode
{
int XPosition, YPosition;
int DirectionMoved;
int DirectionFacing;
};
Place your guy on the screen and add the movenode to a list.
Click on a record button.
hit the up and down arrow keys to move your creature and record the movenode and store it on a list.
Leave a little arrow to show where you''ve travelled and make sure you loop it correctly.
Click on a save button and record the list of movenodes to the hard-drive. Then you can load in the list and start the creature anywhere on the list.
You might also want to record the key strokes; it really depends on your movement routines
ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site
struct movenode
{
int XPosition, YPosition;
int DirectionMoved;
int DirectionFacing;
};
Place your guy on the screen and add the movenode to a list.
Click on a record button.
hit the up and down arrow keys to move your creature and record the movenode and store it on a list.
Leave a little arrow to show where you''ve travelled and make sure you loop it correctly.
Click on a save button and record the list of movenodes to the hard-drive. Then you can load in the list and start the creature anywhere on the list.
You might also want to record the key strokes; it really depends on your movement routines
ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site
siberdemon, just to avoid confusion in the future by attempting to establish some sort of common terminology, moving between 2 or more set points is usually considered ''patrolling''. Usually a creature would patrol between several points to guard an area. Whereas ''roaming'' would imply a much more random kind of motion.
You could also combine a simple ''brute force'' pathfinding method with few waypoints, providing that you set your waypoints up so that you can always trace a straight line from one to the next. The ''brute force'' method would be something simple like:
You could also combine a simple ''brute force'' pathfinding method with few waypoints, providing that you set your waypoints up so that you can always trace a straight line from one to the next. The ''brute force'' method would be something simple like:
if (target is to the east) go east;else{ if (target is to the west) go west;}if (target is to the north) go north;else{ if (target is to the south) go south;}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement