build-game-map-editor
Skill này làm gì
Skill này hướng dẫn agent xây dựng trình chỉnh sửa trên trình duyệt, nơi nhà thiết kế xem và điều chỉnh bố cục màn chơi của game. Nó dành cho đội làm game muốn một công cụ soạn thảo an toàn, tách biệt khỏi mã nguồn game đang chạy.
Khi nào nên dùng
- ✓Khi nhà thiết kế cần di chuyển hoặc xem kẻ địch, vật phẩm và vùng trong màn chơi.
- ✓Khi bạn muốn xuất một bản nháp chỉnh sửa để xem xét trước khi nó thay đổi game.
- ✓Khi bạn muốn hiển thị trực quan các vùng tuần tra hoặc vùng kích hoạt của kẻ địch trong lúc chỉnh sửa.
Liên kết skill
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-map-editor/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xây dựng trình chỉnh sửa bản đồ cho game của tôi, nơi nhà thiết kế có thể di chuyển kẻ địch và vật phẩm và xuất một bản nháp để xem xét.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc dữ liệu vị trí thật của game, tạo một tài liệu chỉnh sửa từ đó, và cho nhà thiết kế sửa trong một bản nháp riêng. Các bản xuất là đề xuất cần một bước xem xét và phát hành riêng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Fshortcut 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
Câu hỏi thường gặp
Chỉnh sửa ở đây có thay đổi game đang chạy không?
Không. Skill nói xuất ra là một đề xuất, và thay đổi gameplay chỉ xảy ra sau khi được xem xét và phát hành riêng.
Dữ liệu ban đầu lấy từ đâu?
Từ các định nghĩa có sẵn của game, qua các adapter, nên trình chỉnh sửa không có nguồn sự thật riêng.
Nhà thiết kế có hoàn tác được không?
Có. Skill bao gồm hoàn tác, đặt lại và nhập xuất bản nháp cục bộ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 7.2k
- Vị trí xếp hạng
- #13356
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
3d-cloth-material
7.2kGiúp agent của bạn tạo vải dệt 3D trông thật trong Three.js, với sợi dệt, ánh bóng nhẹ, nếp gấp tự nhiên, viền gấu và đường may.
3d-falling-leaves
7.2kGiúp agent của bạn thêm lá rơi chân thực vào cảnh 3D, với lá xoay tròn, trôi theo gió và được tái sử dụng khi máy quay di chuyển.
3d-four-seasons
7.2kGiúp agent của bạn thêm diện mạo xuân, hạ, thu, đông vào cảnh 3D, thay đổi cây cối, ánh sáng, bầu trời và tuyết mà không cần dựng lại cảnh.
3d-high-poly-models
7.2kGiúp agent của bạn dựng mô hình 3D chi tiết với hình dạng mượt và cạnh trông thật, rồi tạo các phiên bản nhẹ hơn chạy tốt trên web.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.