How the game is built

Code review, second pass, evening of 5 Nov. Read only: nothing was run, nothing was fixed. Hover or tap anything.

4 + 3closed + partly closedOf the first pass's findings, 4 are closed and 3 partly. All six bugs got an answer from the workers. Closed by reading the code, not by play. 14new findingsNumbers 48 to 61, on top of the first 47. The full list for the workers is in code-review-2026-11-05.md. 2walls holdThe UI cannot touch the sim, and the world cannot see it. The compiler refuses it. The UI did gain a link to the graphics package, finding 55. 1new risk: Play's mapPlay moved to Mountain hold, and the tools did not move with it. The bridge stays the weak spot in the code itself.

Top ten

1Fix soonPlay's map is one the checks do not watchshift-content + simFinding 48. Play moved to Mountain hold. Its nights live inside that map's file. The content check, the balance page and the bot's default run all still look at First light. So the nights a player really meets are the ones no tool shows. 2Fix soonWhich map goes with which mode: 7 placesshift-worldFinding 49. If Mountain hold fails to load, the game falls back to the first map, which is now the tutorial's map, with no tutorial running. One small table of map names fixes it. 3Fix soonArt id files missing from git, scene rewritten by every buildgame-designFinding 50. Unity keeps each file's id in a small .meta file. About 105 of them are not in git, so a clean copy of the repo invents new ids. The jam repo must be public, so people will clone it. Separately, 3 commits today are only the scene being rewritten by a build, about 150 lines of meaningless changes each. 4Fix soonClip list is a rule held by a commentshift-world + feelFinding 51. A character animation not on the list is left out of the build with no error. The worker's sitting pose nearly fell through. All names match today. One list of names used by everyone stops it for good. 5Fix soonFeel layer has no 'a new run started' signalshift-world + feelFinding 52. Three parts each guess it their own way, for example 'the building is over 12 metres away'. All work today. One signal of about 10 lines replaces the guesses before a fourth arrives. 6Fix soonLink event numbers to the simshift-worldFinding 7, still open. The bridge retypes every event number by hand. Written as a link, the compiler keeps them equal. A few lines, no risk. 7Fix soonOne sim answer, one tripshift-worldFinding 8, still open. Adding one thing to a sim answer means 7 edits, and forgetting one fails silently. The carrier now has 12 fields. 8Fix soonDelete the old sim from the placement toolshift-uiFinding 14, still open. About 250 lines run only with the old 1 metre belts. 24 lines still test for it. 9WatchUI folder now reaches into the renderershift-ui + worldFinding 55. The zoom window for phones makes a world camera inside the UI folder, so the UI now needs the graphics package. It still cannot touch the sim. Move the camera half to World, so the UI can be reused alone. 10WatchWorldGame is growing againshift-worldFinding 57. 1,685 lines, was 1,618. Mountains added about 100. The feel layer took 44 out, which shows the way: looks can live outside it.

Play moved, the tools did not

Players start onMountain holdits nights are in its own file The tools look atFirst lightand the shared waves file content check balance page default bot run

What became of the first pass

Closed2 idsEvery id now goes through SimIds.3 stampThe stamp copies buildings plain.5 hero arrowsOne rule for arrow speed.12 tutorial eventsTutorial.cs reads no events now.
Partly1 ghost sizesRanges come from the sim now. The second reader stays for the rest.4 arrowsThey stick now. Bare numbers remain for damage kinds.6 belt priceThe gap price is right. The UI still cannot see the running half wood.
Open7 eventsNumbers still typed by hand.8 one answerNow 12 fields.9 CopyFromIt took 2 more edits today.14 old sim24 lines still test for it.16 test scripts21 look switches now.17 WorldGame1,685 lines.

Where the trouble sits

