little ai demo (steering behaviours)
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
little ai demo (steering behaviours)
Hello there, ive been reading the forum for a while now but this is my first actual post.
This is first reasonable-ish version of a little demo i have been working on, it shows off some of the
steering behaviours as given in the book "Programming Game AI by Example" by Mat Buckland.
i guess there isnt a whole lot to see, but the Flock behaviour looks nice when moving.
I know there are better things out there like Opensteer (and Ogresteer),
but i thought i would have a go anyway as a learning exercise as i try to get to grips with Ogre
http://homepages.nildram.co.uk/~ant2k3/ ... mo_exe.zip
thanks for looking!
[edit] changed topic name to be a little less vague
This is first reasonable-ish version of a little demo i have been working on, it shows off some of the
steering behaviours as given in the book "Programming Game AI by Example" by Mat Buckland.
i guess there isnt a whole lot to see, but the Flock behaviour looks nice when moving.
I know there are better things out there like Opensteer (and Ogresteer),
but i thought i would have a go anyway as a learning exercise as i try to get to grips with Ogre
http://homepages.nildram.co.uk/~ant2k3/ ... mo_exe.zip
thanks for looking!
[edit] changed topic name to be a little less vague
Last edited by antarctica2007 on Sat Feb 17, 2007 5:35 am, edited 1 time in total.
- CaseyB
- OGRE Contributor
- Posts: 1335
- Joined: Sun Nov 20, 2005 2:42 pm
- Location: Columbus, Ohio
- x 3
- Contact:
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
-
- Kobold
- Posts: 35
- Joined: Sat Sep 23, 2006 12:18 pm
Re: little ai demo
Nice work, this is great!
Where can I see these AI tutorials?
(-Edited-)
http://www.ai-junkie.com/books/toc_pgaibe.html
Where can I see these AI tutorials?
(-Edited-)
http://www.ai-junkie.com/books/toc_pgaibe.html
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
thanks everyone for your kind words
yes im going to keep working on it, the next thing i need to implement is indeed the dynamic obstacle avoidance and wall/terrain avoidance behaviours which i need to convert from the books gdi implementation to Ogre- having had a look at them, it might not be too difficult (i hope)
at present there is some very basic collision detection - its just turned off, ive built this demo out of Walabers excellent OgreNewt demos so hopefully the next step for collision stuff is to use "proper" physics, but i think this would be quite a big task so its at "in the future" priority
yes im going to keep working on it, the next thing i need to implement is indeed the dynamic obstacle avoidance and wall/terrain avoidance behaviours which i need to convert from the books gdi implementation to Ogre- having had a look at them, it might not be too difficult (i hope)
at present there is some very basic collision detection - its just turned off, ive built this demo out of Walabers excellent OgreNewt demos so hopefully the next step for collision stuff is to use "proper" physics, but i think this would be quite a big task so its at "in the future" priority
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
Cool
Are you planning on releasing the source for this? To be honest I have long been looking at alternatives to OpenSteer, because even though its a good library and does the job, it is not very active in development and the code is messy, and ... well its got lots of strange template mixin type classes that I imagine are quite unnecessary.
One alternative I have been keeping my eye on is OpenSkyNet (a Sourceforge project) but that does not yet have Steering support. And finally Jacmoe has in the past expressed interest in taking OgreSteer and extending/improving it but unfortunately nothing has come of that yet, in fact I havent seem him around these forums for ages.
Are you planning on releasing the source for this? To be honest I have long been looking at alternatives to OpenSteer, because even though its a good library and does the job, it is not very active in development and the code is messy, and ... well its got lots of strange template mixin type classes that I imagine are quite unnecessary.
One alternative I have been keeping my eye on is OpenSkyNet (a Sourceforge project) but that does not yet have Steering support. And finally Jacmoe has in the past expressed interest in taking OgreSteer and extending/improving it but unfortunately nothing has come of that yet, in fact I havent seem him around these forums for ages.
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
yes i will be releasing the source as soon as its a bit more robust and and had a design overhaul as its a bit of a mess just now,
eventually i would like try and make it into some form of useful library to use in other projects, but first i need to sort out some stuff with world/local transformations, its not working right just now which affects several of the behaviours
eventually i would like try and make it into some form of useful library to use in other projects, but first i need to sort out some stuff with world/local transformations, its not working right just now which affects several of the behaviours
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
The rumors of my death have been greatly exaggerated.SpannerMan wrote:One alternative I have been keeping my eye on is OpenSkyNet (a Sourceforge project) but that does not yet have Steering support. And finally Jacmoe has in the past expressed interest in taking OgreSteer and extending/improving it but unfortunately nothing has come of that yet, in fact I havent seem him around these forums for ages.
Moved from crappy flat in the city to a gourgeous house in the contry side! Plugged in my workstation yesterday, and have a lot to catch up on.. I am still keen on making OgreSteer happen.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- Kentamanos
- Minaton
- Posts: 980
- Joined: Sat Aug 07, 2004 12:08 am
- Location: Dallas, TX
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
-
- Halfling
- Posts: 43
- Joined: Wed Apr 05, 2006 8:00 pm
- x 2
Probably not of interest as its .net only but I just ported OpenSteer to C# and Mogre - I'll try and post it up somewhere soon. All that mix-in stuff was a bit weird - made me feel a bit dizzy.jacmoe wrote:I am still keen on making OgreSteer happen.
This looks fun. that Buckland book is ace! Nice work
HandCircus Game Studio - http://www.handcircus.com - Creators of Rolando and Rolando 2
-
- Goblin
- Posts: 242
- Joined: Sat Mar 20, 2004 7:53 am
- Location: Orlando, FL
- x 1
- Contact:
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
- cybereality
- Hobgoblin
- Posts: 563
- Joined: Wed Jul 12, 2006 5:40 pm
- x 12
Nice demo man. I was working on a flock simulation too (not in ogre though), its pretty cool stuff. I was getting some pretty interesting animation patterns with a 3 creature food chain, rather than just standard predator and prey. I had three different classes of animals, carnivore, herbivore and omnivore. So there was species that was weak and would always run from fights, another that was really aggressive (since they needed to kill other animals to survive) and then a third that could fight, but could randomly opt-out if it wasn't really hungry or in danger. It seemed to make the simulation a lot more interesting then just a game of cat and mice. Also, the weak ones would multiply (procreate) faster so they'd be in bigger numbers and could fight a predator if they were in a flock. Just some food for thought.
// cybereality
// cybereality
-
- Gnoblar
- Posts: 8
- Joined: Fri May 13, 2005 1:44 am
- Contact:
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
Woohoo!!agn0stic3000 wrote:Very cool demo, antarctica2007. It gives me (the OpenSkyNet dude) inspiration to put steering higher on my todo list.
I would be happy to assist in developing a library from this demo source or in assisting w/ OgreSteer.
EDIT:
I dont know if any of you would be interested in it, but there is a young project on SourceForge called OpenABS. Its incomplete, DirectX only and written in C#, but hey, it might be worth a look for some inspiration. For example, it allows 'groups' of boids (steering entities) to be enabled/disabled. Having groups of boids makes life easier, like only allowing certain groups to be affected by certain obstacles, or certain groups to interact/avoid each other.
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
not been doing much work this week so no new update yet ;/
im afraid that im not really very good at programming yet to be of use in
any collaborative things yet- but im trying my hardest to get better!
Cyberreality- thats good ideas, i had been planning to do something similar for when i get around to starting my masters, either a preditor /prey simulations based on african savanna type thing or humans vs zombies
current demos are a bit dull as they are just single behaviours- things get more interesting when you combine them- hopefully ill get of my arse and do some work this week and finish converting the last 2 behaviours (wall avoidance & hide) then i can do some better demos as well as go back and fix some of the dodgier behaviours and clean up my code to a level where its at least a bit less embarrasing and release the source:)
i should mention that the full source & binaries for the book can be found here:
http://www.wordware.com/files/ai
im unsure of the legal/licensing status of the books code, i read it somewhere and cant seem to find it again and im getting mail returned undelivered when i try to email the author
im afraid that im not really very good at programming yet to be of use in
any collaborative things yet- but im trying my hardest to get better!
Cyberreality- thats good ideas, i had been planning to do something similar for when i get around to starting my masters, either a preditor /prey simulations based on african savanna type thing or humans vs zombies
current demos are a bit dull as they are just single behaviours- things get more interesting when you combine them- hopefully ill get of my arse and do some work this week and finish converting the last 2 behaviours (wall avoidance & hide) then i can do some better demos as well as go back and fix some of the dodgier behaviours and clean up my code to a level where its at least a bit less embarrasing and release the source:)
i should mention that the full source & binaries for the book can be found here:
http://www.wordware.com/files/ai
im unsure of the legal/licensing status of the books code, i read it somewhere and cant seem to find it again and im getting mail returned undelivered when i try to email the author
-
- Kobold
- Posts: 27
- Joined: Sun Feb 11, 2007 11:18 pm
- Location: Sunny Scotland
another minor update:
added the "hide" behaviour, the selected vehicle will attempt to put an obstacle between itself and a target vehicle
im uncertain how the 2d wall avoidance behaviour should be translated to 3d -in 2d a wall is just a line segement, and in 3d its a trangle really
so do you think it should be able to avoid any arbitary 3d mesh / terrain object by doing ray/triangle intersection tests?
added the "hide" behaviour, the selected vehicle will attempt to put an obstacle between itself and a target vehicle
im uncertain how the 2d wall avoidance behaviour should be translated to 3d -in 2d a wall is just a line segement, and in 3d its a trangle really
so do you think it should be able to avoid any arbitary 3d mesh / terrain object by doing ray/triangle intersection tests?
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
Cool!antarctica2007 wrote:another minor update:
added the "hide" behaviour, the selected vehicle will attempt to put an obstacle between itself and a target vehicle
Not sure, but I think OpenSteer has a few basic geometric shapes used as its obstacles such as plane, box, rectangle, sphere etc. I don’t know what it does concerning terrain though. (Actually there is a more advanced Steering demo of a vehicle driving round a maze, called MapPoint or something, which uses more advanced collision avoidance calculations)antarctica2007 wrote:im uncertain how the 2d wall avoidance behaviour should be translated to 3d -in 2d a wall is just a line segement, and in 3d its a trangle really
so do you think it should be able to avoid any arbitary 3d mesh / terrain object by doing ray/triangle intersection tests?
I would seriously consider not using anything too hardcore when detecting/avoiding collisions with obstacles, the reason being that there are many physics libraries out there that already do this in a performant manner - I would say simple shapes deriving from an objects bounding box or sphere would suffice.
Personally I would prefer a Steering library to A) warn me of potential collisions against simple shapes and B) let me know when a collision has occurred against a simple shape.
Based on this feedback I would use a physics lib to determine the exact collision details, based on the more detailed mesh data as opposed to a simple Bounding Sphere or Box. It means that the Steering code remains fast and leaves finer grain calculations up to the users physics library of choice.
Anyway that’s just my thoughts. I guess I prefer Steering to be more AI than physics, but I guess the boundaries have to become blurred at some point.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
antarctica2007 wrote:Jacmoe - i would very much like to see updated versions of OgreSteer, please chain yourself to the workstation untill its ready
I wouldn't mind one bit if you assisted with OgreSteer!agn0stic3000 wrote:I would be happy to assist in developing a library from this demo source or in assisting w/ OgreSteer.
I would be happy to add you as developers, should you be interested.
But first we need to get the basics of the overall design down.
I invite you to architecture and feature brainstorming at the OgreSteer Forum.
I've held off the development of OgreSteer for too long - now it's time to get the cork out.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.