Menu

#1 Client-side Prediction

0.0.1
open
nobody
None
feature
critical
2012-05-15
2012-05-14
No

Client-side prediction is essential to a responsive online game. PewPew clients currently react only once they receive an acknowledging event from the server immediately, resimulating when corrected by the server. The client should send a time code with the event request, the server should then rebroadcast that event, and clients should apply every event sent by the server unless they already have it. Currently, clients bail resimulate on old events (events with time codes prior to the current frame), so old events are applied correctly.

The following things are necessary to implement CSP:

  • Synchronization between clients and the server
  • Deterministic Physics [#2]
  • Storing/restoring of the state at arbitrary times [#3]
  • A set of rules for the state(s) and events to be stored by clients
  • Rules for validating input requests server-side (and client-side)
  • The ability for the server to reject or modify a client's input request [#4]
  • A means for the clients to restore an old state, modify the event queue with
    server corrections, and resimulate the state to the current time.

CSP is the last roadblock to a working framework (once this is done, content creation and true gameplay decision-making can begin).

Discussion


Log in to post a comment.