Godot Proceduralのロゴ

Godot Procedural

コミュニティ
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.

概要

公開者EL4CTEO
リポジトリgodot-skills
スキル名godot-procedural
スター
60
フォーク
6
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    EL4CTEOがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Godot Procedural」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-procedural
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGodot Proceduralを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGodot Proceduralを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Godot Proceduralは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでGodot Proceduralを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Godot Proceduralはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGodot Proceduralをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-proceduralを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Godot Proceduralを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Godot Proceduralで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGodot Proceduralを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Godot Procedural」は無料ですか?

はい。EL4CTEOがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