dsh-game-studio README

项目的 README,来自 github.com/ZSeven-W/dsh-game-studio。合并为一个 markdown 文件:README.md。

DSH Game Studio

DSH Game Studio

Describe a small game in one sentence — play it in the sidebar of a DeepSeek Harness conversation, swap in AI art, export one HTML file.
10 agent tools • live sidebar preview • 2D and 3D voxel templates • OpenAI or Codex art with a cost check first • self-playing playtests • version history • one-file export

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Español · Deutsch · Português · Русский · हिन्दी · Türkçe · ไทย · Tiếng Việt · Bahasa Indonesia

Package: @zseven-w/dsh-game-studio · Current plugin release: 0.1.0-rc.5 · Tested with DSH 0.2.1-rc.5
🎮 Live Demo Game Wall (10 playable 2D & 3D games) · Subscribe in Online Sources: finiking/dsh-games


DSH Game Studio — one sentence, one playable game

A 3D game running in the Game Studio sidebar, with AI art candidates ready to apply

The game plays in the right sidebar while the agent works; numbered AI art candidates wait under it for you to pick

Why DSH Game Studio

Ask the agent for a game in plain words — "a 3D game: a red panda collects bamboo shoots in a forest and dodges wild boars" — and it builds one from a template, plays it to check it works, and shows it in a sidebar you can play right away. Characters start as code-drawn models; when you want real art, the agent generates candidates with OpenAI or your Codex sign-in, you pick one by number, and the game swaps it in. Every change is a version you can go back to, and the finished game exports as a single offline HTML file.

🎮 Playable from the first answer Two templates — a 2D top-down game and the same loop in a 3D voxel world (three.js) — that the agent reshapes into the game you described: characters, rules, levels, screens.
🖥️ Live sidebar preview The game runs in a sandboxed panel next to the conversation, rebuilds on every change, and lists the art slots, candidates and versions under it. Landscape games get a wide stage.
🎨 Your own art, with a cost check first game_studio_generate_asset makes numbered candidates per slot with the OpenAI image API or the local Codex CLI. Before anything is spent you get an approval card with the service, image count and expected cost. A picture you attach in chat can be the reference.
🤖 Self-playing playtests game_studio_playtest plays the latest code in a headless Chrome or Edge and reports phases, score, frame rate, script errors and screenshots. Games that are not steered with arrow keys (grids, cards, aiming, rhythm…) define window.__autoplay, so the playtest plays their real loop.
🕰️ Version history Every build that changed the game is saved; game_studio_restore_version brings back code, rules and art together.
📦 One-file export game_studio_export writes a self-contained HTML file with no network access — open it in any browser or put it on any static host.
📱 Try it on your phone game_studio_share opens a temporary read-only link on your local network — or a temporary public link via a Cloudflare Quick Tunnel (cloudflared) so friends on any network can play — with a QR code in the sidebar.
🌐 Publish to GitHub Pages game_studio_publish pushes the built HTML (or the whole game wall) to a public repository under your signed-in gh account and enables GitHub Pages for a permanent link that stays live after you close your computer.
🗂️ My games Open the sidebar's + and pick Game Studio · My games: every game in the workspace as a tile with its latest playtest picture, filtered by 2D/3D and sorted by recency, versions or name. Click one to play it — no agent, no tokens. You can also subscribe to online game sources (owner/repo, GitHub repository URL, or GitHub Pages URL) to browse and play published games alongside your own. Export wall packs your local games into one offline page to send to friends.

Games made with it

🎮 Try 10 test games live in your browser (desktop or mobile): finiking.github.io/dsh-games/wall — or enter finiking/dsh-games under Online sources in your local Game Wall to subscribe and play them in your sidebar.

Four games from our test runs. Each started from the one sentence under it, in a fresh session (prompts translated from Chinese); later requests in the same session tweaked some of them, as noted. Gameplay is recorded with each game's own autoplay.

Moonlit Fox: Lantern Isle — 3D voxel template, live gameplay

