godot-procedural-generation
БесплатноЗапускает вложенные скриптыНе проверенExpert blueprint for procedural content generation (dungeons, terrain, loot, levels) using FastNoiseLite, random walks, BSP trees, Wave Function Collapse, and…
от thedivergentai★ 1 019 звёзд на GitHubОб этом скилле
Procedural Generation
Seeded algorithms, noise functions, and constraint propagation define replayable content generation. Do not paste inline algorithm tutorials — load the MANDATORY scripts below.
NEVER Do in Procedural Generation
- NEVER generate chunks on the Main Thread — Proc-gen is CPU intensive and causes frame-rate spikes. Use
WorkerThreadPoolor a backgroundThreadto keep the UI responsive. - NEVER query
FastNoiseLiteevery frame — Sampling noise per frame (especially in_process) is a massive waste. Generate your map into anImageorArrayonce and sample from memory [NoiseSampling]. - NEVER use
randi()for reproducible seeds — Always store and reuse a specificseedwithin your random number generator (RandomNumberGenerator.new()) to ensure consistent world generation. - NEVER use pure randomness for object placement — Pure random (white noise) causes clumping and overlapping. Use Poisson Disk Sampling or Jittered Grids for natural-looking distributions.
- NEVER forget to bound your loops — Procedural loops (like WFC or Cellular Automata) can easily enter infinite states if constraints are impossible. Always include a
max_iterationssafety break. - NEVER instantiate nodes directly from proc-gen threads — You cannot touch the SceneTree from a worker thread. Generate the data in the thread, then notify the Main Thread to handle
add_child(). - NEVER use complex WFC for simple layouts — Wave Function Collapse is powerful but overkill for simple paths. Use Drunkard's Walk or BSP for lightweight structured layouts.
- NEVER rely on
TileMap.set_cell()for large-scale updates — Updating 10,000 cells individually is slow. Prepare aTileMapPatternand useset_pattern()orset_cells_terrain_connect()for batch updates. - NEVER forget to bake Navigation at the end — Procedurally generated worlds need their navmeshes rebaked at runtime or the AI will walk into walls.
- NEVER ignore data serialization — If you generate a world, you must be able to save the seed and any player modifications. Don't try to save the entire raw chunk state if avoidable.
Golden Path (MANDATORY)
Every generator starts here — seed isolation, async data, main-thread commit:
- Seed & RNG — MANDATORY proc_gen_seed_history.gd: one
RandomNumberGeneratorper level/chunk; persistseed+statefor shareable runs. - Async chunks — MANDATORY multi_threaded_chunk_gen.gd:
WorkerThreadPool.add_task→ compute data off-thread →call_deferred("_finalize_chunk")for SceneTree/node work. - Validate → bake nav — after tiles/meshes land on the main thread, rebake
NavigationRegion(see godot-navigation-pathfinding).
var rng := RandomNumberGenerator.new()
func begin_generation(run_seed: int) -> void:
rng.seed = run_seed
WorkerThreadPool.add_task(_build_data.bind(run_seed))
func _build_data(seed: int) -> Dictionary:
var local_rng := RandomNumberGenerator.new()
local_rng.seed = seed
var noise := FastNoiseLite.new()
noise.seed = seed
return {"heights": noise.get_image(64, 64)}
func _ready() -> void:
# Worker returns here — safe for nodes
pass
func _finalize_from_worker(data: Dictionary) -> void:
# add_child / set_pattern / create_trimesh_collision — main thread only
pass
Do NOT Load the full
scripts/folder. Open only the script that matches your algorithm row below.
Algorithm Decision Tree
| Layout / content need | Algorithm | Script (MANDATORY when chosen) |
|---|---|---|
| Winding tunnels, rivers, simple paths | Drunkard's Walk | MANDATORY drunknard_walk_path.gd |
| Structured rooms + hallways | BSP | MANDATORY bsp_tree_rooms.gd |
| Organic caves / smooth terrain | Cellular Automata (4/5) | MANDATORY cellular_automata_dungeon.gd |
| Heightmaps, biomes, infinite terrain | FastNoiseLite → Image | MANDATORY fast_noise_noise2d_master.gd |
| Trees, rocks, spawns (no clumping) | Poisson Disk | MANDATORY poisson_disk_sampling_2d.gd |
| Tile adjacency / city blocks | Wave Function Collapse | MANDATORY wave_function_collapse_lite.gd (lite) or wfc_level_generator.gd (full rules) |
| Room graph before geometry | AStar graph layout | MANDATORY proc_gen_graph_layout.gd |
| 3D voxel / smooth terrain mesh | Marching Cubes base | MANDATORY [proc_gen_marching_cubes_base.gd](scripts/proc_gen_ |
Установить godot-procedural-generation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл godot-procedural-generation?
Expert blueprint for procedural content generation (dungeons, terrain, loot, levels) using FastNoiseLite, random walks, BSP trees, Wave Function Collapse, and seeded randomization. Use when creating roguelikes, sandbox games, or dynamic content. Keywords procedural, generation, FastNoiseLite, Perlin noise, BSP, drunkard walk, Wave Function Collapse, seeding.
Как установить скилл godot-procedural-generation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-procedural-generation запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic