New bots on Radar?
by Sabrecyd · in Torque Game Engine · 10/16/2002 (7:38 am) · 8 replies
Anyone know how to get the new bots to work with radar (any of the radar sources found on this site)? They used to show up just like the player, but with the new bot code they don't. The client players still show up like they always did. I'll post here again if I find out anything more myself.
Thanks,
-Sabrecyd
Thanks,
-Sabrecyd
About the author
#2
10/16/2002 (8:37 am)
Thanks Davis. That's the line of code I was looking at too. Good tip to know about. The problem now is figuring out what the heck the bot object is called. I thought it might be AIPlayerObjectType but that doesn't work.
#3
In the aiPlayer.cs file change this line of the spawn function:
I can see how being able to set the name here could be very useful, especially for multiple bot types.
Edit: By doing the above the little healthbar shows up again too when you point at a bot.
10/16/2002 (9:06 am)
Found something that works! This might not be the best method, but here it goes.In the aiPlayer.cs file change this line of the spawn function:
%player.setShapeName(%this.name);to this:
player.setShapeName("PlayerObjectType");I can see how being able to set the name here could be very useful, especially for multiple bot types.
Edit: By doing the above the little healthbar shows up again too when you point at a bot.
#4
10/16/2002 (9:44 am)
Thanks for the info - I'll have to keep this in mind in the future. However - I wonder if there's any side-effects to doing this. Makeing the current AI player into a normal Player shapebase, won't it inherit all the problems with using the old player like that, short circuting the improvements they made to the AI Player classes? (I don't know - I'm just currious :-)
#5
10/16/2002 (9:55 am)
I'm not sure either. So far it hasn't seemed to hurt anything with the new bot improvements (that I know about). It will take some testing I think. Of course maybe someone will find a better way to deal with this :)
#6
which is why it shows up in the hud ..
cause that needs a name.. so the radar code must too.
you've not made this AIPlayer any more like a Player than it was .. as it now derives directly from player,
as for improvements ..
the only real improvement i've noticed is that they actually aim better now
My problems is that I can only get a low count of them in .. under twenty
Ive coded a class to remove the need for AIConnection aka GameConnection
and Ive gotten over 30 now (and keep frames)
(as long as you dont look at them all)
but this is still too low ..
the problem now is the Player class is too heavy ..
and all the collision required to keep him on the soil is very expensive.
10/16/2002 (12:36 pm)
by doing this all you have done is give the nameless a name ..which is why it shows up in the hud ..
cause that needs a name.. so the radar code must too.
you've not made this AIPlayer any more like a Player than it was .. as it now derives directly from player,
as for improvements ..
the only real improvement i've noticed is that they actually aim better now
My problems is that I can only get a low count of them in .. under twenty
Ive coded a class to remove the need for AIConnection aka GameConnection
and Ive gotten over 30 now (and keep frames)
(as long as you dont look at them all)
but this is still too low ..
the problem now is the Player class is too heavy ..
and all the collision required to keep him on the soil is very expensive.
#7
10/16/2002 (12:51 pm)
Thanks for the info. That's kinda what I thought but wasn't really sure. Yeah, it would be good to have a seperate class for minor NPC type characters that isn't so processor intensive to use.
#8
but when it comes to keeping the little sucker on the terrain .. its a lot of work :)
and there is a lot of code needed to keep him smooth on the terrain ..
10/16/2002 (12:54 pm)
yea .. ive been working on one..but when it comes to keeping the little sucker on the terrain .. its a lot of work :)
and there is a lot of code needed to keep him smooth on the terrain ..
Torque Owner Davis Ray Sickmon, Jr
Default Studio Name