Moonlit Fox: Lantern Isle — 3D voxel template, live gameplay

Make a small game: a little fox collects lanterns in a moonlit forest and dodges thorn monsters.
“Make a small game: a little fox collects lanterns in a moonlit forest and dodges thorn monsters.”
2D template; characters later swapped for picked AI art
Make a 3D game: a little fox collects lanterns on a voxel island and dodges thorn monsters.
“Make a 3D game: a little fox collects lanterns on a voxel island and dodges thorn monsters.”
3D voxel template; the lantern model was redone in a later request
Make a 3D game: a little penguin collects fish on an iceberg and dodges seals.
“Make a 3D game: a little penguin collects fish on an iceberg and dodges seals.”
3D; a later request added the red hat
Make a 3D game: a red panda collects bamboo shoots in a bamboo forest and dodges wild boars.
“Make a 3D game: a red panda collects bamboo shoots in a bamboo forest and dodges wild boars.”
3D; characters later swapped for AI art, the forest stays 3D

How well it works

Measured in a real DSH with DeepSeek-V4.1-Flash, each game made from one sentence in a fresh session, scored by an independent playtest (2026-11-04/05):

Tools

Tool What it does
game_studio_create Create a playable game from the collector (2D) or voxel (3D) template, build it and show it in the sidebar. Takes the title, an art style, orientation (portrait or landscape) and slots — the game's own art slots, named in the user's language.
game_studio_build Rebuild after editing game.json or game.js, refresh the preview and save a version with a short note.
game_studio_playtest Play the latest code headlessly (phone-shaped portrait or 960×540 landscape) and report phases, best score, hearts, fps, errors and screenshots; characters: true returns close-ups of the characters only.
game_studio_generate_asset Generate 1–4 candidate images for one slot with openai or codex, optionally following a reference picture. Asks for approval before spending. Codex runs in the background.
game_studio_apply_asset Put a candidate into the game by its number, rebuild and refresh.
game_studio_revert_asset Go back to a slot's previous art.
game_studio_versions List saved versions, newest first.
game_studio_restore_version Restore an earlier version of the whole game.
game_studio_export Export one self-contained, offline HTML file.
game_studio_share Open (or close) a temporary read-only link on the local network, or pass public: true for a temporary public link via cloudflared so anyone with the link can play.
game_studio_list List the games in the working directory with title, 2D/3D, build state and versions, so the agent finds "the penguin game" by name.
game_studio_export_wall Export the game wall: one offline HTML page with a tile per built game; click a tile to play it.
game_studio_publish Publish the built game (or wall: true for the game wall) to GitHub Pages via the local signed-in gh CLI, or pass remove: true to delete it. Asks for approval first and only writes to repositories carrying its .dsh-game-studio.json marker.

The sidebar's buttons (apply, revert, build, export, restore, share, publish) call the same operations through the /game-studio command.

Image services and spending

Service What it needs Cost Notes
OpenAI (GPT Image) An API key in DSH credentials or the environment (OPENAI_API_KEY by default) Billed per image to your key; the approval card shows an estimate About a minute per batch. openaiBaseUrl accepts an OpenAI-compatible gateway.
Codex CLI Codex installed and signed in (codex login) Counts against your Codex plan; no API key Several minutes per image, runs in the background and reports back when done.

imageProvider: auto (the default) uses OpenAI when its key is set and Codex otherwise. With confirmSpending on (the default) nothing is generated until you approve the card. Sprites are checked for a transparent background and framing and fitted to the slot before they are offered.

Security and privacy

Requirements

Install into DSH

Install from npm into a DSH profile:

dsh plugin --profile web add @zseven-w/dsh-game-studio@latest
dsh web

Quick start

Open a session in a workspace folder and ask, for example:

Then try:

Configuration

Set these under config in your profile's cordis.patch.yml:

