very good/efficient AI, Red vs Blue bots

okay, this is a mashup of someone’s (not mine) randomtravel.blend and my own AI shooting logic. they only aim in 2d, partly because it would be a pain, but also to keep the logic power down. The bot actually aim by moving thier upper-body armature, instead of rotating the whole bot (which looks good, and is more realistic)

right now, there is nothing really directing the bots overall direction, but it can be fixed using the origional script. if anyone is interested, i’ll explain.

otherwise, here are my attachment.

it is really a .zip file, i just called it a .blend so that the server would let me upload it.
so you need to change the extension back to .zip to extract it.

enjoy, and good luck, i’de like a lot of feedback (like how important 3d aiming is to you guys)…

-theuncool1

Attachments

aiexample.blend (304 KB)

okay, some more important things, in the blend, press ‘T’ to spawn the bots. mouse to look, wasd to move.

i use a ‘global logic’ empty to send out pulses using the message actuator, which while not the most efficient method with only one bot, it is much faster when dealing with more than 3 bots (which you all want to do, right?). These linked pulses are much faster than having a bunch of bots all pulsing seperatly.

hope you all apreciate,

by the way, how many bots can u guys run without a noticable slowdown?

-theuncool1

dude, where is everybody?

You should wait at least an hour before expecting a bunch of replies, especially if you’re posting at midnight.

Anyway, the file didn’t work for me. Download and test it to see if it was an upload problem.

Right, the blend works fine for me, I like the speed.
First: I don’t like the node setup on a AI rig. Thought it allows bots to fill up the map, it limits their movements. For instance if the bot is hit and stuck next to a wall.
Second: The bots continue tracking the node if they are hit from behind. The bots don’t aim at targets above a certain angle I presume 60. The bots don’t die.
Third: they just walk forward, making them look pretty much robotic…

It works fine though, looks very clean. Good job!

i guess i forgot to mention that they don’t die, yes i know.

i could add more logic to allow a bot to unstick itself, from a wall. but my thinking has been that if the bot takes enough bullets to actually knock it off of its path, it should be a gory mess (and not trying to get back on the path). i am not planning on adding a Bullet force in the future, it’s there for now because i haven’t created blood and guts, and i need to make sure they shooting (and hitting each other)

and the angle of view thing, yes i agree it needs to be bigger, but its actually not realistic. unless i put the bots head on a swivel (like with an action in the armature) he’s going to be walking past you( looking straight forward), and then all of the sudden, see you out of the corner of his eye and turn to kill you?

i am working on the dying today, that along with some other ideas, such as the bot, ducking or sidestepping when bullets hit near him (i might use a distance sensor, but my experiance has not been good with them).

i am also working on a reloading animation that occurs after x shots, and then have a logic that says, IF enemy is ‘near, or in view’ AND ‘i am reloading’, pull out a pistol and kill that #$%^er… just like we all do when we play online.

so, yes, i am working on adding animations to him (and i suck at animating). my biggest fear is that all these animations to make him look better but will slow him down a lot. my pc is no powerhouse, so i have been trying to keep the cpu on the lean side.

thanks for the suggestions, and hey if you want to animate him reloading or getting killed, i could probably use it. right now i’m trying to port other animations to him ( cause i really, REALLY suck at animation)

thanks, torakunsama
-theuncool1

hey Rorkimaru, it is really a .zip file, not a .blend

kay? the forum wouldn’t let me upload a .zip so i tricked it.

so you need to change the extension from .blend to .zip then extact it.

good luck
-theuncool1

and the angle of view thing, yes i agree it needs to be bigger, but its actually not realistic. unless i put the bots head on a swivel (like with an action in the armature) he’s going to be walking past you( looking straight forward), and then all of the sudden, see you out of the corner of his eye and turn to kill you?

Hey! what kind of question is that? It’s your idea to have your bots be like trains… A nodes setup does not forces you to keep your bots on track. On enemy proximity, on getting shot by enemy, your bots should get off track, shoot the enemy, and return on track if no enemy is near by. You can achieve that with a states logic build.

so, yes, i am working on adding animations to him (and i suck at animating). my biggest fear is that all these animations to make him look better but will slow him down a lot. my pc is no powerhouse, so i have been trying to keep the cpu on the lean side.

If you want it to be a resource, animation is irrelevant. Whoever uses it, will add it according to his/her design, specially if you suck at animation.

Ah I understand now. Got it working. It’s an interesting project, it has the makings of something good.

I do agree though that if it’s an AI resource that animations are irrelevant and actually a hindrance. If I were putting together something like this I’d have a simple mesh that had a feature showing what direction forward was and that’s it.

After all most people would just replace the animating guy with their own character off the bat.

That said, I understand that by having an animation etc you give a more presentable demonstration so there is a merit in what you are doing too. Perhaps you could work on the AI and have someone else bother with the pretty demonstration?

that would be nice, but in this case, two of the bones in the armature is doing the aiming, so having someone else trying to animate him without using those bone, would be more of a hinderance at this point.

i suppose i could do it, and just label a bone or two “don’t touch”…

you tell me if it’d be worth it.

glad you got the blend working.

i think i actually need to put a little more into it to show people how well it can be used in a game, cause honestly, when i see a collection of boxes tracking to nodes, like in other people’s ai demos, its harder for me to see the potential. this is sort of in-your-face, its ovbious that you can use it a certain way, because it is being used that way.

well, if you want to know which bones are controlling the aiming, it’s the bones used in the action ‘rotate’ it like the middle two

and thanks for the feedback
-theuncool1

that’s pretty cool! The textures aren’t packed though…