You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gdevelop5/all-features/multiplayer/index.md
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -55,20 +55,20 @@ Use the action **Open game lobbies**. This action will show the lobbies to the p
55
55
- When all players are ready, the player 1 can start the game.
56
56
- When the game is started, the lobby is automatically closed and players are automatically connected to each other.
57
57
58
-
If needed, you can use the condition **Lobbies window is open** to check if the lobbies are open and prevent some actions to happen on your scene.
59
-
Typically, you can use this action when the user presses a button in your menu.
60
-
61
-
!!! note "More about player authentication"
58
+
??? note "More about player authentication"
62
59
63
60
To join a lobby, a player needs to log in to their GDevelop or gd.games account. This is automatically handled for you, so that calling this action will automatically open the authentication window if needed.
64
61
If you want to handle this yourself, or allow players to change their account, you can use the actions and conditions provided by the **Player Authentication** extension.
65
62
63
+
If needed, you can use the condition **Lobbies window is open** to check if the lobbies are open and prevent some actions to happen on your scene.
64
+
Typically, you can use this action when the user presses a button in your menu.
65
+
66
66
Once the game has started, the condition **Lobby game has just started** will turn true, so you can start your game.
67
67
Typically, you can use this condition to either start moving things in your game, or to switch to another scene, where the game will happen.
68
68
69
69
Note that there is also a condition called **Player is in a lobby** if you need to know if a player has joined a lobby.
70
70
71
-
??? tip "Access information about the lobby during the game"
71
+
??? tip "Access more information about the lobby during the game"
72
72
73
73
Expressions are available to let you know access information about the lobby:
74
74
@@ -168,15 +168,12 @@ It's often used:
168
168
169
169
During a game, the server will automatically synchronize the game variables and the scene variables between players. This is particularly useful to have a single source of truth for the game state, and to avoid having to synchronize everything manually.
170
170
171
-
If you want to make sure that everyone has the same information about a game state, then you can use the game and scene variables. For example, you can use the game variables to store which level is being played, which random seed is used for the level generation, which scene is currently active, etc.
171
+
If you want to make sure that everyone has the same information about a game state, then you can use the game and scene variables: a score multiplier, the difficulty level, etc...
172
172
173
173
!!! note
174
174
175
175
It means that if a player tries to cheat by modifying the game variables or wrongly change a variable because of a network issue, the server will automatically send again the correct value to the player.
176
176
177
-
On the other side, if you want an information to be shared by a specific player to everyone, you can use behaviors or object variables of an object their own, as they will be synchronized between players.
178
-
For instance, you can use the variables of a player character to store the score of the player, use the Health behavior to handle the health of the players, another behavior or variable can store the number of bullets left, etc... Variables and behaviors will be automatically synchronized between players.
179
-
180
177
## Common patterns and things to look out for
181
178
182
179
### Handling collisions and interactions between synchronized objects
0 commit comments