Raise online play to 16-player lobbies and 8-player games

Lobbies hold 16 players and the sandbox 16 fighters, games up to 8. The arena
gets spawns 5-8 (outer ledges and middle platforms) and the race start eight
places. The sandbox adds eight more spawns, each the open spot farthest from
the rest. Rival cards wrap into rows of four, the lobby's player list goes to
two tiny columns when crowded, and the server keeps frame packets to one
datagram. Formatted with clang-format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-08 02:33:20 -05:00
1 parent 56af1c357c
commit 6003175173
19 files changed
+247 -140

No files matched your search

+11 -2
View File
@@ -1,6 +1,7 @@
#include "match.h"
#include "sim.h"
#include <algorithm>
#include <numeric>
#include <cstring>
constexpr Burst FINISH_BURST = {.gravity = 200, .life = 1, .size = 3, .speed = 240, .count = 40};
@@ -69,6 +70,14 @@ static int level_get(ItemRules& items, int round)
return std::clamp(items.startLevel - 1 + (items.isLevelUp ? round : 0), 0, LEVEL_COUNT - 1);
}
// Fighters start in palette order, played by no one and in no queue.
Match::Match()
{
std::iota(std::begin(colors), std::end(colors), 0);
std::fill(std::begin(owners), std::end(owners), -1);
std::fill(std::begin(queuedIn), std::end(queuedIn), -1);
}
void Match::update(Sim& sim)
{
timer -= TICK;
@@ -752,8 +761,8 @@ void Match::leaves_take(Sim& sim)
sim.cues->sound_play(SOUND_FINISH);
}
// A fighter's loadout, slots and levels as a profile, to bring it back as it was (a name and colour are added by whoever
// knows them).
// A fighter's loadout, slots and levels as a profile, to bring it back as it was (a name and colour are added by
// whoever knows them).
Profile profile_get(Fighter& fighter)
{
Profile profile;