Skip to content
Back to skills

Procedural Generation

ASecurity

Use when generated maps, rooms or terrain must be reproducible and playable, when some seeds trap players, or when chunk generation order changes the world.

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 23, 2026
developmentgobackend

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned October 23, 2026

npx -y skills add jammyfu/open-game-skills --skill procedural-generation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Procedural Generation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Procedural Generation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jammyfu-procedural-generation/badge)](https://www.skillsdirectory.com/skills/jammyfu-procedural-generation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: procedural-generation
description: Use when generated maps, rooms or terrain must be reproducible and playable, when some seeds trap players, or when chunk generation order changes the world.
---

# Procedural generation

## Scope

Own world construction and validity, not map UI, surface shading or streaming residency. [World map](../world-map/SKILL.md) owns discovered information; [rng-seed](../rng-seed/SKILL.md) owns random streams. Preserve authored areas and player edits. A decoration generator need not become a full world generator.

## Modes

| Mode | Representation |
|---|---|
| room-graph | connected rooms and progression constraints |
| heightfield | single-valued elevation over a plane |
| voxel | volumetric occupancy or density, including caves |
| tile-constraint | local adjacency plus separately validated global goals |

## Procedure

1. Specify the generator/version, configuration hash, seed encoding, units, bounds and player traversal kit. Separate hard validity constraints from visual preferences: safe spawn, reachable exit, prerequisites before locks, required resources and legal return/reset paths. A heightfield cannot represent arbitrary overhangs; choose another representation when required.
2. `rng-seed` owns RNG algorithm/version, named stream derivation and serialized stream state. Request stable streams from that owner using semantic subsystem and global chunk identities; do not derive a second random algorithm here or let request order choose outcomes. This generator stores its versioned recipe plus edit deltas and the RNG stream references/state required for continuation. A seed alone does not guarantee reproducibility across algorithms, versions or physics backends.
3. Generate coarse topology before decoration. Enforce progression-aware reachability, including collected abilities/keys and resource costs where relevant. A geometric flood fill does not prove a key puzzle or a jump is solvable. Validate with the actual movement metrics and collision representation.
4. Sample shared borders in global coordinates, including negative coordinates, and coordinate ownership of boundary objects. Do not independently reseed each chunk edge. Merge authored/player changes by explicit precedence rather than regenerating them away.
5. Bound attempts, time and repair scope. Log the original failing seed/configuration before deterministic repair or a declared fallback. Unsatisfiable tile constraints must terminate with a useful diagnostic; do not silently remove required progression gates to claim success.

## Outputs

Adapt the [generation contract](assets/contract.example.json): recipe and versions, constraints, seed corpus, per-seed diagnostics, edit precedence and repair/fallback record. Keep expensive generation off the critical input path through the engine's supported job system; commit finished data at an owned boundary.

## Acceptance

Re-run saved failures and a stated sampled seed corpus; compare topology/data hashes for the same version/configuration and for different chunk request orders. Test unreachable exits, locked keys, negative coordinates and exhausted retry budgets. Report coverage and failures; sampled success is not proof for every seed. [Cases](assets/evals.json) remain not-run until executed. Runtime reachability needs more than a source review.

## References

[Tiled terrain constraints](https://doc.mapeditor.org/en/stable/manual/terrain/) illustrate local edge/corner matching. They do not establish global puzzle solvability. [Godot RandomNumberGenerator](https://docs.godotengine.org/en/stable/classes/class_randomnumbergenerator.html) documents seed/state behavior; inspect the installed version before promising compatibility.

Files in this skill

  • SKILL.md3.7 KB
  • assets/contract.example.json906 B
  • assets/evals.json1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.