From d83452a315d6d3b9f3bebb6e38a2d5d85dbf0d60 Mon Sep 17 00:00:00 2001 From: megaproxy Date: Sun, 12 Jul 2026 18:44:34 +0100 Subject: [PATCH] memory: session 5 arena pass (bigger arena, container walls, player avatar) + MCP gotchas Co-Authored-By: Claude Opus 4.8 (1M context) --- memory.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/memory.md b/memory.md index 54f83b4..76e7e1a 100644 --- a/memory.md +++ b/memory.md @@ -34,6 +34,17 @@ Durable memory for this project. Read at session start, update before session en ## Session log +### 2026-07-12 (session 5 — arena pass: bigger arena + container walls + rigged player avatar) +- **Built out the arena + the first player character.** (1) **Arena → 150×150m** (Ground scale 15, dirt re-tiled to 24× to hold ~6m/tile). (2) **Walls** = `ArenaWalls` (4 invisible BoxCollider physics walls, 4m tall, sealed corners, half-extent 75) + `Junkyard_Walls` (96 cargo containers, 24/side @ 6.25m pitch, from `Assets/Junkyard models/Models/Cargo/Cargo*.obj`, purely decorative — physics is the invisible walls). (3) **Rigged player avatar** — new pack `Hodaart Low Poly Character Collection 3` (humanoid-rigged, Mixamo skeleton, ships Idle/Walk/Run clips + URP mats). `Assets/Prefabs/PlayerCharacter.prefab` = Character 01 + CharacterController + NetworkObject + `OwnerAuthNetworkTransform` + `PlayerAvatar`, Animator w/ humanoid avatar + `PlayerLocomotion.controller` (Idle/Walk/Run 1D blend tree on `Speed`). Registered as `NetworkConfig.PlayerPrefab` (auto-spawn ON again). **Verified in play:** spawns, visible, poses in Idle (rig animates), owner-auth. All committed (`beb17ea`), Hodaart in LFS. +- **DESIGN CONTEXT (from user):** full-game loop = players are these rigged characters; they **run around a timed junkyard gathering scrap to build the bot**, then **drive from player stands** we'll build around the arena. So the avatar (run-around) and the tread controls are SEPARATE systems. ⚠️ **Known tension:** `PlayerAvatar` and `TreadPart` both read WASD — fine now (test avatar without claiming a seat), but the player-stand flow must gate one vs the other. Also: PlayerPrefab is `PlayerCharacter` again, so for a clean **bot-only** test you'd re-clear PlayerPrefab (avatar + tread double-drive on WASD otherwise). +- **KEY MCP GOTCHAS (cost real time this session — heed them):** + - **`execute_code` (CodeDom) references only the LAST SUCCESSFULLY COMPILED `Assembly-CSharp`.** New script types are INVISIBLE to execute_code until the scripts compile **clean** AND the domain reloads. If a script has ANY compile error, Unity keeps the old assembly and execute_code silently can't see your new types (error: "type ... does not exist in namespace"). Workflow: write script → `refresh_unity(force, wait_for_ready)` → **`read_console` for errors** → confirm via reflection probe (`System.Type.GetType("NS.Type, Assembly-CSharp")`) before referencing the type in execute_code. Existing game types (e.g. `Jankenbots.Prototype.SeatManager`) DO resolve in execute_code, so it's not a general limitation — it's the fresh-compile timing. + - **`[DisallowMultipleComponent]` is in `UnityEngine`, not `Unity.Netcode`.** (That typo failed the whole Assembly-CSharp compile → new types vanished → see above.) + - **Prefab editing: use `PrefabUtility.LoadPrefabContents(path)` → mutate → `SaveAsPrefabAsset(root, path)` → `UnloadPrefabContents`.** The `InstantiatePrefab`+unpack+`SaveAsPrefabAsset(instance)` path DROPPED the components I'd added to the instance root — LoadPrefabContents is the reliable editor for an existing prefab asset. + - **Owner-authoritative NetworkTransform** = subclass `NetworkTransform` and `protected override bool OnIsServerAuthoritative() => false;` (right for player avatars; the bot/ball stay server-auth default). + - **`HostGame()` races the async sign-in on Start** — calling it too early throws "player is already signing in". Poll `AuthenticationService.Instance.IsSignedIn` (or just retry) before hosting in a fresh play session. +- **▶ RESUME:** arena + avatar are in. Still owed / next: build **player stands** around the arena (drive-from-stand flow that gates avatar-vs-tread input), swap the grey bot chassis/treads + shove ball for scrap models, and the real 2-human playtest. Screenshots this session confirmed the look (container ring + dirt + character all cohesive). + ### 2026-07-12 (session 4 — M1 build finished: shove ball + follow camera) - **▶ RESUME HERE next session:** the entire M1 build is done (bot drives, shove ball, follow camera — all in `M1_Arena`, all smoke-verified). **The ONE thing left in M1 is the real 2-human friends playtest over Relay** — flip off any `debugAutoDriveFull`, don't rely on scripted proxies, get two actual people each on one tread pushing the ball around. That playtest is the true fun verdict. After it → **M2 = add a hammer** (first weapon). See the "SHOVE BALL + FOLLOW CAMERA" ✅✅✅ block above for every value/gotcha. - Fanned out two Sonnet subagents (camera-script author + ball-networking designer) while MCP was down, then wired both into the scene via MCP once the editor came back. Ball needs no script; camera is `FollowCamera.cs`. Confirmed the control scheme is **forward + steer, no reverse**. 2 commits pushed (`87f929b` camera script, `b21f2d9` scene+ball+material). Unity-6 physics API renames noted in the block above.