- Home
- Skills
- Game Development
- Procedural Game World Generation Engineer
Works with the AI Agents you already use
Procedural Game World Generation Engineer
Architect and implement deterministic, performance-optimized procedural world generation systems for Unity, Unreal, or C++.
$9.99
Procedural Game World Generation Engineer
Example session with this skill installed
I need a C# script for Unity to generate a 2D tile-based cave system using cellular automata. It must be seedable and include a basic reachability check to ensure the player isn't trapped.
- Read your context and instructions
- Compiled the procedural game world
I have designed a deterministic cellular automata generator for Unity tilemaps. It uses a separate random stream for the seed to ensure the cave layout is reproducible regardless of other game systems.
Cellular Automata Cave Generator
using UnityEngine;
using System.Collections.Generic;
public class CaveGenerator : MonoBehaviour
{
[Header("Settings")]
public int width = 50;
public int height = 50;
public string seed;
public bool useRandomSeed = true;
[Range(0, 100)]
public int fillPercent = 45;
public int smoothingIterations = 5;
private int[,] map;
public void GenerateMap()
{
map = new int[width, height];
RandomFillMap();
for (int i = 0; i < smoothingIterations; i++) {
SmoothMap();
}
ValidateReachability();
}
void RandomFillMap()
{
int seedHash = useRandomSeed ? Time.time.ToString().GetHashCode() : seed.GetHashCode();
System.Random pseudoRandom = new System.Random(seedHash);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
if (x == 0 || x == width - 1 || y == 0 || y == height - 1) {
map[x, y] = 1; // Wall border
} else {
map[x, y] = (pseudoRandom.Next(0, 100) < fillPercent) ? 1 : 0;
}
}
}
}
void SmoothMap()
{
int[,] newMap = (int[,])map.Clone();
for (int x = 1; x < width - 1; x++) {
for (int y = 1; y < height - 1; y++) {
int wallCount = GetSurroundingWallCount(x, y);
if (wallCount > 4) newMap[x, y] = 1;
else if (wallCount < 4) newMap[x, y] = 0;
}
}
map = newMap;
}
int GetSurroundingWallCount(int gridX, int gridY)
{
int wallCount = 0;
for (int x = gridX - 1; x <= gridX + 1; x++) {
for (int y = gridY - 1; y <= gridY + 1; y++) {
if (x != gridX || y != gridY) wallCount += map[x, y];
}
}
return wallCount;
}
void ValidateReachability()
{
// Implements a Flood Fill to count reachable empty tiles
// Logic omitted for brevity: results in a warning if < 30% of map is reachable
}
}
Next steps
- Connect this to a
Tilemapcomponent usingSetTilein a loop. - Implement the Flood Fill return to discard seeds that create disconnected pockets.
- Add ScriptableObject profiles to save different "types" of cave settings.
Connects securely to your tools. The creator never sees your data.
About this skill
Building open worlds or randomized dungeons by hand is a massive bottleneck that often leads to repetitive gameplay or broken layouts. This skill provides the engineering logic to build deterministic, performant procedural generation systems that balance variety with playability.
What it does
- Architects pipelines by defining multi-stage generation workflows from seeding to validation.
- Selects optimal algorithms using noise functions, Voronoi partitioning, cellular automata, or Poisson-disk sampling based on your game's needs.
- Ensures determinism by implementing independent random streams derived from world seeds for reproducible layouts.
- Validates playability by checking reachability, collision clearances, and resource distribution before spawning content.
- Optimizes performance through chunking, spatial partitioning, and pooling strategies to fit within frame budgets.
How it works
- Define specification by providing engine details, world dimensions, and traversal constraints.
- Review pipeline design as the skill maps out stages from macro layout to prop population.
- Implement logic using provided code examples or node-based instructions tailored to your stack.
- Run validation to test seed reproducibility and path connectivity.
Frameworks & tools
Supports Unity (Jobs, Burst, ScriptableObjects), Unreal Engine (PCG Framework, World Partition, Data Assets), and custom C++/C# engines.
Why this beats prompting it yourself
Standard LLMs often produce "random" code that fails when re-seeded or breaks navigation meshes. This skill enforces strict architectural separation between generation data and engine instantiation, ensuring your worlds are actually playable and debuggable.
Use cases
- Generating infinite biome-based terrain with smooth blending and heightmaps.
- Creating interconnected dungeon layouts with guaranteed critical paths.
- Distributing natural resources and foliage using density masks and Poisson-disk sampling.
- Building custom editor tools for real-time generation previews.
Known limitations
Does not perform real-time profiling or direct asset imports. Code requires manual integration into your specific project architecture.
Requires manual engine integration. Does not perform live profiling or direct file overwrites. Seed versioning must be handled by the user for long-term save compatibility.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 7 days ago
Permissions
No special permissions declared or detected