fix: bug fixes related to client-server communication, lobby and room management, and game state handling.#345
Merged
Conversation
… and optimizing snapshot handling
There was a problem hiding this comment.
Pull request overview
This pull request addresses several bug fixes and improvements related to client-server communication, lobby management, and game state handling. The changes focus on preventing invalid state transitions, optimizing network traffic, and ensuring proper resource cleanup.
Changes:
- Added state validation checks to prevent game start and room update requests from being processed in invalid states
- Modified server-side UDP packet handling to send accept packets three times for improved reliability
- Increased lobby refresh period from 500ms to 1000ms to reduce network traffic
- Fixed UI bug where the create room flag was not properly reset when switching pages
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/game/gameServer/GameServer.cpp | Modified accept packet sending to transmit three times for reliability |
| client/src/ui/rooms/RoomMenu.cpp | Added reset of _createRoom flag when switching to join page |
| client/src/ui/lobby/Lobby.hpp | Increased lobby refresh period from 500ms to 1000ms |
| client/src/thread/ClientRuntime.cpp | Added state validation for game start and room update requests; refactored event handlers; added GameState check to prevent room updates during gameplay |
| client/src/game/world/ClientWorld.cpp | Modified registry reset to call clear() before reassignment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request introduces several improvements and bug fixes related to client-server communication, lobby and room management, and game state handling. The main focus is on ensuring correct state transitions, improving event handling, and optimizing lobby refresh behavior.
Client Event Handling and State Management:
LobbyState), preventing invalid state transitions. Also, the world is now reset only when starting a game from the lobby. [1] [2]Networking and Packet Handling:
Lobby and Room UI Improvements:
Other Notable Changes: