Two in the same room
MushRog is online now. One person hosts a room from the menu, up to three more join by IP, and everyone fights the same Salamander. When someone pulls off an Overload, the others see the explosion and its name in the corner of the screen.
Why
Phase 1 exists to answer one question: can the combat simulation we built offline become server authority without changing? It can. The code that decides damage, reactions, swaps and dodges is exactly the same. Only the caller changed.
How it works
The server runs the simulation at 20 ticks per second. Players send only intent (move that way, use skill 2, swap), and the server checks range, cooldown and mana, then sends back the room state and that tick’s events. The client simulates nothing online. It keeps a mirror of the state and draws it, interpolating positions between ticks so it doesn’t look stuck.
You can host and play in the same process, or start a headless server for the others to join. The menu has three options: solo, host, join.
The boss gets more health as people join: 1.7x for two, 2.4x for three, 3x for four. The room restarts by itself a few seconds after a win or a loss.
To test it, we put two headless bots on the server. They walk around, cast Spark and check that each one can see the other. That test runs with the rest on every change.
Still missing: login, character creation and the town. For now everyone joins with the default team of Mage and Warrior.
Next step
Login and character creation, so everyone joins with their own team.
Changes
- feat(client,net): online rooms for up to 4 players
Menu with solo, host-and-play and join. Listen host plays as p1; the room resets a few seconds after win or wipe; boss HP scales with the number of players. Client mirrors server state, interpolates between snapshots, renders every team with name and HP, and animates casts from a new cast event. tools/net_test.sh runs a dedicated server with two headless bots. Version 0.0.2.