Tomatoes, match tabs, shared pings, and a round of fixes

- On the results, everyone but the winner splats tomatoes where they
  click (bots aim at the winner), with a new splat sound.
- During a match the menu has the item tabs (choosing when the
  countdown allows, and otherwise levelling the sandbox's levels for
  when you're back), Play (the game's rules) and Settings.
- Pings are shared through the server (protocol 4), so other players'
  connection bars show over their heads and on their windows.
- PvP comes into lobbies with your profile and is saved.
- The choice menu opens by itself however the countdown began.
- Knocked-out fighters keep their buttons current, so Ready on the
  results toggles once per press.
- The weapon wheel wraps both ways. Readying with empty slots plays
  the equip sound for your own fighter.
- Shock Absorber: up to 50% less weapon movement and 33% less
  knockback. Only the catalog previews the next level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-08 18:11:06 -05:00
1 parent cdb0845da2
commit 9a41474069
29 files changed
+295 -79

No files matched your search

+5 -3
View File
@@ -27,7 +27,7 @@
#include <string_view>
#include <type_traits>
constexpr int PROTOCOL_VERSION = 3;
constexpr int PROTOCOL_VERSION = 4;
constexpr int LOBBY_MEMBERS_MAX = 16;
constexpr int LOBBY_CODE_LENGTH = 4;
// Letters only, without I and O, so codes are easy to read out and type.
@@ -49,6 +49,7 @@ constexpr int SERVER_URL_LENGTH = 128;
// PACKET_CHAT Uint16 length, text
// PACKET_TYPING Uint8 isTyping
// PACKET_RENAME Uint16 length, text
// PACKET_PING Uint16 milliseconds this player's round trip to the server
//
// Server to game:
// PACKET_STATE room, tick, state the game this player is in now, as a tick starts
@@ -58,7 +59,7 @@ constexpr int SERVER_URL_LENGTH = 128;
// once the events before them are in, and how early
// (in ticks) this player's last controls came
// PACKET_CHECKSUM room, tick, Uint32 the room's state as that tick starts
// PACKET_CHAT from, Uint16 length, text and the same for typing and renames
// PACKET_CHAT from, Uint16 length, text and the same for typing, renames and pings
enum PacketType : unsigned char
{
PACKET_PROFILE = 1,
@@ -70,7 +71,8 @@ enum PacketType : unsigned char
PACKET_STATE,
PACKET_EVENT,
PACKET_FRAMES,
PACKET_CHECKSUM
PACKET_CHECKSUM,
PACKET_PING
};
// Packets are plain values one after another, as they sit in memory (every platform agrees on these layouts).