Game Development Community

AiConnect hangs

by Davis Ray Sickmon, Jr · in Torque Game Engine · 09/24/2003 (10:00 pm) · 4 replies

Well, the new demo has been merged with HEAD, so let the whining begin ;-)

I merged the TrajectoryZone project with the current HEAD (Forgive me Father, for I have sinned - it's been many months since my last merge with HEAD... ;-) Dead simple process - looks like a couple o' things have changed (connect() is different, for example), and all the custom stuff I did integrated into the new version quite nicely. However, I found something that totally harfed TZ under HEAD.

In the previous codebase for TZ, I was using AiAddPlayer() to add in bots for the single player section of the game. AiAddPlayer is gone, and it appears that aiconnect() is used instead. Since I've not been up with HEAD in quite a while, I may be missing something that evolved over time. But - when I do aiconnect("Alien 1"); as a test, everything freezes dead. I dug through the new demo, and discovered the OnConnect callback that gets preformed when a new bot is spawned. Checked my scripts, and neither GameConnection::OnConnect nor AIPlayer::OnConnect existed. Added 'em, transfering the script from the new demo over for GameConnection::OnConnect, and copying it to a new function AIPlayer::OnConnect.

Here's the problem - I don't know if I'm missin' something important, or if it's legitamately broken (if I knew for sure, I would have just filed a bug). Help?

#1
09/24/2003 (10:08 pm)
I'll add one more thing - I realized I could try the same thing from the console in the new demo, and start tracking down exactly what's needed. Doing it there doesn't produce the same result - instead, it just plain crashes. *SIGH* So much for that idea ;-)
#2
09/24/2003 (11:26 pm)
Well, I dont think AIConnect is used anymore... since a loooong time now ;)
In the HEAD before the merge it was just:
$myBot = AIPlayer::spawnPlayer();
and now it seems to be called:
$myBot = AIPlayer::spawn(%name,%spawnPoint);
although I havent played with the brandnew and merged HEAD yet...
Here are some more infos about the changes to the "old" HEAD (although this seems to have changed again a bit for the new demo stuff ...)
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3248
#3
09/25/2003 (2:13 am)
I submitted a resource that adds a very easy to use method for spawning AIPlayers I thought I'd also submitted it for inculsion in HEAD but it appears it never made it.
#4
09/25/2003 (10:14 am)
Hm. AiConnect shows up in AiConnection.c. It didn't occur to me to look for spawnPlayer - oops! I'll check on that tonight when I get back in front o' the computer.

This is what happens when I go too long without merging with HEAD - my knowladge is already out of date ;-)

IIRC, I thought they were planning on adding more of the resources (like yours) to the current HEAD before it becomes 1.2, so it might still get in there. (For that matter, I think my Particle LoD needs to find it's way in there too - RealmWars suffers from the same slowdown issues for large particles up-close as it used to. The LoD stuff fixes that.)