MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

rubinstu
MAME Fan
Reged: 02/05/10
Posts: 20
Send PM
Re: Client-Server model for control
02/28/21 06:26 PM


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.







Entire thread
Subject Posted by Posted on
* Client-Server model for control rubinstu 02/28/21 06:05 AM
. * Re: Client-Server model for control MooglyGuy  02/28/21 01:27 PM
. * Re: Client-Server model for control rubinstu  02/28/21 06:26 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 24 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 471