跳到正文
Skillpedia
网站与界面(前端)7.2k · #13356

build-game-map-editor

它能做什么

这个技能指导智能体构建一个网页编辑器,供设计师查看和调整游戏的关卡布局。适合希望拥有一个与线上游戏源码分离的安全起草工具的游戏团队。

适用场景

  • ✓设计师需要移动或检查关卡中的敌人、拾取物和区域的时候。
  • ✓你希望在编辑器草稿改动游戏之前,先导出供审阅的草稿的时候。
  • ✓编辑时需要以视觉方式显示敌人巡逻或仇恨范围的时候。

技能链接

https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-map-editor/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-map-editor/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我的游戏构建一个地图编辑器,让设计师可以移动敌人和拾取物,并导出草稿供审阅。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会读取游戏真实的布局数据,据此创建编辑器文档,并让设计师在单独的草稿中编辑。导出的内容是提案,需要由单独的审阅和发布步骤处理。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Build Game Map Editor

Build a paused director tool around the real game world. Let designers inspect and draft placements quickly while keeping production data, gameplay saves, and release integration explicit.

Establish the authority boundary

Inspect the repository before designing the editor:

  • Locate authoritative world, zone, encounter, spawn, pickup, gate, interactable, and enemy-AI definitions.
  • Locate the production world builder and reusable runtime assets.
  • Locate collision, navigation, flat-plane, persistence, and deployment contracts.
  • Identify the repository-approved browser, tests, release path, and access-control requirements.

Do not create an independent map source of truth. Derive the initial editor document from production definitions through adapters. Keep stable source IDs so every draft value can be traced back to authored code.

State the lifecycle in the UI and implementation:

production source -> editor document -> isolated draft -> validated export -> reviewed source integration

Treat export as a proposal. Do not claim that a draft changes gameplay until a separate integration updates authoritative source, passes gameplay tests, is committed, and is released.

Define a versioned editor document

Use a small serializable document instead of storing Three.js objects or React state.

Include:

  • a fixed schema identifier and document version;
  • a world or level version;
  • a save timestamp;
  • stable entity id, sourceId, kind, label, zone, position, facing, and typed settings;
  • explicit entity kinds such as enemy, player spawn, pickup, interactable, and gate.

Keep editor position data on the gameplay plane. For a flat-world game, use { x, y: 0, z } and reject nonzero Y rather than silently flattening imported data.

Validate at every import and integration boundary:

  • require the exact schema and supported version;
  • cap document size, file size, entity count, coordinates, and setting ranges;
  • reject duplicate IDs, non-finite values, unknown kinds, invalid bounds, and malformed nested settings;
  • require the imported entity manifest to match the current production manifest unless entity creation or deletion is an explicit feature;
  • preserve source IDs and zone ownership through edits.

Keep detailed game-specific adapters and limits outside the reusable editor component.

Render a paused director scene

Reuse the production world builder in a deliberate director or preview mode. Do not run combat, progression, persistence, enemy simulation, or live save mutations inside the editor.

  • Prefer an orthographic top-down camera for isometric or flat-world placement.
  • Render production geometry, canonical entity visuals, and canonical icons when available.
  • Add simple fallbacks when heavy assets fail, but label them as fallbacks.
  • Give each entity one root group, a visible marker, an icon or reference sprite, and a separate invisible selection proxy.
  • Raycast proxies for reliable selection and raycast a fixed ground plane for dragging.
  • Apply transform edits to X, Z, and facing while keeping Y locked.
  • Dispose geometries, materials, textures, renderers, animation frames, observers, and event listeners on teardown.

Keep visual layers independent from editor data. Layer visibility may hide roots and overlays, but it must not delete or rewrite entities.

Make navigation and selection predictable

Provide:

  • click-to-select and select-to-focus;
  • outliner search by label, source ID, and zone;
  • kind layers with visible object counts;
  • fit-all and fit-zone actions;
  • wheel zoom with project-specific limits;
  • middle-, right-, or Space-drag pan;
  • an F shortcut to frame the map;
  • reduced-motion-aware camera focus.

Focus the selected point and zoom in enough to identify it. Never zoom out when focusing an entity the user is already viewing closely. Cancel focus animation when the user starts manual camera input.

Keep pointer gestures atomic:

  • capture the pointer during drag or pan;
  • preserve the entity-to-pointer offset;
  • snap X and Z using the selected increment;
  • update the draft during drag;
  • create one undo entry when the drag ends, not one entry per pointer move;
  • treat a click without movement as selection and focus.

Expose gameplay meaning in the inspector

Show identity, canonical asset path, source ID, zone, position, facing, and source settings for every entity.

For enemies, expose only settings that have a clear gameplay contract:

  • ag
常见问题

在这里编辑会改变线上游戏吗?

不会。技能说明,导出只是提案,只有经过单独的审阅和发布,游戏玩法才会改变。

起始数据从哪里来?

通过适配器来自游戏现有的定义,因此编辑器没有单独的真实来源。

设计师可以撤销更改吗?

可以。技能涵盖撤销、重置以及本地草稿的导入和导出。

详情

作者的原始描述

Build, extend, or audit production-linked browser map editors for Three.js and isometric games. Use when Codex needs to create a private director view, derive a versioned editor document from authored placements, add outliner, layer, selection, drag, snap, inspector, or camera controls, expose enemy aggro, leash, or patrol overlays, implement local draft import, export, undo, and reset, secure an editor route with IP and password sessions, or validate and release a map editor without mutating live gameplay data.

repo: MengTo/Skills

热度

GitHub 星标
7.2k
排名
#13356
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能