Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:all-features:p2p [2020/08/14 18:53]
silver-streak Reformatting some of the first sections, removing the "you/your"
gdevelop5:all-features:p2p [2020/12/26 13:56] (current)
Line 29: Line 29:
 After opening a command line, complete the following: After opening a command line, complete the following:
   - If this is the first time completing these steps, to install the server type **npm install peer -g**   - If this is the first time completing these steps, to install the server type **npm install peer -g**
-  - After the server is installed, and every subsequent time (to start the server), type **peerjs --port <the port>**+  - After the server is installed, and every subsequent time (to start the server), type **peerjs -<the port>**
       Any port that is not already used by the computer can be used.        Any port that is not already used by the computer can be used. 
 Other options can be passed to the PeerJS server, see [its website](https://github.com/peers/peerjs-server#config--cli-options) for more information.   Other options can be passed to the PeerJS server, see [its website](https://github.com/peers/peerjs-server#config--cli-options) for more information.  
Line 55: Line 55:
  
 You might be wondering what the "data loss" parameter is for.  You might be wondering what the "data loss" parameter is for. 
-Due to how GDevelop is made, only one occurence of a remote event can be handled when the the event sheet is executed (this happens roughly 60 times per second). To help optimize events execution, we provide the choice to use the dataloss mode. +Due to how GDevelop is made, only one occurence of a remote event can be handled when the event sheet is executed (this happens roughly 60 times per second). To help optimize events execution, we provide the choice to use the dataloss mode. 
  
 * With the *no dataloss* mode, every remote event is queued, and on every frame if there is one in the queue, we take the oldest one and handle it. **This makes sure every data is processed/taken into account.** * With the *no dataloss* mode, every remote event is queued, and on every frame if there is one in the queue, we take the oldest one and handle it. **This makes sure every data is processed/taken into account.**
Line 64: Line 64:
  
 * if you use a synchronised score counter, you don't want to lose any data, as missing only one point of the counter would *desynchronise* the counters, so the dataloss mode would be deactivated.  * if you use a synchronised score counter, you don't want to lose any data, as missing only one point of the counter would *desynchronise* the counters, so the dataloss mode would be deactivated. 
-* If you want to synchronise positions, only the last position sent is relevant, not older positions. In this canse, you would activate the dataloss mode *to prevent delays/lags*.+* If you want to synchronise positions, only the last position sent is relevant, not older positions. In this case, you would activate the dataloss mode *to prevent delays/lags*.