شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 1

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها EL4CTEO على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Godot Procedural في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-procedural
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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

فعّل Godot Procedural في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Godot Procedural تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Godot Procedural بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Godot Procedural على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Godot Procedural عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Godot Procedural في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-procedural. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Godot Procedural؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Godot Procedural؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Godot Procedural معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Godot Procedural مجانية؟

نعم. نشرها EL4CTEO على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