Forum Multiplayer Client server scheme

Discussion and help relating to the PlayerIO Multiplayer API.

Client server scheme

Postby tef » January 10th, 2011, 10:32 pm

I understand the basic of this concept, or so do I believe. However, I want to get all things straight. From what I understand the client-server algorithm in a MMOG can look something like this:

Client:
Code: Select all
connect to server
while( user does not exit && connection live)
    check for user input
    send commands to the server
    estimate outcome and update world data with 'best guess'
    draw graphics
    play sounds
    receive updates about the game from the server
    correct any errors in world data
    draw graphics
    play sounds
end


Server:
Code: Select all
while( true )
    check for and handle new player connections
    check for client commands
    sanity check client commands
    run AI
    move all entities
    resolve collisions
    sanity check world data
    send updates about the game to the clients
    handle client disconnects
end


I have a few questions regarding this in relation to event and state synchronization. So far in my game the client is basically an advance input listener that draw graphics. If a client makes a command it will first reach the server and with the next state synchronization the client will see the effect. The game is an asteroids clone, throttle, rotation, bullets, etc.

    1. How often do you usually send state synchronisation messages to all players from the server? I have been experimenting with everything between 100 ms - 1000 ms and different amount of prediction. With 100 ms (10 statesyncs every second) the bandwidth is consumed very quickly with just a few players, is that to be expected?


I actually have more questions, but let's start with these.

Thanks again!
tef
 
Posts: 10
Joined: January 7th, 2011, 3:38 pm

Return to Multiplayer



cron