Option Default Meaning
imageProvider auto auto, openai or codex.
openaiModel gpt-image-2.5-flare OpenAI image model; pin it so results stay comparable.
openaiBaseUrl OpenAI OpenAI-compatible base URL, e.g. a company gateway.
openaiCredential OPENAI_API_KEY Name of the credential or environment variable holding the key.
codexPath found on PATH or through the login shell Codex CLI executable.
codexModel Codex's default Model for Codex image runs.
codexReasoningEffort low Reasoning effort for Codex image runs.
codexTimeoutMinutes 15 Give up on one Codex image after this long.
confirmSpending true Ask for approval before every generation.
cloudflaredPath found on PATH or Homebrew cloudflared executable for temporary public share links.
ghPath found on PATH or Homebrew GitHub CLI (gh) executable for publishing to GitHub Pages.
githubRepo dsh-games Public GitHub repository name (under your signed-in account) for GitHub Pages.

Game project format

Each game is a plain folder in your workspace:

Development

npm ci
npm run build   # lib/index.js, lib/client.js and the bundled three.js runtime
npm test        # node --test; playtest tests are skipped when no Chrome or Edge is found

Ecosystem

Credits & License

License: MIT

dsh-game-studio (ZSeven-W/dsh-game-studio)

正在搜索数据库…

这是什么?这是 DeepSeek Harness 的一个插件,可以把一句话的游戏描述变成一个小型的可玩游戏。你可以在聊天侧边栏里游玩,可以换入 AI 生成的美术素材,也可以把游戏导出为一个可离线打开的 HTML 文件。
它是独立的游戏引擎,还是其他软件的插件?它是 DeepSeek Harness(DSH)的插件,所以你是在聊天对话中使用它,而不是在单独的游戏编辑器里。智能体工作时,游戏会显示在对话旁边的面板中。
我该如何安装并开始第一个游戏?从 npm 把 @zseven-w/dsh-game-studio 包安装到一个 DSH 配置文件中。然后在工作区文件夹里打开一个会话,用一句话描述你想要的游戏,例如厨房里一只小猫偷吃鱼干。
除了 DSH,我还需要什么?DSH 0.2.1 或更高版本,以及 Node.js 24.11 或更高版本。试玩测试还需要同一台电脑上安装 Chrome 或 Edge。要使用 AI 生成美术,需要有 OpenAI API 密钥,或者已登录的 Codex CLI;两者都没有的话,游戏仍然可以运行,只是角色由代码绘制。
它每次都能一次做出可玩的游戏吗?收集和躲避类游戏在全部 10 次测试中都能一次做出可玩的版本,每个游戏的中位耗时约 14 分钟。三消、平台跳跃等其他类型的游戏也都可以玩,但中位耗时约 26 分钟,而且样本量较小。
导出的游戏能离线运行吗?可以。导出会生成一个独立的 HTML 文件,不发出任何网络请求,因此可以在任何浏览器中打开,也可以部署到静态托管服务上。
有哪些内容会离开我的电脑?只有你的提示词,以及你附加的任何参考图片,会发送到你选择的图像服务。游戏在一个沙箱 iframe 中运行,该 iframe 会阻止网络访问;导出的文件不发出任何网络请求。
我能使用自己的美术素材,而不是 AI 生成的吗?可以。你可以直接在某个素材槽位的文件上绘制,工作室会将其记录为你的修改。你在聊天中附加的图片也可以作为 AI 生成的参考。
它从哪些游戏模板开始?有一个 2D 俯视角收集类模板,以及使用 three.js 构建的 3D 体素世界中的同样玩法。智能体会把这两个模板中的任一个改造成你描述的游戏,包括角色、规则、关卡和界面。
它能自己测试游戏吗?可以。gamestudioplaytest 工具会在无头模式的 Chrome 或 Edge 中运行最新代码,并报告阶段、最高分、帧率、脚本错误和截图。每次修改游戏的构建都会保存为一个版本,你可以随时恢复。
作者
ZSeven-W
大小
9 MB
星标
575
更新
提交Nov 09
时长
13天
提交 · 90 天