Period: August 28, 2025 Total Commits: 8
Daily Dev Update: Deterministic Sync & Aura Glows
Quick one today. We focused on two things: making the simulation deterministic (so resyncs don’t shuffle your match) and improving how events confirm for high-latency players. Also added a clean visual for damage-boost auras and tidied up the build.
What’s New
- New Aura Glow for damage-boosted towers
- Added a dedicated AuraGlow entity and a lightweight Effect type for clean rendering.
- Smooth red gradient that pulses, shared texture for performance.
- Proper team filtering: damage boosters now only buff same-team towers.
- Hooks into tower placement/removal so glows appear and disappear predictably.
[screenshot: red aura glow around boosted towers at df31f44]
[screenshot: boosted tower cluster pulsing glow during a wave at df31f44]
What Got Fixed
-
Deterministic simulation and resync
- Replaced timestamp-based tower IDs with a deterministic blockNumber scheme.
- Consistent spawn ordering for towers and minions across clients.
- Removed all Math.random() usage from the simulation.
-
High-latency event flow
- Direct event subscriptions with retries and transaction tracking to prevent “temp” entities from lingering.
- Duplicate block handling and better event matching via transaction hash fallback.
-
Castle HP now respects config
- Uses MATCH_CONFIG.CASTLE_HP (20) instead of the old 1000 hardcode. Clearer pacing and earlier finishes for aggressive pushes.
-
Build stability
- Cleaned up deprecated aura code paths.
- Fixed TypeScript errors (unused vars/imports, missing status props, etc.).
- Corpse exploder now tracks exploded corpses correctly to avoid double pops.
[screenshot: multiplayer battle with synchronized spawns after resync at b39a5c0]
What’s Still Broken
- We’re watching for edge-case desyncs under weird event ordering or packet loss. If you see units flicker or disappear during replay/resync, let us know what was happening on screen.
- Aura glow performance should be fine, but very large clustered builds might cause minor GPU spikes. We’ll profile bigger matches.
- No balance tuning in this pass. Damage booster visuals are in; number tweaks are coming later.
Under the Hood
-
Deterministic IDs and order
- Tower IDs now derive from blockNumber; towers spawn by (blockNumber * 1,000,000) + logIndex.
- Minions spawn by wave and grid: (waveNumber * 10,000) + (y * 100) + x.
- Why: ensures every client builds the exact same world state during resync, regardless of CPU speed or event arrival timing.
-
Event sync for high-latency players
- watchContractEvent with 500ms polling and a retry/backoff system (up to 10 retries, 1s delay).
- Track pending transactions across the entire pipeline and wait for expected events before processing blocks.
- Reduced block batching delay from 100ms to 10ms now that retries are reliable.
- Result: temp towers/minions are properly cleared the moment confirmations arrive, even if your connection is far from the server.
-
Cleaner rendering path
- Split effects from sprite-based VFX.
- Shared static glow texture saves memory and cuts draw overhead.
- Works in both instanced and non-instanced modes.
[screenshot: wave start with stable aura visuals and unit spawns at 57cb38c]
What’s Next
- Stress-test deterministic resync in longer PvP matches and replays.
- Profile aura glow clusters and cull when off-screen.
- Start on matchmaking and early PvP balance passes (damage booster numbers, stack rules).
- Bot practice improvements are on deck after sync stability holds.
Try It Out
We’ve fixed a few issues with the alpha server. If you want to help hammer on the new sync path (especially if you’re far from the server), jump in:
- alpha.towerstorm.com
If you hit weird confirmations or lingering “temp” units, a short clip and your approximate ping helps a lot. Thanks for all the reports—keep them coming.