一键导入
pydartsnut-core
Core pydartsnut integration: Dartsnut instance setup, framebuffer rules, loop guard, dependencies, and run steps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Core pydartsnut integration: Dartsnut instance setup, framebuffer rules, loop guard, dependencies, and run steps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Dartsnut asset manifest, loader-helper, placeholder, and apply-mode workflow for art-bearing entities.
Root conf.json schema, defaults, size rules, preview handling, and reload requirements for Dartsnut projects.
Dartsnut workspace scaffold rules, just-in-time skill loading, file constraints, and emulator verification workflow.
Dartsnut display and framebuffer mapping rules for panels, physical screens, layout, clipping, and fonts.
Legacy Dartsnut runtime index that routes to the granular pydartsnut, conf, display, and asset skills.
Pixel-perfect compact UI guidance for console-style Dartsnut games and widgets.
| name | pydartsnut-core |
| description | Core pydartsnut integration: Dartsnut instance setup, framebuffer rules, loop guard, dependencies, and run steps. |
Load before writing or heavily editing main.py. Type-specific loop details: pydartsnut-widget-loop (widgets) or pydartsnut-game-io (games).
Integration with the Dartsnut machine via pydartsnut — not generic Python apps or pygame demos without machine I/O.
In README or final replies:
conf.json.get_emulator_logs, not assume they can see the UI.cd and python main.py unless they asked for CLI-only steps.bluezero, dbus-python, RPi.GPIO, evdev, etc.).pydartsnut.Dartsnut.main.py imports anything beyond stdlib/local modules, ensure the workspace has a valid pyproject.toml. Emulator and firmware pull dependencies with uv from that file.[project], requires-python = ">=3.11", a dependencies = [...] list, and [tool.uv] package = false.pyproject.toml must include at least the matching default app dependency set listed in the game/widget creator skill, then append app-specific packages.from pydartsnut import DartsnutDartsnut() per process; name it consistently (engine or dartsnut).update_frame_buffer(...) exactly once per main-loop iteration.while dartsnut.runningwhile running and engine.running (also handle pygame.QUIT as needed)pydartsnut.Image sized to conf.json size.Surface — always convert with numpy transpose before pushing:import numpy as np # required — add to imports at top of file
# ... inside main loop, after pygame.display.flip() ...
engine.update_frame_buffer(np.transpose(pygame.surfarray.array3d(screen), (1, 0, 2)))
Warning:
array3d()returns shape(W, H, 3)(column-major). Passing it directly — withoutnp.transpose(..., (1, 0, 2))— swaps rows and columns, producing a corrupted scrolling-noise render. The transpose is mandatory, not optional.
Layout, panels, clipping, fonts on canvas: load dartsnut-display-mapping when needed.
Art slots / manifests: load asset-pipeline when the project has art-bearing entities.