Roaming AI for Side Scroller (VB),
Members - Reputation: 162
Posted 10 June 2000 - 01:44 AM
int XPosition, YPosition;
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
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
Moderators - Reputation: 5639
Posted 10 June 2000 - 06:27 PM
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)
if (target is to the west)
if (target is to the north)
if (target is to the south)