Period: September 11, 2025 Total Commits: 16
Daily Dev Update: Bots Get Smarter, Desyncs Get Louder
Hey. Today was mostly about cleaning up sync issues, teaching the bots better habits, and making sure when things go off the rails, you actually see it. Nothing flashy, but it should make PvP and practice runs feel steadier.
[screenshot: prominent DESYNC overlay with reload button at 661252c]
What’s New
-
Unmissable desync overlay
- When a match desyncs, you’ll see a full-screen “DESYNCED” overlay with a short explanation and a refresh button.
- The old tiny toast was too easy to miss and kept people playing broken states. This is blunt on purpose.
-
Smarter bot decisions with GoldFlow
- Bots now score grid cells based on the gold value of minion pathing and prioritize towers in high-traffic lanes.
- Keeps recalculations efficient with caching and timing logs.
- The idea: practice matches that pressure real choke points instead of random spam.
- Also improved spawn logic: bots fill the rightmost spawn column first, then move left, with some variation inside each column.
[screenshot: bot towers clustered on high-traffic pathing lanes at 068c6f2] [screenshot: minion spawns filling rightmost lane first at ff0c2de]
- Lobby cleanups
- Small client lobby updates to keep sessions fresher and reduce odd stuck states.
[screenshot: updated lobby panel with cleaner ready states at 68637c9]
- Docs/UX touches
- Wiki stats and shortcuts updated: minion and tower values match current config, plus a quick WASD/Q/E/R primer.
What Got Fixed
-
Wave timer determinism
- The first wave’s start timestamp is now only set when unit selections are processed, not on periodic checks.
- Result: consistent start times across clients and no more “my timer says 5, yours says 7.”
-
Desync logs that actually write
- The server now waits for dumps only from players who participated in that sync check. Obvious in hindsight, but it blocked logs from ever saving in partial matches.
-
Level-purchase math and double-charging
- Level increments happen after the action is processed, and the client reads the correct level before computing costs.
- This removes the bad index lookups and the occasional double gold deduction.
- Bots also sync their level from SimCore before buying, so they don’t drift and go negative.
-
Placement/pathfinding parity
- Client checks paths to all castles (even destroyed ones), matching the server.
- Server only validates against towers on the correct team’s board.
- Together, this kills a bunch of “valid placement rejected” false positives.
-
Team type consistency
- Team moved to an enum across server, client, and bots. No more string/number mismatches causing silent failures.
-
Auth recovery
- On invalid tokens, the client clears session state and sends you to login automatically instead of leaving you in a weird half-connected mode.
What’s Still Broken
- We’re still chasing rare edge-case desyncs. The overlay and better logs make them visible and traceable, but it’s not zero yet.
- Bot placement is smarter, not perfect. Expect some odd towers until the GoldFlow scoring gets more map awareness and synergy tuning.
- The rightmost-first spawn rule is good for pressure but might be a bit predictable. We’ll watch match data and add counterplay if needed.
Under the Hood
-
Monitoring and autoscaling
- Bot servers now autoscale from a baseline of 2 and ramp when CPU hits about 80%.
- Cloud dashboards adjusted; added per-instance bot monitoring and Makefile helpers to poke the stack faster.
- Monitor service split into a web UI and an internal API on separate ports with proper health checks.
-
Faster deployment loops
- Update script can target a single service and will walk bot auto-scaling groups cleanly.
- PM2 startup simplified to use standard npm scripts in production mode.
-
Sync check ergonomics
- Minimum 2-player sync checks supported and logged. Less waiting, more signal.
-
GoldFlow perf
- Path scoring uses caching and only recalculates when it matters (placements, spawn updates), so the bots get smarter without tanking tick time.
What’s Next
- Keep burning down sync issues until they’re boring.
- Balance pass on early levels now that costs are accurate. Expect tweaks to income, tower ramp, and synergy spikes.
- More bot work: better counter-building and spacing to avoid over-stacking a single choke.
- UI polish on the lobby and a lighter-weight reconnect flow.
If you’re seeing new desync overlays or weird bot choices, that’s useful data. Drop reports and screenshots. Thanks to everyone who keeps sending reproducibles—makes fixes like today’s wave timer change straightforward.
[screenshot: wave timer and pre-wave ready UI behaving consistently at 9944451]