Game Development Community

Ai vehicle jetting

by Very Interactive Person · in Torque Game Engine · 10/09/2004 (10:28 am) · 10 replies

I'm using the AI WheeledVehicle class from this resource... everything works fine, and now I would like them to jet. This doesn't seem to be possible trough scripts. So I need to be able to activate the third trigger on the vehicle, and make it so it automatically deactivates when its out of energy, or be able to control the deactivation trough scripts.
I'm no good with engine code.... so can someone please please help me out here? Without this feature my bots are no competition, this is the last thing I need to make them actually beat human players.


Something else.... anyone else having collision and dissapearing problems with AI vehicles? Looks like they're lagging a bit, even on a local game. Strange...

#1
10/09/2004 (11:28 am)
Aye, collision problems here as well, but no "dissapearing" problems as far as I can see. Maybe you can elaborate on that one?
#2
10/09/2004 (1:03 pm)
Well, its not really dissapearing.... they just leap forward sometimes.... like there's some serious lag occuring. Now, in another thread it was suggested to change the default net settings and increase the packet size. This makes the problem go away, but it increases the required bandwidth for the server. I don't really see why this is happening for AI, and not for regular let connections (altough I haven't really tested this to make sure). Also, today, I saw a real dissaearing act of one of the bots. One was driving in front of me, and suddenly, pooof.... gone! This is the first time I saw a real dissapearing act tough, normally they just jump a couple of meters forward or stuff like that.
If you ask me, I think the collision problems and the leaping are caused by the same bug/problem.
#3
10/10/2004 (7:35 am)
Anyone?
#4
10/10/2004 (11:07 am)
I haven't really tested the resource you used. I manage my bots to drive cars using Badguy's resource and mounted AIPlayers.

But I've seen bots disappear. It had something to do with the AIManager script. Instead of having one script for all bots I made each bot have it's own think function.
#5
10/10/2004 (11:31 am)
What do you mean with "the AIManager" script. For my game I wrote an AIManager, but i wrote it myself, didn't copy it from somewhere else. I really don't see the big difference between a think fucntion for each bot, or an AI manager. This seems to be more of a network related problem.

But anyway, my real question was about them to be able to jet/boost. Looks like my second question took over this thread, but its not so important to build a prototype, the jet functionality is.
#6
10/10/2004 (11:36 am)
Altough.... maybe it does make sense to get rid of my AIManager. I mean this AImanager "thinks" at regular intervals for all bots, so, at those intervals there's an increase in net traffic, right?.... becuase the settings for all bots are changed at the same time? So, maybe if the thinking was more spread out over time (each bot thinking for his own), that would help? I mean the problem does go away if the packet size is increased (but i don't really want to do that). Can someone with some more networking insight tell me what he thinks? Becuase what i'm saying here is just a really wild guess.... based on the info I just got from Bruno... I really wouldn't see why else a seperate think function would work better.

But back to the jet question, like I said, that's more important to me right now.
#7
10/10/2004 (6:38 pm)
That was a good insight about the AIManager, I never had thought about it.

About the jet question, can't you create a console function in the vehicle class ( that seems harder than it really is ) that activates the jet trigger of the vehicle ?
#8
10/11/2004 (2:16 am)
Yes, that's the idea. Unfortunately I'm no good when it comes to engine mods. This is probably really easy for someone with some insight on how the engine works and specially the vehicle classes etc.... its not like I didn't try, I did try, but nothing really worked.

Something like myBot.startJetting(); and myBot.stopJetting(); would be really cool. It would even be cleaner if it automatically stops jetting if its out of energy, but a stopjetting(); function would be required anyway (don't want em to jet trough a u-turn for example, I might want to have them stop in some occasions)
#9
03/13/2006 (7:56 am)
@Ward: Have you got the way to do it?
#10
06/19/2006 (12:56 pm)
We had this in our game yes, this project was stopped almost a year ago (too much problems with vehicle physics over network), so I'll have to dig it up.