Game Development Community

Fundamental AIPlayer problem?

by Josh Albrecht · in Torque Game Engine · 05/31/2003 (8:21 am) · 2 replies

I have been doing some work with the AIPlayer class recently, and I noticed that the bounding box for any given AIPlayer is actualy ahead of where the client believes it will be while the AIPlayer is running.

To make him run, I do a simple commandtoserver('move', %bot, %location); Then I draw the bounding box on the server and on the client, and see that the server's box is about a full half second ahead of the bot.

Now, when you are a normal player, the server bounding box lags behind the client's box, just slightly. So, if one human player fires direclty at another human player who is moving perpendicular to the firing player, and we account for a small amount of lag, the shot will be a direct hit.

However, if the same player fires at the same location on a bot who is moving perpendicular to the player firing, it will be a horrible miss.

This seems like a fundamental difference between real players and AIPlayers, whic are supposed to exactly emulate real players. How can this be fixed? What did I do wrong? What am I overlooking?

#1
05/31/2003 (10:39 am)
This is very interesting (and somewhat dismaying) - does anyone know more about this?

Is there a fix?
#2
06/01/2003 (3:43 am)
Just a shot in the dark here. I wonder if its some king of prediction code that is used for the client->server->client smoothing, but which doesnt need to be done for tha AI player (because it doesnt have the client->server lag.

Effectively the AI player is like an uber-super-connected human player which has NO lag to the server.

Obviously the AI player is basically the same as a normal player, so the only real difference is the time lag on input (or lack of).

Phil.