Monthly post
Near the end of June, I made, for the first time, multiple feature tracks. These are tasks that are aligned along a "track" to be completed in that repo checkout (with multiple repo checkouts). Modpatch v2.0.0 helped make this possible. So far, one is the Decoration System (also the "master" branch), the other is King of the Hill gameplay. The idea is they are easy to switch between rapidly. I've been spending too much time on the Decoration System, and it can eat up a lot of time because it is very much an "optional" feature, not a "blocking" one. So, the feature tracks allow me to flexibly work on the Decoration System while still getting King of the Hill gameplay design implemented and tested before playtests (which I hope to do soon).
Feature track 1: Decoration System
Unit tests
- Custom assertion failed dialog added by Codex to debug builds; release builds exit with the stack trace and message written to the log file. The custom dialog was added to prevent accidental
akey presses from instantly choosing theAbortoption in the default menu. - Codex made ShapeShiftHeadless have the same assert handling behavior as the unit tests: show it in the console output with a stack trace and exit instead of showing a dialog.
- Codex made unit test runner tray show fail if git has HEAD detached etc.
- Codex fixed portals keeping server shutdown from going thru in unit tests.
- Codex fixed issue in unit tests: client spawning RPC for portals duplicated in soft restarts.
- Codex potential fix for arg quoting required for gtest to stop catching exceptions
- Codex fixed hanging in portal fork unit test in the test runner's single-core affinity
- Codex: fix hibernation visibility stress test pacing
- Codex made unit test exe suppress WER Fault dialog in Windows if it crashes
- Codex made unit test runner auto restart python if pull from git finds that runner py changed
- Codex made unit test rpc debug env var to print more verbose info about RPCs
- Codex made unit test scheduler have run now option on register
- Codex made
--mp-rpc-debug --mp-rpc-debug-verbosefor unit test verbose logging of RPCs. - Codex made unit test runner retry now button keep args
- Codex unit test runner fix: backward stack traces no longer trigger the old immediate 3-second kill.
Portals/level forks
- Hard vs soft restart support for portal forks by Codex: "Add LevelManager-owned restart policy so portal restarts can either hard-reset the whole server or soft-restart one sim while preserving portal forks. Preserve forks through a server/sim-owned portal persistence record, not raw
PortalComponent*or level identifiers. Add a Lua-callable LevelManager transfer API for explicitly moving clients between sims." - Codex made dangling
PortalComponnent*pointer fix for the above change. - Codex fixed self-ref cycles preventing stopped sims from being removed.
- Codex potential fixes for portal fork client <-> server packets
Decoration system
-
ChatGPT-as-if-Codex made endpoint hiding feature for SVGs so that the endcap can be hidden or shown separately as needed from the Lua decor sidecar.
-
Better warning system
-
Codex added solid SVG fill support for decor polygons.
-
Thick wall made longer.
-
New thin diagonal wall made in addition to the thick one.
-
Codex made mipmaps for decor textures
-
Codex automatic cap transition / semantic transition cover for decor. This feature will be disabled later, as it was the wrong idea.
-
Codex made depth for attached decor -- fixed overlap
-
Codex made better info in draw-layer-queued callbacks for debugging
std::bad_function_call -
Codex potential fix for level restart changing decor nondeterministically
-
Codex F10 and shift-F10 depth debug overlay added
-
Codex warning added for penetration (overlap) due to basic chain SVG instance placement
-
Codex fixed penetration in basic chain
-
Codex fixed issue where entire svg could be placed as an endpoint thing/cap
-
Codex ctrl+f10 debug overlay for topology and endpoint classification in levels
-
Codex fixed endcap translation potentially
-
flex_lengthfeature implemented. Allows dynamic SVG instance length based on how much distance has to be covered. The final length is an integer multiple of theflex_length's length along the authored socket axis (the axis fromsocket_starttosocket_end). -
flex_edgefeature by ChatGPT-as-if-Codex. This allows a decor polygon to follow along the flexed axis (theflex_lengthaxis) so it remains at the same relative "authored" distance along the SVG regardless of the resulting flexed length. This is used for endcaps so that as the entire SVG length changes, they move to the new endpoint. So,flex_edges are relative tosocket_startorsocket_end. -
Having issues with Codex's imperfect implementation of
flex_edge/flex_length, possibly due to them being underspecified. -
Codex made toggle for span debug in shift-F10
-
Codex made
flex_extensionexperiment; it was removed -- was the wrong idea. -
Codex trying to fix
flex_lengthalignment and also Q and T position. (T is along the socket axis; Q is perpendicular to it.) -
Codex made some unit tests but they aren't that good/reliable, and since there are issues currently, the tests assume some things to be invariants/good things when really they're not, which causes Codex to confuse "tests pass" with "it works well now" or "tests fail" with "I should revert this exact fix" (which was actually a good fix).
-
Scaled up the SVG; trying to get
lengthMetersto be correct for the level -
Codex made polygon-center decor debug mode for shift-F10
-
Codex debugging sliver polygons/gaps in decor
-
Codex made tags on the draw layer calls; it's an error if the tag is empty
-
Codex wip fixing space between wall and endcap
-
Codex potential fixes for endcap duplication
-
Codex decor system fixes for gaps between transition caps and walls in general + regression fixes
-
Codex fixed empty
std::functionin draw layer: it was due to re-entrant mutation of the draw-layer vector while iterating it. -
Codex trying to fix "plow" shapes generated by Codex in the decor polygons for gap closing code which is not really what should be used anyway.
-
Codex trying to fix decor endcap distortion + face side near overextending + no endcap in some places
-
Codex flex length being wrong fix -- specifically, flex length is ~50px along socket length in the svg, but comes out as ~70px in decor system, causing issues
-
Codex making transition "mask", "cap", and "cover" generation be suppressed since it is not needed, using environment variables. Will remove completely eventually.
-
Codex added gtest target to print shift-F10-like prints/dumps of the current King of the Hill level decor layout.
-
Codex made basic gap detector shift-F10 mode
-
Codex endcap reservation size debugging in shift-F10
-
Codex made another decor system shift-F10 mode for polygon-specific penetration
-
Codex new "bounds excess" shift+F10 mode
-
Codex made
ss:socket_clipfeature for decor. Purpose is to clip geometry to how much space it has been allocated. It will be removed later since it is conceptually not correct. -
Conglomerationclass added for persistent allocations to be made for rapid application development of debugging tools specifically. It allows Codex to add new object allocations for debugging without modifying the header so it can iterate and rebuild faster. -
Codex made a very useful gap annotation system in a new shift-F10 mode. It allows user to inform Codex about what is incorrect in the geometry but doesn't say "how to fix it" necessarily: for instance, "remove extra" to remove extra polygon extension; "close gap" to ensure two edges meet nicely without a gap; "shift this way" to indicate translation of a polygon/element in the SVG; etc.
- Has undo/redo
- Records nearest polygon edge
-
Codex decor system
flex_edgemakes endcap not take up reservation space now. This was a "misconception" Codex had before this change. -
Codex: "the missing-endcap rule now treats a node as an endpoint for a procedural group when exactly one connected chain side can actually receive that group’s repeat modules. So the incompatible horizontal neighbor no longer suppresses the diagonal run’s terminal cap." -- this means that it used to be that, since no asset exists yet for
-wall modules, these were not placed, including next to the/and\modules. This would cause an endncap to be suppressed anyway, treating it as if there was a module there which caused it to leave out the endcap. Now it still emits endcaps in this case. -
Codex resizing main SVG scale to target 47.14px diagonal length
-
Codex trying to fix endcaps appearing offset from where they should be
-
Codex:
flex_edgeis nowss:flex_edge_socket="start|end". This is a better way to mark if it's at start/end socket thanflex_edge. -
Codex potential fix for other things besides endcap marked as flex edge socket being teleported to the endcap instead of relative to original pos in SVG
-
Codex fixing decor system things not extending as far as the other stuff did like
shadow_casterextending further thanface_side_nearto reach socket length -
Codex made
socket_clip_bleedto allow a specified amount of "bleed": polygons extend/extrude/overlap more to accommodate polygon edges that are not flush but should meet. -
Codex:
socket_clipremoved, no longer used;ss:socket_clipis now a fatal authoring error. -
Codex shift+F10 texture "UV" mode: "TextureSeams"
-
Codex: implemented the
ss:texture_phase_space="side_tq"andss:texture_phase_groupsupport, with live art kept untouched. It "lets related surfaces share one side-travel phase, while keeping each surface’s own authored SVG texture orientation/offset."- Codex working on side_tq texture UV fixes by translating by world/T/Q stuff first
-
Codex "TextureGrid" diagnostic mode for decor system shift-F10
-
Codex fixed some seams on repeating tiled UVs
-
Codex made
ss:surface_detail_ofto indicate that the polygon/element should be stretched across what it is a "detail of" if that thing flexes. -
Codex added
ss:texture_phase_mode="flex_edge_seeded" -
Attempted fix for wall diagonal thin: the issue is the shadow_caster gets extended to reach the
socket_start, as expected with flex length. But the SVG itself has it stop a little short before reaching that socket. -
Codex made a new shift+F10 mode to temporarily edit polygon vertices.
- Has undo/redo
- Useful for finding out manually if something is below another by moving its vertices, or to check what it might look like if edited in the SVG to mirror on-screen live changes.
-
Codex: some fixes for SVG hot reload
-
Codex made decor system show shift+F10 mode title on all modes
-
Codex added
ss:flex_boundary_edgeto allow original SVG edge to be preserved onto theflex_lengthinstead of usingflex_length's edge as new SVG polygon edge -
Fixed line in SVG being under wrong parent
-
Codex "visual isolation": disabling a bunch of features via environment var toggles: "endpoint coverage overlap", "repeat seam overlap", "repeat coverage repair", "socket bleed allowance", and "flex seam align reference". The purpose of this is to isolate which features Codex added that are unnecessary to getting UVs and gaps to be correct/fixed.
Tools
Agentic build script
- Codex fixed
buildMS.batpassing params properly with=in them buildMS.batclean target added
Agentic grep script
- Codex made batched
rg-cpptool to search through files that matter in the repo withrg. Batched means it limits the number of arguments passed torgin case it grows too long.
Monotools
- Codex made "monotools" command line program to do replay v2 diffs and more
Modpatch
-
modpatchmigrated to v2.0.0. It is an Emacs module that allows modifying patch files which apply to specific files automatically in Emacs. v2.0.0 allows external changes to auto-reload the patches, and also prevents patches from being duplicated in anelconfig/state file vs on disk, allowing Git commit checkouts to reload the patches in Emacs.
Logging
- Codex made additional logging for RPCs
Levels/netcode
Levels
- Codex potential fix for rare bug (no repro) causing client minimap to sometimes not show despite level requesting it. The fix involved improving the
setMainPlayertrigger/other call site order. - Codex made better trigger logging
Netcode
- Codex fixed Claude Code's broken/unfinished spectator resim system that Claude had given up on
- Codex made
--mp-portcommand line arg; server host fail now prevents running the rest of the server (if port in use) -- it was making infinite RPC sending attempts logs or whatever forscgakaSetCollisionGroupif enet host was null possibly - Codex made finish level setup rpc client desync detection fix
- Codex potential fix for spectator causing
Client: applyStateUpdateSnapshotOverride: shape fallback with nullptrlog spam - Codex fixed crash from
ee::InputManagerbeing retained intoSystemUpdateStructon stack
Replay v2
- Codex added Replay V2 Log event type and logging for
setMainPlayerin replays
Feature track 2: King of the Hill gamemode/gameplay development
Tools
Startup arguments
- Codex made
ShapeShift_STARTUP_MODEand--startup-modeargs
Join launcher
- Codex made "join" project to join hosted game for debugging purposes
Levels/netcode
- Codex made it so client minimap showing will prevent excessive camera zoom-out by default
Netcode
- Codex client with empty username fix