Period: August 20, 2025 Total Commits: 23
Hey all — today was about getting the core PvP loop feeling consistent: waves spawn when they should, minions move smoothly, towers shoot real projectiles, and the sim rewinds/fast-forwards deterministically. Also did a big architecture pass to keep things maintainable as we add content.
What’s New
- Wave spawning is now deterministic and block-timed. The wave timer advances on blockchain blocks, so waves appear every 30 seconds no matter what your client is doing. Fewer surprises, more fairness.
- Minions now use directional sprite sheets with 10-frame animations per direction. Movement picks the right facing and cycles frames smoothly.
- Added the land-drone minion:
- 360 HP, 25 speed, 5 gold bounty
- Full directional animations and selectable in the UI
- Towers now fire visible projectiles:
- Direct and AoE attacks supported
- Projectile spawn offsets match tower rotation
- Proper interpolation and collision
- Spawn assignments now show minion icons on the grid and are visible to both players after placement, with correct board/team routing.
[screenshot: projectiles travelling from towers to targets at d328ad5] [screenshot: animated minions marching with directional sprites at 93b3ddc] [screenshot: minion assignment icons on opponent spawn grid at 142bcb5] [screenshot: land-drone in the selector with stats at 1e24779]
What Got Fixed
- Gameplay and simulation
- Catch-up now simulates all elapsed time: processes blocks in 1s increments so waves spawn, minions move, and towers fire during fast-forward.
- Wave spawning handles multiple waves in one update and includes a safety limit to avoid infinite loops.
- Minion movement/interpolation uses block intervals (no mixing block time and wall clock).
- Pathfinding updated so all spawn areas are walkable for both teams; minions no longer stall at the edge.
- Minion positions are properly centered on tiles (0.5 offset), reducing jitter.
- UI and clarity
- Team color scheme updated: Team A = blue (#4a9eff), Team B = purple (#a855f7). Placement validity remains green/red for clarity.
- Spawn areas now show correct team colors by vantage and swap to green/red only when placing.
- Fixed a falsy check so Team A players correctly get the green placement indicator on the opponent board.
- Removed tinted squares behind spawn icons; proper alpha test, sRGB, and depth settings.
- Towers and targeting
- Fixed Team B tower placement: events now map to the right team and board.
- Introduced 3D tower positioning (team:x,y) to prevent cross-team overwrites.
- Deterministic target selection with tie-breakers: spawnTick → spawnOrder → y → x.
- Rendering and stability
- Z-ordering respects y-axis depth; castles sorted with other entities.
- Fixed hover highlights accumulating; UI groups are cleared per frame.
- Memory leak fixed: geometry/material disposal, shared material tracking, and safe group clearing.
- Reduced log noise; disabled HMR to prevent duplicate ChainReader instances.
- Fixed a renderer reference error by passing the renderer into loadGameData.
[screenshot: correct 2.5D sorting with towers/minions/castles at 255b49d] [screenshot: spawn area colors and indicators updated for both teams at cb385b5]
Under the Hood
- Introduced a full manager architecture:
- TowerManager: placement, lifecycle, team-aware coordinates, targeting/combat loop, self-rendering towers.
- CastleManager: castle damage, targeting, win conditions, and per-view rendering.
- MinionManager: spawning, pathing, damage, and self-rendering minions with their own health bars and damage numbers.
- The sim now loads complete match history from the start block and deterministically replays it, then fast-forwards with timing metrics. This keeps both players synced and makes reconnection sane.
- Rendering got a centralized layer hierarchy and safer resource lifecycle to avoid leaks and flicker.
- Cleaner logs around block processing to help us trace weird deltas during catch-up.
What’s Still Broken (or rough)
- Projectile visuals are placeholder for some bullets (simple shapes). Bullet sprites/VFX are on the list.
- Catch-up on very long matches can still be heavy. We’re improving heuristics where blocks have no events.
- We’re watching for irregular block timestamps that can skew short-term interpolation; safeguards are in but we’ll keep tuning.
- Balance is early. Minion/tower values will move as we get more data from real matches.
Why these changes matter
- Deterministic, block-timed systems keep PvP fair even if a client hiccups or reconnects.
- Manager refactors make it easier to add new towers/minions without touching sim internals.
- Fixes to placement, color, and sorting reduce “why did that happen?” moments during fights.
What’s Next
- Projectile sprite/VFX pass and impact feedback.
- More minion content and early balance rounds (costs, ranges, cooldowns).
- Faster catch-up paths for long-running matches.
- Small UX polish around the wave timer and combat readability.
Thanks for the reports and repro steps—those logs around wave counts helped us zero in on the catch-up edge cases. Keep the feedback coming.