Basic Wandering AI

Blitz3D Forums/Blitz3D Programming/Basic Wandering AI

stayne(Posted 2009) [#1]
Had a bit of free time to do some beginner AI stuff tonight. 10 cubes wandering around trying not to get lost. Insanely simple! Feel free to expand on this if you feel the urge.




GIB3D(Posted 2009) [#2]
Function 'dcreateplane' not found
Line 48, Column 1


Ross C(Posted 2009) [#3]
I think that's a typo? Try removing the d, and see what happens.


stayne(Posted 2009) [#4]
Whoops, sorry about that. Was a jvode line...fixed.


puki(Posted 2009) [#5]
Boo! It was better before you fixed it - that checker plane is hurting my eyes.

Nice example though, it is more a guarding/patrol example. I would not deem this wandering AI. This type of AI is in Hinterland.


stayne(Posted 2009) [#6]
Dropped in some entity avoidance code.




Guy Fawkes(Posted 2009) [#7]
mm. *claps graciously* except for the checker floor, excellent! :)

~DS~


stayne(Posted 2009) [#8]
Here it is in action: http://www.youtube.com/watch?v=vk9eqBS3H5o

Apologies for the quality. Just another one of my little projects that will probably never see the light of day. One man teams are tough!


Nate the Great(Posted 2009) [#9]
hey it uses my avoid entity function from the archives! I knew that would come in useful someday... very nice for guard AI.


_PJ_(Posted 2009) [#10]
Overall, it's very neat and quite efficiently done for simplicity vs effectiveness :)

I really like it!


GIB3D(Posted 2009) [#11]
"Short low quality vid of a game I am coding." yet it asks If you want to watch it in high quality, lol.

It's almost exactly like the AI on Silkroad Online.
They randomly move around.
If you get close enough, they follow you.
If one is following you and they get too far away from a certain point, they ignore you and go back.


stayne(Posted 2009) [#12]
Exactly GIA, doesn't get any simpler. Just thought I'd share it for anyone that has a need for something this inane. I didn't realize there was a high quality link, thanks!

I'm still waiting for someone to spruce it up a bit! I think AI is limitless and I get a rush seeing things come to life and develop ways of doing things.


stayne(Posted 2009) [#13]
Watch 'em duke it out! Red usually wins for some odd reason. Might get a mav here and there...haven't sussed that out yet (needs some serious optimization anyway).