Logo Godot City Game 3d

Godot City Game 3d

Tổ chứcPhổ biến
Leanmcp
godot-city-game-3d

Build, run, debug and ship 3D city games in Godot 4 — procedurally generated cities (block grids, districts, weighted building typologies, MultiMesh batching, facade shaders, terrain, day/night, landmarks), first-person controllers, headless verification, Blender-generated .glb assets, rigged character and animation packs, real OpenStreetMap-derived cities, WebAssembly export, and cloud GPU streaming on GCP. Use this skill whenever the work involves Godot or a .gd/.tscn/.gdshader/project.godot file; whenever someone wants to start, set up, clone onto a new machine, or stand up a 3D game or city generator; whenever they mention procedural city, city generator, block grid, building typology, MultiMesh, facade shader, terrain heightmap, navmesh, Godot export templates, export presets, headless Godot, .glb pipeline, Blender asset generation, character rigs or borrowed animations; and whenever they want to deploy or share a game — web export, SharedArrayBuffer/COOP/COEP, Selkies, pixel streaming, GPU VM, or "let people play this without installing anything." Reach for it even on vague asks like "get this running", "why is my city slow", "my model faces backwards", "make it work on a cloud machine", or "set this up somewhere else too" when a Godot 3D project is in play.

Tổng quan

Nhà phát hànhLeanmcp
Kho mãgateway-skills
Tên kỹ nănggodot-city-game-3d
Sao
2.1K
Bản fork
2.1K
Tệp đi kèm
31
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 31 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Leanmcp công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Godot City Game 3d trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Leanmcp/gateway-skills/tree/main/skills/godot-city-game-3d
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Leanmcp/gateway-skills.git /tmp/gateway-skills
mkdir -p .claude/skills
cp -r /tmp/gateway-skills/skills/godot-city-game-3d .claude/skills/godot-city-game-3d
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Godot City Game 3d trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Godot City Game 3d ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Godot City Game 3d với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Godot city game (3D)

A complete toolkit for procedurally generated 3D city games in Godot 4: scaffold a new one in a minute, stand an existing one up on any machine, and ship it to a browser or a cloud GPU.

Everything here assumes Godot 4.x. Godot 3 differs enough in GDScript, rendering and node API that this guidance does not transfer.

Start here — pick the situation

SituationDo this
Empty directory, want a city gameBootstrap
Existing repo, new machine / fresh cloneSet up an existing project
Something is brokenreferences/troubleshooting.md — symptom-to-cause, read it before debugging from scratch
Changing how the city looks or is builtreferences/city-generation.md
Adding gameplay, worried about structurereferences/architecture.md
Models, Blender, characters, animationsreferences/assets.md
Driving the city from real map datareferences/real-map-data.md
Getting other people playing itreferences/deploy.md
Install details, CI, version pinningreferences/setup.md

Read the reference file rather than reconstructing its content — each one exists because the details in it are the kind that cost hours when guessed.

Bootstrap a new project

bash
python3 scripts/bootstrap_project.py ~/code/my-city --name "My City"

Produces a project that runs immediately: a hilly ~60-block city with batched, window-shaded buildings, box collision, a walkable first-person player, and a workspace/ carrying its own copies of every install/run/check/export/cloud script. Then:

bash
bash ~/code/my-city/workspace/install_godot.sh --templates
time bash ~/code/my-city/workspace/check_project.sh     # headless, proves it builds
bash ~/code/my-city/workspace/run.sh                    # play it

The scaffold is deliberately a working small city rather than an empty skeleton, because its value is the architecture it demonstrates — config as data, one height function, MultiMesh batching, box collision, nothing generated saved into the scene — and an empty skeleton demonstrates none of it.

Copying the scripts into the new repo (rather than referencing this skill) is what makes the result portable: the repo can then stand itself up on another laptop, a CI runner or a cloud VM with nothing else installed.

Set up an existing project

bash
bash workspace/install_godot.sh --templates     # or scripts/install_godot.sh
time bash workspace/check_project.sh
bash workspace/run.sh

Three things make this work identically everywhere, and they are worth preserving in any project touched:

  • Nothing hardcodes a path. lib.sh finds the Godot binary by searching ($GODOT_BIN, PATH, ~/.local/bin, the macOS bundle, /opt/godot) and finds the project by walking up from the working directory looking for project.godot. Override with environment variables, never by editing scripts.
  • --templates matters. Export templates are a separate download that Godot normally fetches through an editor dialog — which does not exist on a headless VM. Skipping this is the single most common reason a cloud or web export fails later, and the error message blames the preset instead.
  • check_project.sh is the real gate. Godot exits 0 even when GDScript throws at runtime, so exit codes prove nothing. The script boots each scene headless and fails on SCRIPT ERROR / Parse Error in the log. Run it before believing anything works, and use it as the CI check.

