AIPlayer class...
by Ryan Ackley · in Torque Game Engine · 01/23/2002 (8:09 am) · 23 replies
I read in the changelog that the AIplayer class is working:
- kb: AIPlayer is now working. VC6 Workspace is updated, make targets updated
- kb: Default AIPlayer class in scripts, catches callbacks thrown from the AIPlayer code
Though i dont know the date as to when this became so... last i knew it wasnt working, so this is a good update for me... im thinking it was in the 1_1_1 update...
Any ideas on where to start with this... i messed around a little bit with aiconnection, but went about it all wrong and it didnt quite do what i wanted. Pat, you got any cool bots running around?
Ryan
- kb: AIPlayer is now working. VC6 Workspace is updated, make targets updated
- kb: Default AIPlayer class in scripts, catches callbacks thrown from the AIPlayer code
Though i dont know the date as to when this became so... last i knew it wasnt working, so this is a good update for me... im thinking it was in the 1_1_1 update...
Any ideas on where to start with this... i messed around a little bit with aiconnection, but went about it all wrong and it didnt quite do what i wanted. Pat, you got any cool bots running around?
Ryan
About the author
#2
01/23/2002 (8:22 am)
You may find a new directory named "AI" in the release 1.1.1, I guess that folder will be used to include the AI associated classes. However, there still be nothing in release 1.1.1. :<
#3
ryan
01/23/2002 (8:43 am)
id say that the core implementation is there, making an AIPlayer, but it looks like they are programming in stubs... all of the callback handlers are just echos... ;) so id say the class isnt exactly fully functional yet...ryan
#4
-Tim aka Spock
01/23/2002 (4:45 pm)
I got basic waypoint following working with some of the code that was in the broken version of that class, but I haven't checked out the new code yet to see what is there...been waiting on something like this since my code was a little hackish.-Tim aka Spock
#5
Ryan
01/23/2002 (5:36 pm)
heh, i know, we are like all waiting on the bot code. its not that its that integral to what im doing, just something id like to play with... i had some bots able to be controled from the key board... it was kinda fun :) but, im also looking for something a LOT less hackish than the harebrained things i think up :)Ryan
#6
-Better demo script
-Script namespaces (So you can have different AI classes instead of just the AIPlayer script handlers)
-AI Objects, not players. Players take up lots more server resources then is really needed, they also take up a player slot.
-*sigh* Pathfinding. I wrote about my ideas for the pathfinding in my last .plan but so far I haven't worked on it.
I will try to get to it, however, the script interface probably won't change too much, if at all. So when you do a setMoveDestination, when pathfinding is in, it will pathfind to that destination, where as right now it just does a straight line.
01/27/2002 (2:16 am)
Errr...geez I keep getting called onto the carpet for these AI threads. Here's the plan at the moment. Yes, you can now have bots running about, and I should probably do a waypoint type demo with that script instead of just echos. This is what I need to do:-Better demo script
-Script namespaces (So you can have different AI classes instead of just the AIPlayer script handlers)
-AI Objects, not players. Players take up lots more server resources then is really needed, they also take up a player slot.
-*sigh* Pathfinding. I wrote about my ideas for the pathfinding in my last .plan but so far I haven't worked on it.
I will try to get to it, however, the script interface probably won't change too much, if at all. So when you do a setMoveDestination, when pathfinding is in, it will pathfind to that destination, where as right now it just does a straight line.
#7
It would be very cool to have a single player example in the 1.2 release :)
hehe...
01/27/2002 (6:43 am)
Thanks for updatin us Pat!It would be very cool to have a single player example in the 1.2 release :)
hehe...
#8
i'm trying to add a player with aiAddPlayer("botname");
it says botname joined, it appears in the scorelist ... but it doesnt spawn! :\
Im using head btw...
01/27/2002 (7:39 am)
hey pat, maybe you can help me out...i'm trying to add a player with aiAddPlayer("botname");
it says botname joined, it appears in the scorelist ... but it doesnt spawn! :\
Im using head btw...
#9
ryan
01/27/2002 (9:37 am)
hrm.. ok, well, i wonder if anyone has decent bots running around. all i have right now is a bot that joins the game, and i can control through the keyboard. heh. this is using aiconnection. its not very high level, and i can only control one bot at a time (heh press bracket keys to rotate, then ijkl to move) From what i can gather, aiplayer is supposed to be higher level, so thats why i was wondering. Ive emailed a few people, asking for help, and none of them were willing to share code. so :p to you. any less stingy people willing to help? i think with a little cooperation, we can have some sweet bots kickin our butts all over :)ryan
#10
==> $ai = aiAddPlayer( "Botname" );
CADD: 1432 ai:local
I've been added
The bot should be there, and you should be able to control him using the script interface. The bot should spawn exactly where you spawned (unless you have multiple spawn points). If this still doesn't work, I really don't know why it wouldn't, but I'll see.
01/27/2002 (9:58 am)
Xavier, here's a few things to check. First off, make sure you've pulled 1.1.1 release out of CVS (I think you must have this, or aiAddPlayer() wouldn't work) This should be the text of a sample bot add:==> $ai = aiAddPlayer( "Botname" );
CADD: 1432 ai:local
I've been added
The bot should be there, and you should be able to control him using the script interface. The bot should spawn exactly where you spawned (unless you have multiple spawn points). If this still doesn't work, I really don't know why it wouldn't, but I'll see.
#11
01/27/2002 (10:56 am)
pat, i really need to pull 1.1.1 from cvs? i currenty have head.. updated today
#12
Was this me messing around or is the aiPlayer.cc missing from Visual projects/workspace? Are you guys using the make files to compile or Visual Studio?
/Stefan Grufman
01/27/2002 (11:23 am)
Hrm... I tried the "aiAddPlayer()" with no result at all using the Release_1_1_1 from CVS. I am compiling with Visual and in my "Torque Demo" project, the file aiPlayer.cc was not added to it. I added this and recompiled an now it works. Was this me messing around or is the aiPlayer.cc missing from Visual projects/workspace? Are you guys using the make files to compile or Visual Studio?
/Stefan Grufman
#13
01/27/2002 (4:01 pm)
Yeah, it was missing from my project too. Just add in aiplayer.cc and .h and you are set.
#14
Ryan
01/27/2002 (5:14 pm)
heh there was the one problem with working with the aiplayer class... having it be part of the project... heh. so i got a bot in game that just stands there. time to dig through movement code. Anyone got anything cool so far? ive only scratched the surface...Ryan
#15
so ive setup an AIObjective class
and exported it to the script..
some simple spawning logic to get them in the game
and ive enabled a couple of the Objective action types in the AIPlayer class
tonight ill put all this into a tut ill make available for anyone who is interested
so basically with a couple small additions to the AIPlayer class and the addition of the other class ..
and the spawn code
nothing is complete and its a work in progress :)
but ill put it together anyhow so that you can have wingmen too :)
its kinda fun seeing 3 or 4 bots fly around a guy and chase you
01/27/2002 (8:03 pm)
I have em jumping in vehicles.. flying to destinationso ive setup an AIObjective class
and exported it to the script..
some simple spawning logic to get them in the game
and ive enabled a couple of the Objective action types in the AIPlayer class
tonight ill put all this into a tut ill make available for anyone who is interested
so basically with a couple small additions to the AIPlayer class and the addition of the other class ..
and the spawn code
nothing is complete and its a work in progress :)
but ill put it together anyhow so that you can have wingmen too :)
its kinda fun seeing 3 or 4 bots fly around a guy and chase you
#16
01/27/2002 (9:31 pm)
well of course it aint something as stupid as adding it to the vc project. I did compile aiplayer.cc and it makes the bot join but it wont spawn :\
#17
[random idiot rambling]
Ninja Reference]
heh... my game has gameplay so awesome you will flip out and totally kick your mom right in the face!
[/random idiot rambling]
there should be some kind of special highlighting for that tag :)
ryan
01/28/2002 (7:50 am)
yeah, im interested badguy, once i got some basic movement code, ill be set... i want to get a few ninja bots to like totally flip out and kill me... get revenge for all those weapon tests... heh...[random idiot rambling]
Ninja Reference]
heh... my game has gameplay so awesome you will flip out and totally kick your mom right in the face!
[/random idiot rambling]
there should be some kind of special highlighting for that tag :)
ryan
#18
02/05/2002 (7:48 pm)
Ryan, if anything let me think you for showing me the Official Ninja Homepage... ;)
#19
-While writing this script, I head-butt my dog so hard that we both screamed.
02/06/2002 (12:48 am)
that ninja site is hilarious...-While writing this script, I head-butt my dog so hard that we both screamed.
#20
ryan
02/06/2002 (4:17 am)
i only wish i could think up that sort of stuff... my game is so hot, there is steam coming out of the monitor or keyboard...ryan
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name
and actually it was before 1_1_1