- 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
729 B
729 B
Basic — 入门示例
引擎能力的最小合集:Tilemap(maps/demo.json)、Box2D 物理、粒子与基础 2D 绘制,
并演示软热重载的写法(eve_init 一次性初始化 + 全局守卫,eve_reload / eve_asset_reload 增量处理)。
运行
make basic
# 等价于:make run/<platform>-debug GAME=examples/basic
目录里的其它玩法
同目录还有两个"替换 main.nut 即可试用"的 UI 变体:
ui_demo.nut:多主机声明式 UI 与深色 / 浅色主题切换。ui_component.nut:eve.UIComponent组件化 UI(HP 条 / 滑块 / 按钮)。
想体验调试器、控制台、快照与 AI 面板,请跑 examples/devlab。