Monthly post
GOAP/enemy AI
GOAP
-
Codex made more progress on GOAP: better integration with existing enemy systems, better pathfinder usage, better perception, better body ID tracking for different purposes (follow vs shoot that ID, etc.)
Pathfinding improvements -
Line of sight based ability marking for GOAP. Now abilities are marked as line-of-sight-based to influence whether GOAP waits for in line of sight before shooting.
-
Target selection improved for enemies, fixing enemies shooting other enemies for instance
-
Better partial path finding in case too long of a path
Pathfinding
-
Codex pathfinding hystersis so tons of enemies don't cause lag
-
Claude Code made pathfinding on separate thread with navmesh and "greedy squares". It is significantly better than the old pathfinding system.
-
Codex tried to fix lag as server runs due to nav worker claude code had made, but failed.
-
Claude Code fixed determinism in the navmesh pathfinder. This was the bulk effort.
-
Claude Code made navmesh toggleable via Lua testmodule config
-
Claude Code made diagnostics for navmesh to check nondeterminisms with hashes
-
Claude Code fixed backtracking enemies would do: using last known path on repath instead of going straight to target with line between them while waiting for deadline
-
Claude Code tried to fix path to 0,0 for navmesh
-
Claude Code fixed corner cutting thru wall tiny polylines
-
Codex tried to fix hanging nav worker (increasing lag/cv wait) as time goes on
-
Claude Code tried to fix hanging nav worker (increasing lag/cv wait) as time goes on
-
Claude Code tried to fix for 0,0 enemy pathfind again, suceeded this time
-
Claude Code: nav worker doesnt run on client now, saving 1ms
-
Codex git bisect to find pathbranch pathfinding algo nondeterminism, it succeeded and fixed nondeterminism in pathfinding
-
Claude Code failed to fix navmesh path exhausted ramming wall
-
Codex potential fix for another replay v2 non-determinism: cancelling pending async nav requests when the enemy abandons or meaningfully retargets pathfinding
Unit tests
- Claude Code made unit test runner have a retry option if scheduled tests fail
- Codex unit test crash fixes
- Fixed tray staying open more than once for unit test runner
- Claude Code tried fixing unit tests showing assert dialogs still, but failed (Codex later succeeded)
- Made better watchdog timer timeout on unit test runner
- gtest potential exception handling mechanism fix for unit test runner
- Codex fixed unit test runner termination issue
- Claude Code fixed unit test hang in a copying test
- Codex made hibernation/visibility/minimap-visibility integration tests with lots of failures, will need to fix...
- Portal fork replay determinism tests made by Claude Code
- Claude Code debugging fp exception in unit test, found and fixed uninitialized PreApplyImpulse multiplier on test GameSims
- ServerSim/GameSim restart assert fixes and unit tests, including restarts from portals
Netcode
-
m_msgAccclean up so it doesn't leak memory by growing as objects are created -
Codex fixes for true player / spectator checks in koh gamemode: color assignment, etc. not considering spectators
-
Another fix from codex for m_msgAcc buildup over time causing lag
-
Claude Code fix for replay v2 playback showing wrong team colors
-
Claude Code tried to fix for replay v2 playback spectator spawn pos being old one, failed. (Not yet fixed completely.)
-
Claude Code spectator state update fixes
-
Claude Code tried to add resim for spectators, failed. Codex was able to do it instead. It was mostly because Claude Code was "too lazy" to write a resim algo.
-
Codex: made
forceGlobalUpdateFromNowOnaccessible from Lua + use it on CustomObjVar netvar for crown radius so you can see the new crown radius on load in -
Codex to the rescue for Claude Code mess: some fixes for custom global netvar send/recv between serversims on fork
-
Codex portal fork fixes for determinism using a barrier for ticks on portal forks in-progress that has a deadline for loading the fork. If the deadline is reached (worst, unexpected case) then the sims all freeze until the forked sim loads. If loaded early, the deadline becomes the exact tick that the new client enters the target sim (so it can't happen early, for determinism).
-
Fix for ServerSim removal not moving thread ID after its thread stopped
Levels/netcode
Levels
- CustomLevelLoad/AddLevelIdentifiers RPC fixes from Codex
- Rare CallObjCustom RPC desync fixed by Codex
- Fixed collision group creation eventually running out of IDs since it wasn't reusing them when objects were destroyed
Regions
-
Claude Code made navmesh share worldgrid rasterization stuff + region sidecar file
-
Claude Code made basic lighting/fog-of-war "lit" status (incomplete)
Minimap
- Codex implemented minimap hibernation status
Optimization/profiling
- Codex optimized resimulation significantly: IG resim now computes only clusters that contain corrected/forced bodies, caches body templates, and scans joints on bodies instead of walking entire joint list.
- Codex did line light camera culling for lightbuffer-lighting system
- Fixed frame time graph for serversim not showing
- Option to pause the profiler graph
- Codex added more profiling code to gameplayscreen for non-sim-related things
- Codex added more GameSim::update profiling code
- Codex: profiling code for Client::poll improved
UI
- Codex fixed non-lightbuffer-lighting HP bar rendering
- Codex NanoVG HUD bar refactor and side-segmented copy progress UI; indicates copy viability in hover
- Claude Code: Added a stacked HUD block in GameplayScreen that iterates
AbilitySlot::RMBthroughKey4, pulls each slot's ability viashape.getAbilityInSlot, swaps it in withScopedAbilitySwapto get the localized display name (so Lua abilities readingshape.abilityresolve correctly), and draws"<slot>: <name>"rows stacked upward above the existing LMB row. Empty slots andShapeEntityAbilityType_Noneare skipped. - Codex impl for minimap visiblity system -> position updates only sent; impl for no netevents for off-screen (non-visible-set) objects on server too
Replay v2
- Claude Code made replay v2 headless runner initial impl
- Fixed a replay v2 issue where spectator object would not exist
- Claude Code fixed an issue with replay v2 register id divergence detection
- Fix for replay v2 playback bug for >1 player by Codex
Copying
- Claude Code fixed a crash from copying via a replay v2
- Claude Code improved damaged side handling while copying, including no longer discounting on damage; now it keeps progress on what was copied so far despite damage to the target shape while copying. Still having issues with rendering copy progress properly.
- Claude Code made some unit tests for copying
- Codex fixed dangling ShapeSide pointer while copying by making SafeShapeSideHandle
- Made circles use their own collision group so that they don't collide with themselves i.e. if broken apart. This is intended to reduce lag/spazzing.
- Codex fix for how when you copy a circle you get its colgroup but that colgroup makes you not collide with it
- Codex made unverified fix for long-standing "bug": turning into circle being able to put you outside the map if you're up against the wall when it happens. Unverified because I don't know how to test it...
- Codex: made it so that when player becomes some shape, (changes shape,) then it makes the "force left mouse button to release thing" not happen (it should only happen if popping player shape (turning back into noform or anything like that)).
- Codex invincibility trick tweaks for copying: disabled invincibility trick.
- Codex potential fix for crash on circle shape
- Codex potential fix for mass refund rounding incorrectly on copy
Abilities/shapes
-
Energy helper in MP implemented with help from Claude Code
-
Helper loading work before the helper resolved correctly
-
Helper loading work after the magnet helper resolved correctly
The helper loaded properly, as the magnet helper
Decoration system
-
Codex began work on it May 12, roughly continued from the Claude Code plan from 2026-4-26.
-
Sidecar file with
_decorationssuffix by convention is placed inAssets/Lua/decorations, for instanceking_of_the_hill_prototype_level4_decorations.lua. It is referenced from the level file, for instanceAssets/Lua/shapes/king_of_the_hill_prototype_level4.lua. -
Intended to eventually support editor for placing decorations, but for now always uses procedural generation with rules to place SVGs adjacent to others with rules, along walls or as free-standing decor
-
WFC ("wave function collapse")-style solver option, but no backtracking implemented yet (not needed so far)
-
Basic chain option
-
-
Includes player NoForm copy support
-
Is deterministic
-
SVG polygons/elements can be drawn over world shapes, under them, etc. depending on draw layer chosen
-
Crude, unfinished lighting for SVG polygons. Future version needs to consider height of each element too via
ss:heightSVG attributes. -
Corner/topology handling in the Level
-
Codex: Per-element depth in the SVG can be set
-
Codex: hide-underlying render support
-
Codex: Path/stroke support in SVG
-
"Upright" decor style implemented by Codex (a miscommunication made it difficult to get done properly, took several days). This is decor that shouldn't be rotated, only mirrored according to
/vs\wall sections so that it follows their direction, with the art already authored at a diagonal (45 degrees) instead of being unrotated at authoring time. -
Ground tiles with placeholder grass texture
-
Claude Code tries its hand at decor system to make orientation restrictions for modules. It worked.
-
chatgpt file upload "as if codex" patch to add decor default orientation
-
stroke fixes by chatgpt as if codex
-
triangle degen fix by chatgpt as if codex
-
codex made mirror X by default option in decor:
Materials
- Untested material system for SVGs (AO, normal map, etc.). Will work on later.
Decoration authoring for King of the Hill level
- Made diagonal wall for jungle temple ruins theme
- Worked on concept art for walls
King of the Hill gamemode design
-
Plan updated for kill/assist
-
King of the Hill gamemode testing