Moogly, the problem of timing in general is an important one. As you imply, lagging even a little can start to cause chaos pretty easily. I've thought about this: In a "training" or other automated play situation, the speed of the play doesn't really matter as long as the "player" (i.e. some bot or AI) and game are in sync. Emulator with the server running can operate in a synchronous mode. So, for even n frames (where n is often 1), the server pauses the game, processes the input, posts the outputs, then resumes the game. In the simplest form, this could be just single-stepping the game from the server.
When running the client and server on the same physical computer (which I imagine will be common), the network lag will be quite small, since the port connection isn't really using the network, it's just inter-process communications (IPC). I am hoping that on a reasonably fast machine, simple game, and simple AI bot, training and playing can actually be faster than normal real-time play.
I have seen other bots train and play faster than real-time with the Lua engine.
Does this make sense? Thanks for your input. I'd like to hear more thoughts.
|