Logo: Godot Procedural

Godot Procedural

Communautéit
EL4CTEO
godot-procedural

Procedural generation in Godot 4.7 - seeded RandomNumberGenerator, FastNoiseLite terrain and biomes, TileMapLayer generation (cellular automata caves, BSP and random-walk dungeons, terrains), wave function collapse, Poisson-disc scattering, weighted loot tables, SurfaceTool/ArrayMesh heightmaps plus HeightMapShape3D, threaded chunk streaming. Use for random levels, terrain or runtime meshes.

Iwwersiicht

EditeurEL4CTEO
Repositorygodot-skills
Skill-Nummgodot-procedural
Stären
60
Forks
6
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    EL4CTEO huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Godot Procedural an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-procedural
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/godot-skills.git /tmp/godot-skills
mkdir -p .claude/skills
cp -r /tmp/godot-skills/skills/godot-procedural .claude/skills/godot-procedural
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Godot Procedural an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Godot Procedural automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Godot Procedural net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Procedural Generation (4.7)

Rules that save you later

  1. Seed everything. Use one RandomNumberGenerator per generator with an explicit seed (rng.seed = hash("my seed") for text seeds). Pass it down; never call global randf() inside generation. Show the seed in a debug overlay and save it with the game.
  2. Data first, nodes last. Generate into arrays (PackedInt32Array, Dictionary[Vector2i, int], PackedFloat32Array), validate, then write to TileMapLayer, GridMap or meshes in one pass.
  3. Validate and retry. Flood-fill or path-check (AStarGrid2D) that the start reaches the exit, enforce min/max room counts, then retry with seed + 1 on failure. Cap the retries.
  4. Threads build data; the main thread touches nodes. Use WorkerThreadPool.add_task() for noise and mesh arrays, then call_deferred to add nodes or set meshes. See godot-performance.
  5. Rebake navigation after the level exists (godot-navigation-ai).

Randomness API

  • RandomNumberGenerator: seed, state (save it to resume a sequence exactly), randi_range, randf_range, randfn(mean, deviation) (gaussian), rand_weighted(PackedFloat32Array) → index (weighted tables).
  • Shuffle reproducibly: Fisher–Yates with your rng. Array.shuffle() and pick_random() use the global generator.
  • Per-cell randomness without stored state: hash the coordinates, e.g. hash(Vector3i(x, y, world_seed)), which is stable across runs and machines.

Noise (FastNoiseLite)

PropertyMeaning
noise_typeTYPE_SIMPLEX_SMOOTH (default, terrain), TYPE_PERLIN, TYPE_CELLULAR (Voronoi: biomes, cracks), TYPE_VALUE
seed, frequencylower frequency = larger features (0.005–0.02 for world maps in tile units)
fractal_type, fractal_octaves, fractal_lacunarity, fractal_gaindetail layers (FBM, 3–6 octaves)
domain_warp_enabled + domain_warp_*organic, swirly coastlines
  • get_noise_2d(x, y)/get_noise_3d return roughly −1..1. Remap with remap() or (n + 1) * 0.5. Batch with get_image(w, h) when you need a whole texture.
  • Biomes: combine two noises (height + moisture, or temperature) and threshold them into a lookup table. Use a different seed for each noise.
  • Shaders and editor previews: NoiseTexture2D (noise, seamless, as_normal_map, color_ramp). It generates on a thread, so await texture.changed before reading its image.

2D tile generation

TechniqueGood for
Noise thresholdsoverworlds, islands, biomes
Cellular automata (4–5 smoothing passes, wall if ≥5 of 8 neighbors are walls)caves
Random walk / drunkard's walkorganic tunnels, guaranteed connectivity
BSP split + rooms + L-shaped corridorsclassic roguelike dungeons
Room templates (prefab scenes/patterns stitched on a grid)Spelunky-style designed variety
Wave function collapsetile-adjacency puzzles, towns. Use the "Wave Function Collapse (WFC)" addon by AlexeyBond (TileMapLayer and GridMap)
  • Writing: set_cell(coords, source_id, atlas_coords). For autotiling, collect cells per terrain and call set_cells_terrain_connect(cells, terrain_set, terrain) once per terrain. It's slow for big maps, so generate per chunk or use direct atlas coords.
  • TileMapLayer.set_pattern() stamps prefab rooms saved as TileMapPatterns.
  • Big maps: chunk them (e.g. 32×32) and generate around the camera. Clear far chunks with erase_cell.

3D generation

  • Heightmap terrain: a grid of vertices from noise → SurfaceTool (set_uv, add_vertex, index(), generate_normals(), generate_tangents() for normal maps) → commit(). Collision: HeightMapShape3D (map_width, map_depth, map_data), which is much cheaper than a trimesh. Scale the CollisionShape3D to match the grid spacing.
  • Fast path: fill PackedVector3Array/PackedInt32Array yourself and call ArrayMesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays). It's several times faster than SurfaceTool for large meshes.
  • Edit existing meshes with MeshDataTool. Debug lines and gizmos: ImmediateMesh.
  • Scatter (trees, rocks, grass): Poisson-disc points → MultiMeshInstance3D (one draw call). Set instance_count after transform_format and mesh. Raycast down or sample the heightmap for Y.
  • Modular dungeons in 3D: generate on a 2D grid, then place GridMap items or instantiate room scenes at Vector3(x, 0, y) * cell_size (godot-3d-gameplay).
  • Large terrain with sculpting and LOD: the Terrain3D addon (godot-addons).

Loot, names, encounters

  • Weighted tables as a Resource (entries: Array[LootEntry] with weight) so designers edit them in the inspector. Roll with rng.rand_weighted(weights).
  • Pity timers and "bags" (shuffle a list of outcomes and draw until it's empty) feel fairer than pure randomness.
  • Markov chains or syllable tables for names. Keep the generated strings out of translation files.

Seeded noise maps, caves, BSP dungeon, Poisson disc, loot table, heightmap terrain and threaded chunks (compiled by the tests): references/patterns.md

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Godot Procedural?

Procedural generation in Godot 4.7 - seeded RandomNumberGenerator, FastNoiseLite terrain and biomes, TileMapLayer generation (cellular automata caves, BSP and random-walk dungeons, terrains), wave function collapse, Poisson-disc scattering, weighted loot tables, SurfaceTool/ArrayMesh heightmaps plus HeightMapShape3D, threaded chunk streaming. Use for random levels, terrain or runtime meshes.

Firwat Godot Procedural op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Godot Procedural besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Godot Procedural an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-procedural an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Godot Procedural benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Godot Procedural benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Godot Procedural domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Godot Procedural gratis?

Jo. EL4CTEO huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