I'm using Dark GDK and Visual C++ 2008 express to program an online FPS game. Multisync has been chosen for network communication between host and client.
I would like to know how to implement different synchronisation method, such as Local lag and dead reckoning... in order to simulate and evaluate them.
Can anyone tell me the key thoughts, please?
p.s. So far, I used NetPutString/NetGetString to pass the actions from the client to the host. There is no synchronisation applied. Please see the attached simple code.
Client:
if( dbUpKey() || dbKeyState( 17 ) == 1 ) {
//move this object at the Client side
dbMoveObject (0, g_fSpeed);
//send action command string "17" to host
NetPutString(dbStr(17));
NetSend(0);
NetPutString(dbStr(0));
NetSend(0);
}
Server:
if (NetGetMessage())
{
NetGetString(remoteText, 256);
}
//once the message received from the client is "17"
//do this action at the host side
if (dbVal(remoteText)==17) { dbMoveObject (101, g_fSpeed);
}