The scripts

All under scripts/, all safe to copy into a project's workspace/.

ScriptDoes
install_godot.sh [--templates]Godot 4 on macOS/Linux, PATH shim, quarantine fix, export templates
check_project.sh [scenes…]headless import + boot each scene, fail on script/shader errors
run.sh [--editor]play, or open the editor
import_assets.shreimport .glb/textures without the GUI
build_assets.sh [names…]run the Blender gen_*.py generators
ensure_export_presets.pywrite the Web/Linux/macOS/Windows presets the editor would otherwise have to create
export_web.sh [--no-serve]WebAssembly export + a server that sends COOP/COEP
serve_web.pythat server, standalone
bootstrap_project.pyscaffold a new project
cloud/provision_gcp.shGPU VM + firewall + driver/Docker/Selkies setup
cloud/deploy_game.shLinux export, upload, restart the stream
cloud/stop.sh [--status]stop billing (DELETE=1 to remove the disk too)

Every one accepts GODOT_BIN, GODOT_PROJECT and GODOT_VERSION from the environment.

How a city generator is put together

Full detail in references/city-generation.md. The shape:

city_config_<name>.gd   DATA  block sizes, districts, weighted building tables, hills, seed
        ↓ spec()
city_generator.gd       LOGIC loops blocks, places buildings, batches, collides
        ↓ uses
terrain.gd              one height function + the ground mesh derived from it
typology.gd             building kind → shape ranges
facade.gdshader         storeys and windows drawn procedurally on plain boxes
        ↓ emits
PlayerSpawn, EnemySpawns          ← the entire contract the rest of the game needs

Five properties carry the whole design. Preserve them; each one is expensive to retrofit and cheap to keep:

  1. The generator knows nothing about any specific city. A second city is a new data file, not a fork. If adding one required touching the generator, something city-specific has leaked in.
  2. One height function. Ground mesh, its collider, every foundation, every spawn point and every navmesh polygon call terrain.height_at(). Two systems computing ground independently will drift, and drift is what floats buildings above hills and drops players through slopes. It also means swapping analytic hills for a real heightmap is a one-function change.
  3. MultiMesh per typology. ~2,000 buildings cost a handful of draw calls instead of 2,000. Set use_colors/use_custom_data before instance_count — Godot allocates the buffer at that point and silently discards writes to flags enabled afterwards.
  4. Box collision, never trimesh, for anything repeated. Use create_shape_owner / shape_owner_add_shape on one StaticBody3D so there is not even a node per building.
  5. Generated nodes get no owner. Only owned nodes are written into the .tscn, so the scene file stays a few lines, diffs cleanly, and cannot silently disagree with the generator. Tag them with metadata so a rebuild clears exactly what it made.

Determinism is the sixth: seed the RNG from the config so the same seed rebuilds the identical city. Without it you cannot reproduce a bug or judge a change.

The facade trick worth knowing

Plain boxes read as programmer art; windows make them buildings. Lay the window grid out in metres, derived from each instance's real dimensions passed in INSTANCE_CUSTOM, not in UV space. A 12 m house and a 160 m tower then get windows the same physical size instead of the same count stretched to fit — which is the most obvious tell of a procedural city. Suppress windows on top/bottom faces and across the ground-floor band, and light them at night from a hash of (bay, storey, seed) so they do not flicker.

Architecture rules for the rest of the game

Detail in references/architecture.md. In brief:

  • Signals go up, calls go down. The player emits health_changed; the game manager hears it and tells the HUD. The player never touches the HUD.
  • The HUD holds no state. Delete it and the game still runs correctly.
  • Levels hold no logic — geometry plus Marker3D spawn points. This is what lets a generated city be a drop-in replacement for a hand-built level.
  • Contracts stay tiny and duck-typed. "Anything damageable implements take_damage(amount, point)" is the whole interface.
  • Everything tunable is @export. A value you must edit source and relaunch to change is a value nobody will ever tune — and movement feel in particular cannot be judged in the abstract.
  • Physics layers by name: 1 world, 2 player, 3 enemy. Static geometry is layer 1, mask 0 — it moves against nothing, and a default mask makes the physics server test it against everything for free.
  • Register input actions in code (an autoload), so bindings are diffable, survive merges, and work on a fresh clone before anyone opens the editor.

Performance, in the order that actually pays: batch into MultiMesh → box colliders → visibility_range_end → directional_shadow_max_distance → cap the framerate → only then render scale and renderer choice.

