Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / has any one on the forms implementing sterring behaivor

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Mar 2012 14:24 Edited at: 1st Mar 2012 14:28
I am trying to add this to the engine, and i already have these a couple of algorthms for the brains of how things should move.

The sterring algorthm is the one that is contained within boundries.

Any help would be great.

This is an example the path list of vectors, and the containing path is two list of paths of vectors that help the object not go out of the boundries of the path.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Mar 2012 14:35 Edited at: 1st Mar 2012 14:35
this is the Data I extracted out of tmx of involves 3 list of vectors.

vector<int> edge1;
vector<int> path;
vector<int> edge2;

edge1[0] is start of path xcord
edge1[1] is start of path ycord

on so on and so forth.

path, edge2 to follow the same sequence.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Mar 2012 15:28 Edited at: 1st Mar 2012 15:29
all paths, and edges are of equal size therefore the list of vector points will not be ran off of, or if there is a method where the paths and edges dont have to be equal in vector point sizes.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Mar 2012 17:40
3d, I'm not 100% sure what you are asking for as your example is a little hard to follow. Could you post a simple example of what you are looking for?

As far as I can tell you have a list of vectors and I assume you want to make an AI vehicle follow the path, is that right?

Also you need to use the "Edit Post" button rather than add multiple posts. The moderators will get angry otherwise... *whispers* don't make them angry... please!

3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Mar 2012 20:06 Edited at: 1st Mar 2012 20:24
Ok sorry about the multiple post, here is the picture of the walls and the path that the vehicles have to follow while avoid each other so far i have
seek

I currently programming the path for one vehicle to go from point a to point b in a vector list.
I think it might be a combination of seek, path follow and avoid methods but, I not sure how to program avoid by avoiding the current position relative to the walls, and the current position relative to obstacles in the path of the player.



The left most part of the image is the starting point of the vector list. While the right side of the list is the end point of the list.

this is sudo code of the object in question


path follow of one object on the given path.


I need an example of how to avoid the walls(note: walls are not drawn)., and the obsticles, thus getting the vehicle to the end of the path.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.

Attachments

Login to view attachments
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 1st Mar 2012 21:20
Quote: "I need an example of how to avoid the walls(note: walls are not drawn).,"

IMO, you need:
1. A good book for Steering Behaviors (I recommend this : http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782)
2. Good knowledge of C++
3. Good skills in mathematics and especially in Vector & Matrices
Steering behaviors is not an easy task...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Mar 2012 09:31
I found this great article on steering behaviours. Maybe it will help?
http://www.red3d.com/cwr/steer/gdc99/

Login to post a reply

Server time is: 2024-11-23 05:02:43
Your offset time is: 2024-11-23 05:02:43