Period: September 4, 2025
Total Commits: 7
Hey — here’s what we shipped today
Short version: TowerStorm now runs on a centralized server instead of the old chain backend. Multiplayer timing and gold accounting are fixed up, the lobby flow is cleaner, and server bots are in. It’s getting steadier.
What’s New
-
Server-based gameplay is live
- The server now handles game state and action validation, and broadcasts updates over WebSocket at 10Hz.
- Client stays focused on rendering and simulation while the server keeps everyone honest.
- Username-only login for now (keeps it simple).
-
Cleaner lobby and team flow
- Added a Join Game list so you can browse open matches.
- Team selection happens inside the lobby after you’ve looked at the match, not on the main menu.
- Creating a game is one click; we auto-seat you on Team A to get you in faster.
-
Bots now connect to the server
- No more keys or chain scaffolding — they spin up as regular server clients.
- Good for quick practice matches and filling empty seats.
-
UI quality-of-life
- Wave numbers and countdown display correctly during resync.
- Player panels show the right gold and income per player.
[screenshot: lobby with Join Game list and team selection inside lobby at 87ffcd9]
[screenshot: multiplayer battle UI showing correct gold and income panels at 1665a92]
What Got Fixed
-
Timing and synchronization
- Using millisecond timestamps across the stack (no silent conversions).
- Replays/resync now process every tick in order, so timers line up properly.
- Wave timer uses server timestamps instead of client guesses.
- Removed assumptions about fixed tick rate in client code.
-
Gold and economy
- Opponent gold now deducts correctly for towers/minions.
- Income properly includes bonuses for all players, not just base income.
- Consistent username usage across server mode so panels and logs match.
- Gold tracked correctly in both live gameplay and replay/resync.
-
Placement and validation
- Team-specific board checks work; each side has its own rules enforced.
- Historical actions during resync are allowed even before a wave starts (so your prep is preserved).
- Entity cleanup is more robust; pathfinding recalculates when it should.
-
UI/UX cleanup
- Game container respects width constraints (no more full-screen stretch).
- Fixed a case where a new game could leave you on a stuck loading screen.
- Player panels and countdowns stay in sync during reconnection/resync.
[screenshot: wave countdown and number during a resync at 1665a92]
What’s Still Broken
-
Reconnect edge cases
- If you lose connection mid-wave, the resync can briefly stutter while it processes history. It recovers, but there’s a momentary hitch.
-
Visual polish during resync
- Because we allow historical actions to apply, you may see quick “catch-up” animations. We’ll smooth this out.
-
Lobby features
- Browsing and joining are solid, but there’s no matchmaking/ratings yet. It’s on the list.
-
Bots
- Functional, not clever. They’re good for reps, but they won’t punish greedy builds yet.
If you hit anything else, send us a note with steps, username, and when it happened. That helps.
Under the Hood
-
Centralized server architecture
- Express + Socket.io for HTTP/WebSocket.
- One worker thread per game instance running a 10Hz loop.
- Redis persistence (port 6381) for sessions and state recovery.
- Action validation includes A* path checks to prevent hard blocks.
- Rate limiting set to 4 actions per player per tick to keep things fair.
- Graceful shutdown and recovery paths are in.
-
Better timekeeping
- Actions and worker messages carry timestamps.
- We initialize blockTimestamp correctly to avoid giant deltas on start.
-
Client adjustments
- New ServerGameView replaces the old chain view.
- Session management via localStorage; routes use gameId.
- ServerGameReader swaps in for the old chain tick reader.
- Lobby code talks WebSocket directly and fetches per-lobby details on demand.
[screenshot: server-based game view during a head-to-head match at e644bd5]
What’s Next
-
Smooth resync
- Faster catch-up and fewer visual pops when reconnecting.
-
Competitive flow
- Basic matchmaking and a first pass of rating once the lobby stabilizes.
-
Bots
- More build variety and better timing so they feel closer to human play.
-
Balance
- Once economy tracking is fully settled, we’ll start tuning income pacing and early tower synergies.
Try It Out
- Head to alpha.towerstorm.com
- Pick a username (no password right now).
- Join a game from the list or create one; choose your team inside the lobby.
- If something feels off, refresh and try again — and please report what happened.
Thanks for sticking with us through the backend flip. It’s simpler now, cheaper to run, and easier for us to iterate on. We’ll keep tightening the screws.