Assets

Detail in references/assets.md. Generate models from headless Blender (blender --background --factory-startup --python gen_x.py) rather than hand-modelling: the source is diffable Python in git, assets are parametric, and conventions (metre scale, floor origin, -Y forward, a fixed palette) are enforced by a shared kit.py rather than remembered.

Two things bite everyone:

  • Only glTF's PBR factors survive export — base colour, metallic, roughness, normal, occlusion, emission. Blender procedural node graphs, noise textures and geometry-node shading are silently dropped. Bake to a texture first.
  • Emissive materials glow but do not illuminate. Pair every emissive mesh with a real light node.

Rigged humanoids are the exception: download them, do not generate them. Use one pack for bodies and one for animations that share a rig (Quaternius's Universal Base Characters + Universal Animation Library, both CC0) — mixing sources means bone-mapping every clip by hand. Base packs often ship zero clips, so animations get borrowed at runtime; the load-bearing step is rewriting each track's node path to address the target skeleton, because a mismatch produces a silent T-pose with no error.

Real map data

Detail in references/real-map-data.md. Driving the city from OpenStreetMap replaces the source of the block list, not the renderer — everything downstream is unchanged, which is the payoff for keeping config separate from generator.

The one decision that must be right first: project lat/lon onto a local East-North tangent plane in metres with a frozen origin, mapped as x = east, z = -north, y = elevation. Not UTM, not Web Mercator — Mercator is wrong by the secant of the latitude (~27% at San Francisco), which is the classic way a bake ends up subtly stretched. Bake offline to files; never call a map API at runtime.

The acceptance test for the whole front half of the pipeline is one top-down SVG of the projected data. It either looks like the city or it does not, and it catches axis flips and unit errors that are nearly invisible once the data is inside the engine.

Shipping it

Detail in references/deploy.md. Godot has no built-in pixel streaming; its WebRTC support is for multiplayer networking, which is a common and expensive confusion. Two real paths:

Web export — the default. Runs on the player's machine: ~$0, zero latency, unlimited concurrent players.

bash
bash scripts/export_web.sh

Three things must all be true: export templates installed, a preset named exactly Web (ensure_export_presets.py writes it), and the Compatibility renderer — browsers run WebGL 2 only. Override just the web platform so desktop keeps Forward+:

ini
renderer/rendering_method="forward_plus"
renderer/rendering_method.web="gl_compatibility"

Hosting needs Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp, or SharedArrayBuffer is unavailable and the game silently never boots. python3 -m http.server sends neither; serve_web.py exists solely for those two headers. GitHub Pages cannot set them.

Cloud GPU streaming — when players genuinely cannot run the game.

bash
bash scripts/cloud/provision_gcp.sh     # L4 spot by default
bash scripts/cloud/deploy_game.sh
bash scripts/cloud/stop.sh              # STOP BILLING

~$0.90/hr for an L4 plus egress (12 Mbit/s ≈ 5.4 GB/hr), realistically 3–4 concurrent players — rendering binds long before encoding does. Request the GPU quota first: new GCP projects have a quota of zero and approval takes hours to days.

If the actual motivation is "my laptop runs hot", neither path is the answer — cap the framerate (run/max_fps=60 + vsync roughly halves GPU draw at no latency cost), then cut shadow distance and building draw distance.

Working on someone's existing city project

Before changing generation code, run check_project.sh to establish that it builds, and read the config file rather than the generator — the config is where intent lives. When something looks wrong in-game, check references/troubleshooting.md first; most city-generation symptoms (floating buildings, ribbon streets, stretched windows, ignored instance colours, collapsed framerate) have one specific cause each, and guessing at them is expensive.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Godot City Game 3d làm được gì?

Build, run, debug and ship 3D city games in Godot 4 — procedurally generated cities (block grids, districts, weighted building typologies, MultiMesh batching, facade shaders, terrain, day/night, landmarks), first-person controllers, headless verification, Blender-generated .glb assets, rigged character and animation packs, real OpenStreetMap-derived cities, WebAssembly export, and cloud GPU streaming on GCP. Use this skill whenever the work involves Godot or a .gd/.tscn/.gdshader/project.godot file; whenever someone wants to start, set up, clone onto a new machine, or stand up a 3D game or...

Vì sao nên dùng Godot City Game 3d trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Godot City Game 3d là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Godot City Game 3d trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Leanmcp/gateway-skills/tree/main/skills/godot-city-game-3d. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Godot City Game 3d?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Godot City Game 3d với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Godot City Game 3d với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Godot City Game 3d có miễn phí không?

Có. Kỹ năng này được Leanmcp phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