BugA real bug starts here. Fix soonWorth a worker's time soon. WatchFine today, will hurt if it grows. GoodHealthy. Keep it this way. NoneDoes not apply.
Class shape Plugging Repeats Numbers in data Tests Next 3 weeks
Sim Core WatchWorld is 4,475 lines over 9 files. Combat alone is 1,214. Fine for now, split after the tutorial. GoodKnows no Unity, no game words. The wall holds. GoodVery little repeated. WatchA few numbers in code, like lightning jump reach 3. GoodTiny fake game, 30 tests, a test that bans game words. GoodNothing here is under pressure.
Sim Game WatchOne long command switch with some rules inside it. Check and Apply share one path, which is the best idea in the sim. WatchTutorial counts events, and the contract says events never drive play. WatchOptions copied field by field, the way StartLevel got lost. Fix soonRift bonus typed twice, projectile speeds and node items in code. WatchMany tests, but files named by date, and 191 checks on bare numbers. WatchThe bot holds 55 content names.
Bridge Fix soonFill is one 250 line method. The catalog builder is 160 lines. Fix soonReaches past State into the sim's insides, and turns blocked into rock itself. Fix soonId copy is gone. Content, events and caps copies remain. Fix soonGhost ranges now come from the sim. The second content reader stays for the rest, with two copies of the row builder. Fix soonStill no tests at all. Fix soonEach new field is still a 7 stop trip. Two touch words today took edits in 6 places.
UI Fix soonPlacement tool: 1,945 lines. Main UI class holds a 570 line test script. WatchStill cannot touch the sim. But it now references the graphics package, for the phone zoom window. Fix soonThree number systems for directions, four ways to word a reason. Fix soonThe default bar holds old prices: merge 8 wood, really 1. WatchThe new tap or aim logic is pure and tested, which is right. The same choice for the building ghost is written again with no test. Fix soonStamp asks 200 questions a frame.
World Fix soonWorldGame: 1,685 lines, growing. The feel folder is 8 small files, which is the shape to copy. GoodReads only the snapshot. The feel layer plugs in through one set of hooks and needed no sim change. WatchId sums are fixed. Damage kinds are still bare numbers, and stall names have a fourth home. WatchFeel names buildings by hand: a new extractor would get a hammer, not a worker. NoneNo automatic tests here. Normal for drawing code. Fix soonEach feel piece needs the run signal and the clip list.
Content GoodPlain files, one per kind, clean. Goodcheck.py proves rates and names. WatchNames and colours also typed in the UI. Wood has two colours. WatchSome keys nothing reads, such as atCap. Fix sooncheck.py proves levels very well. It never reads a map's own waves. Fix soonThe nights of Play are in a map file no tool shows.
Tests WatchA rich sim helper is written 7 times. NoneNot relevant. WatchFake game and stub sim follow their own rules. WatchPrices pinned in tests break when content changes. WatchStrong. Mountain hold's waves are tested, but the bot and the headless run default to First light. WatchBalance work on Mountain hold has no bot sweep behind it yet.

Why the bridge

Sim knows the contentknows the idsknows the events Bridge copy of content copy of ids copy of events copy of caps UI World

Same rule, written many times

Directions and turns10Finding 26. 10 helpers across sim and UI, with 3 numbering systems. North is 0 in one, east is 0 in another. Should be 1 file. Snap to a tile8Finding 25. 8 places. The sim's rule should be the only one. Map for a mode7Finding 49, new. 7 places decide which map a mode starts on. Should be 1 small table. Point inside a shape6Finding 30. 6 copies, 1 never called. Should be 2: one in the sim, one in Unity. Reasons to words4Finding 29. A table plus 3 special cases. Levels added a number hidden inside a word, locked_2. Price rounding4Finding 28. 4 places. The sim should state the price. Socket sides4Finding 27. Content has it for every building now. Stall names4Findings 32 and 54. 4 lists of why a building is quiet, the feel layer's worker is the new one. Node to item3Finding 31. 3 tables, and new nodes in content are ignored. Tap or aim2Finding 56, new. One tested, one written inline for the ghost.

Biggest classes, in lines

World (sim)4,4759 files, first pass count. Big but tidy. Sim (game rules)2,049First pass count. Includes the tutorial. Fine. PlacementTool1,945One class, all build tools share its flags. About 250 lines are dead. WorldGame1,685Up 67 lines since the first pass. Seven jobs in one class. HollowtideUI1,457570 lines are a screenshot test script. Bot1,3994 files, first pass count. Fine. UiGameBridge892Half of it is a second content reader. Feel folder841New. 8 small files, the largest 213 lines. This is the shape to copy. RealSim730One method is 250 lines.

Places to edit to add one thing

New commandsim record > UI class > ToSim > key match > key copy > fake game66 edits today. The tutorial needs 2 new commands. New state fieldState > Fill > field > constructor > CopyFrom > Refresh > UI model77 edits. Today's two touch words took this trip. The enemy road will too. New answer fieldResult > Last field > CheckFull > ApplyExtra > StepOnce > Send > UiResult77 edits today, 3 after finding 8. New buildingcontent > bar row > key > model > tower motion55 edits today, and only the first should be needed. The rest could read content.

What will hurt in the next three weeks

Play's map
Tuning Mountain hold with tools that watch First light.Findings 48 and 49. Teach the check, the balance page and the bot about the map players really start on.
no checkno balance pageno default bot run
Feel keeps growing
Cheap to fix now, with 8 small files.Findings 51, 52 and 54. Each new feel piece pays these again. An extra one file wall keeps it clean, finding 53.
run signalclip listworker or hammer
Enemy road
The real road walks the 7 stop chain.Findings 61 and 9. The comment says only one function changes. The new field still takes the long trip.
7 stopsstand-in crosses the ridge
Bot rebalancing
Names and numbers are typed by hand.A rename breaks the bot. A price change fails tests with no rule broken. Put the names in one table, and read prices from content in tests.
55 names191 pinned numbers

Two questions

1Keep the rebuilt scene out of commits?YesNoEach build rewrites it with no real change.The game scene is built from code on every build, and Unity gives it new random ids each time: about 150 changed lines that mean nothing. Yes: workers commit the scene only when the code that builds it changes. Fewer clashes between sessions. No: it stays as today, 3 such commits since this afternoon. My pick is yes. 2Must every map have an even size?YesNoAll maps are even today.A map 101 tiles wide would put stamps half a tile off. Yes: the content check refuses odd sizes, one line. No: the UI must ask the sim for every snap, a bigger change. My pick is yes.
What this stands on