- devlab: flagship --debug example (console/snapshot/AI panel/pause/hot reload/error slice), make devlab target with RUN_ARGS support - ai-game: agent-drivable live game + agent_demo.py (pause/read/mutate/ verify/snapshot/restore/screenshot loop) - ai-editor: headless eve mcp editor host demo (JSON View + ViewModel MVVM) - examples: fill all missing READMEs + config.nut, add examples/ index - load.nut: add key_just_pressed/clampf/persist helpers; dedupe 19 examples - rpg/cardgame: move JSON definitions to data files - fix eve mcp crash: ModuleManager::requireAll() instantiates modules in the headless host (IEditorHost etc. were null) - graphics: actionable screenshot error when readback was just enabled - CI: smoke all examples (devlab with --debug) + DevLab hot-reload test Fixes surfaced by the new CI smoke (examples had never been smoke-tested): - scene_director kit: camera slot doubled as function + instance and was nulled by reset(); move the live Camera3D into cameraObj - readTextFile used non-existent readn()/len(); use file.read() (rpg/cardgame/hex-levels) - daynight used non-existent keyboard.wasPressed() -> key_just_pressed - outline passed ints to float-only drawSolidRect; linear-structures slider passed an int value - scene-ecs beginNode() requires (id, name); ai-stage guarded compilestring - smoke_examples.sh: timeout -k 3 so SIGTERM-ignoring hosts cannot hang CI
Building 放置示例
演示 eve.Building():JSON 建筑定义、地形约束、道路邻接、鬼影预览、旋转与拆除。
make run/<platform>-debug GAME=examples/building
# 或
make building
操作
| 输入 | 作用 |
|---|---|
1–5 |
选择建筑(路 / 木屋 / 摊位 / 码头 / L 形仓) |
| 鼠标移动 | 鬼影跟随并吸附到格子 |
R |
旋转鬼影(90°) |
| 左键 | 确认放置(校验通过且金币足够) |
| 右键 | 拆除指针下建筑 |
Space |
重置地图与金币 |
演示要点
- 木屋:2×2,陆地,花费木材/金币
- 摊位:必须邻接带
road标签的建筑 - 码头:只能建在水域格子上
- L 仓:不规则
footprintMask - 鬼影绿色 = 可放,红色 = 失败(HUD 显示 reason)