Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Roaming AI for Side Scroller (VB)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 siberdemon   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 June 2000 - 04:50 AM

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

Sponsor:

#2 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 10 June 2000 - 01:44 AM

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


#3 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 10 June 2000 - 04:10 PM

Oh, keep cycling through the list either forwards or backwards.

ZoomBoy

#4 Kylotan   Moderators   -  Reputation: 3346

Like
Likes
Like

Posted 10 June 2000 - 06:27 PM

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:

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;
}





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS