Companion "AI"

Posted By: Damocles

Companion "AI" - 01/08/08 01:00

This is a simple AI of a companion, who follows
you quite accurately though a level.
No nodes required to set.
(script is not quite clean, but rather fast written)

http://www.wasteland.at/companion.zip

It works on any bsp-level for A6.6, (dont use Models for
bridges or so)

Just use the buildproperties:
//build-values WED: 25,64,0 for narrow and fat
this is required for the movementcode to work correctly

you should also place the player into the level
(action: the_player)
Posted By: MichaelGale

Re: Companion "AI" - 01/08/08 01:34

I had to restart the demo two times, before I was able to test it. The companion kept jumping out of the level before.

The ai doesn't seem to be very complex, just follows the player as fast as possible to avoid the need for complex pathfinding. It occurred several times to me while I have been running through the level, that the companion was unable to follow me. Quite nice for simple games though. Maybe you should work longer on your ai to make a really good one
Posted By: Pappenheimer

Re: Companion "AI" - 01/08/08 02:42

Quote:

It works on any bsp-level for A6.6, (dont use Models for
bridges or so)




Best conditions to combine invisible blocks for collision in combination with models shadowed by ventilator's lightmapper.

This companion acts like a monkey, always jumping, keeping no distance to me, he even jumps on my head!
Good AI for a little monkey who sits down on my shoulders when he reached me!

Add an animation, licking the face of the player's hero, and you make the player fall off his seat!
Posted By: alleen

Re: Companion "AI" - 01/08/08 08:29

this demo is amazing.. if you would remove that silly jumping.... and if you could make him move away a bit when he's in your way and doesnt let you pass.... it would be perfect..

i also like the player movement code, which i consider better than the one i coded myself for evjiäl
Posted By: Puppeteer

Re: Companion "AI" - 01/08/08 13:48

its awesome.
You just get your nodes with the players position right?
i have one little hint that may help: (if my theory is right about your code)
You can save in a node if the player jumped that would avoid uneccesary jumping by the bot, i would also include in a node if the player used something like the evelator so the bot would wait for it instead of jumping all the time
Posted By: Damocles

Re: Companion "AI" - 01/08/08 13:56

The jumping can also be turned off, it is actually just a way for the bot, to overcome high obstacles.
Then the bot will not jump onto the player.

The bot follows the nodes left by the player, if he can find them.

To advance this, there could be a sequence of traces, to find the clothest node to the player,
that the bot can reach. its not hard to implement.
Posted By: frazzle

Re: Companion "AI" - 01/08/08 19:44

Great again, I really like the way you handle AI at a simple but optimized way
Thanks for sharing this !!

Cheers

Frazzle
Posted By: MAGA

Re: Companion "AI" - 01/08/09 18:01

Dude it's awesome!!! Thanks allot!!! But can I use it for my game(it will be free)???
© 2024 lite-C Forums