RolePlayingDesign: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 132:
The action_id is used to identify the action when a resulting response comes in a perception
=Perceptions=
The basic structure for sending world updates to client is perceptions.
There are two types of perception:
= How Perceptions and Actions work =▼
* Sync perceptions, that are used to synchronize clients with the server world representation, that is the only valid source for knowning world status.
* Delta perception, that is used to send only changes since the last perception.
As we are using UDP transport, it is prone that we lose from time to time a package related to perceptions, and so we aren't going to be able to recover the world status, because each perception requiere the previous one to be able to work correctly. In this case we will send an Out of Sync Message to Server, so that server sends us a new Sync perception.
Our actual Perception system is Delta<sup>2</sup>. It is heavily attached to the Marauroa core, so I recommend you to use it :)
▲== How Perceptions and Actions work ==
Actions are sent from client to server in order to make their character to do an action. In order for the client to know the result of the action Server need to send it to client. How?
Line 142 ⟶ 152:
See Actions reply in Objects document to know exactly what is returned, but keep in mind that it depends of each particular game.
==Delta<sup>2</sup> perception Algorithm==
The main idea behind the DPA is not to send ALL the objects to client, but only those that has been modified.
| |||