Period: August 19, 2025 Total Commits: 20
Hey — day two. Short update on what we got working and what still needs love. The headline: you can now place towers on your side, send minions onto the opponent’s side, and the game actually looks and feels like a PvP tower defense match.
What’s New
-
Two-board PvP flow
- Separate boards per team with a simple toggle to view your board vs. the opponent’s.
- HUD now labels the view clearly: “Your Board” or “Opponent Board.”
- Spawn lanes and three castles are visible for both teams.
- Why: clearer mental model for PvP. Defense on yours, offense on theirs.
- [screenshot: separate boards with HUD view indicator at 6657a8b]
- [screenshot: updated castle visuals on both boards at d6f14fc]
-
Minion placement (offense)
- MinionSelector lives bottom-left. Pick a unit, click green spawn tiles on the opponent’s board.
- Placement is validated to spawn areas only; actions go through the chain via the assignSpawn method.
- Why: gives attackers real choices on pressure and pathing without chaos.
- [screenshot: minion selector and spawn tiles (green) at 08b6ee1]
-
Tower placement (defense)
- TowerSelector moved to bottom-right with icons and basic stats.
- Interactive placement with ghost preview, hover hints, and adjacency validation to encourage base-building shapes.
- Why: clarity during high-pressure moments; fewer “why didn’t that place?” moments.
-
Towers came to life
- Re-enabled tower animations. Towers rotate toward targets and fire at their designed rate.
- Attack frames play. Feels much better than static sprites.
- Why: readable combat and better targeting feedback.
- [screenshot: towers rotating and firing during an attack at 08b6ee1]
What Got Fixed
-
Team assignment
- You now see the correct team (A or B). We store your choice in localStorage and read it consistently in the game view.
-
Event parsing and chain quirks
- Fixed a negative block number edge case after chain restarts.
- Cleaned up event parsing using viem’s decodeEventLog to reduce noisy failures.
-
Rendering + UI cleanup
- Separated entity filtering by current view (no more seeing the wrong pieces).
- Renamed assets to be team-neutral and resolved a bunch of TS warnings.
What’s Still Broken (and what we’re watching)
- Visual polish is early. Animations are in, but hit effects and trails are minimal. Readable, not flashy yet.
- Expect occasional UI overlaps in edge cases (rapidly switching views while placing).
- Balance is placeholder. Gold values, tower DPS, and minion HP are first-pass numbers. We’ll start tuning once the end-to-end loop settles.
- Network hiccups can still cause brief visual snaps as the renderer catches up between blocks. The sim stays deterministic; it’s just the interpolation playing catch-up.
Under the Hood
-
Deterministic simulation core
- Fixed-point math (Q16.16), block-based progression, and a 30-second wave timer.
- Entity registry for fast lookups; deterministic ordering and state hashing for verification.
- A* pathfinding with orthogonal movement, path caching, castle retargeting, and win checks when all three castles fall.
-
Rendering foundations
- Three.js orthographic camera over a 32x19 grid with clearly marked spawn zones and castle slots.
- Smooth interpolation between block updates, HP bars for all castles, and a basic victory/defeat overlay.
- Early sprite system using sheet dimensions per tower. We replaced static textures with animated sprites and proper UV handling.
-
Content + contracts
- Switched towers to string IDs in contracts and client to simplify content pipelines and future expansions.
- Action client routes player inputs to the chain with clearer error surfaces and better logging.
Why these changes
- Two boards reduce cognitive load and line up with how players naturally think about offense/defense in PvP.
- String IDs make authoring and adding content less brittle than numeric maps.
- Determinism keeps everyone in sync regardless of local FPS or network burps. If it happened on-chain, it happened in the match.
What’s Next
- Combat clarity: projectile trails, impact flashes, clearer target acquisition indicators.
- First tuning pass on gold income, tower fire rates, and minion costs/HP to reach a stable early-game pacing.
- UI comfort: cleaner tooltips, better placement error messages, and crisper HUD readability.
- Performance profiling on the renderer and pathfinding hotspots during large waves.
- Lobby hardening and reconnect flow so team assignments persist across browser resets without surprises.
Thanks for reading and for all the early feedback. It’s rough, but the core loop is starting to feel like TowerStorm. If you break something, tell us where it cracked. We’ll keep tightening the screws tomorrow.