Commit Graph
11 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 6951e16520 Include cstddef for offsetof in the renderer
Older GCC (Debian 12's) doesn't pull it in through other headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:13:47 -05:00
shweetandClaude Opus 5.5 5d6ebf2bba Deal items on ready, /pvp, and calmer rival windows
- Readying in a countdown deals any empty slots at random right away,
  and the countdown reads "Starting..." once everyone is ready.
- /pvp toggles PvP in the sandbox, offline or in a lobby.
- Rival windows sit at half opacity (half again when knocked out, and
  when hovered), show no item tooltips, and drop to small icons past
  two full-size rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:57:11 -05:00
shweetandClaude Opus 5.5 6f112ab231 HUD pass, weapon and trinket rework, and font arrows
HUD:
- Hotbars fit a quarter of the screen, dropping to small then tiny slots
  (thinner outlines when tiny), with cooldown bars matching their size.
- HUD elements are drawn on their own layer and composited at one
  opacity: hotbar slots are see-through until hovered, the rest fade
  while hovered.
- Rival windows fit the right column in at most two rows, shrinking
  icons then font, then dropping icons for name, health and ping bars.
- Tooltips number equipped items' slots and say Recoil for weapons that
  only push back. Previews use arrows, spread uses degrees.
- Crosshair fills in and shakes with charge, and weapons shake after
  firing until their cooldown ends. DPS and speed meters off by default.

Gameplay:
- Dual Wield stacks: each copy fires another recently held weapon from
  a fanned off-hand, at its own level's cut.
- Flamethrower: no slowing, smaller fireball with some recoil, and an
  airblast that knocks others away.
- Iron Weights slam on any landing faster than a plain fall (platforms
  too), stacking radius and damage, and speeding fast falls.
- Stuck arrows are one-way ledges until they fade, matching their
  (slightly larger) hit size. Attacks now collide with slopes.
- Halved Tesla Coil, Recoil Coil, Diazepam, Shock Absorber, Feather and
  screenshake values.

Art and tools:
- Weapon and trinket icons merged into one sheet each (normal, small,
  tiny), cells in catalog order. Grimoire wisps stand upright.
- Fonts gain the degree sign and four arrows, decoded from UTF-8.
- Menu fighter preview walks at quarter speed.
- Unequip from either catalog tab by right click or gamepad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:43:45 -05:00
shweetandClaude Opus 5.5 6003175173 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>
2026-11-08 02:33:20 -05:00
shweetandClaude Opus 5.5 56af1c357c Remove the input delay setting and players being away
Neither does anything with the server running the games. Counting down to play
again moves into the match, so the server and every player agree on it and the
results show it starting again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 02:21:57 -05:00
shweetandClaude Opus 5.5 3b65cb575f Rewrite the online session to play the server's rooms
Session now runs only the room this screen is in. It plays ahead of the server
with its own controls, guesses everyone else's, confirms ticks against the
server's frames and rewinds on a wrong guess. It keeps its lead by playing a
little faster or slower as the server says how early its controls arrive,
resends an edit the server dropped, and checks the server's checksums.

Gone with the peer-to-peer design: the host's decisions, the second arena game,
the view swapping and spectating (to come back through the server).
SAB_NET_STATS logs how it's keeping up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 02:18:53 -05:00
shweetandClaude Opus 5.5 dadfff189d Play over WebRTC to the server
The server answers each player's WebRTC offer (signaled over the socket) with a
connection of its own: frames go on a lossy channel, everything else on a
reliable one, and the socket carries them until both open or where UDP is
blocked. The client's Net now holds one link to the server instead of one per
player. WebRTC takes UDP 47810-47899 by default, set on the command line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 02:09:21 -05:00
shweetandClaude Opus 5.5 655332778c Run lobbies' games on the server
The server now runs every lobby's sandbox and queued games as rooms, stepped at
the tick rate on one thread. Players send controls ahead of time, late ones repeat
their last, and everyone in a room gets back the controls it played, its events
and checksums. Games start from sandbox queues, players return when they leave,
and play-again moves them to a fresh room. Protocol version 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 02:04:36 -05:00
shweetandClaude Opus 5.5 9613e85706 Share online membership and game setup with the server
Profile, member join/leave and building a fresh game move into the sim library,
and the packet reader and writer into protocol.h, so the server can run lobbies
exactly as clients do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 01:54:27 -05:00
shweetandClaude Opus 5.5 465f75f6d7 Split the simulation from presentation into an SDL-free library
Sim holds one whole game (tick, snapshots, checksum) and talks to the screen only
through Cues, which the client's Scene plays and the server ignores. All drawing
moved to scene.cpp. Match takes this screen's wishes as request flags instead of
reading the menu, input and settings. The sim library builds without SDL and the
server links it, ready to run games itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 01:46:07 -05:00
shweetandClaude Opus 5.5 2007fb7edc Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 01:30:33 -05:00