-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Big Tetris Parties TL;DR This patch allows more than the previous 2 players to compete, and makes many minor improvements. - Add magic number to all messages to help catch any network issues - Add message_type field to message wire header, and remove the message_type from the body of many messages - Define new method, message_type_to_str, to print a human-readable message type for logging - Create new helper method message_blob - Declare a macro name "PLAYER_NAME_MAX_CHARS", and use it consistently to validate the player names. - Refactor StringArray to take a max length and define the StringArray serialized header bytes using a struct - Bump MAXMSG up to 2048 - Refactor serialize_state to use no more bytes that necessary, rather than using MAXMSG as before - Server now sends reply to user registration to indicate success - Remove unnecessary and barely-utilized Player->io_lock, since all writes are done with a single call, which POSIX guarantees to be thread-safe. - Add additional safety checks to renderer so that the program doesn't throw nasty errors (segfault) when the renderer has not been properly initialized - Fix bug in read_from_client that referenced the buffer rather than the cursor
- Loading branch information
Showing
21 changed files
with
772 additions
and
252 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.