Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

godot-procedural-generation

БесплатноЗапускает вложенные скриптыНе проверен

Expert blueprint for procedural content generation (dungeons, terrain, loot, levels) using FastNoiseLite, random walks, BSP trees, Wave Function Collapse, and…

thedivergentaiот 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 WorkerThreadPool or a background Thread to keep the UI responsive.
  • NEVER query FastNoiseLite every frame — Sampling noise per frame (especially in _process) is a massive waste. Generate your map into an Image or Array once and sample from memory [NoiseSampling].
  • NEVER use randi() for reproducible seeds — Always store and reuse a specific seed within 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_iterations safety 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 a TileMapPattern and use set_pattern() or set_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:

  1. Seed & RNG — MANDATORY proc_gen_seed_history.gd: one RandomNumberGenerator per level/chunk; persist seed + state for shareable runs.
  2. Async chunks — MANDATORY multi_threaded_chunk_gen.gd: WorkerThreadPool.add_task → compute data off-thread → call_deferred("_finalize_chunk") for SceneTree/node work.
  3. 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_
Полный SKILL.md на GitHub

Установить godot-procedural-generation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/algorithm-recipes.mdreferences/migration-notes.mdscripts/bsp_tree_rooms.gdscripts/cellular_automata_dungeon.gdscripts/drunknard_walk_path.gdscripts/dungeon_generator.gdscripts/fast_noise_noise2d_master.gdscripts/l_system_tree_gen.gdscripts/marching_squares_metaballs.gdscripts/mesh_gen_infinite_terrain.gdscripts/multi_threaded_chunk_gen.gdscripts/poisson_disk_sampling_2d.gdscripts/proc_gen_graph_layout.gdscripts/proc_gen_marching_cubes_base.gdscripts/proc_gen_seed_history.gdscripts/wave_function_collapse_lite.gdscripts/wfc_level_generator.gd

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить godot-procedural-generation с