GridForge is a tile-based procedural generation tool that creates endless dungeons and level layouts at runtime or directly in the editor. It’s designed to get you from “empty scene” to “playable level” in seconds, keeping full control over density, shape, and theme.
Perfect for roguelikes, dungeon crawlers, RPGs, survival games or any project that needs infinite procedural layouts. Compatible with Unity 6, 2023.2, 2022.3 LTS, and 2021.3 LTS, it supports both 2D and 3D workflows with minimal setup and works with Built-in, URP, and HDRP.
The package includes prefabs, scripts, randomizers, and demo scenes. The core generation is handled by the
GridForge
component and can be triggered with a single call or via the inspector, giving you a fast iterate-test loop.
GridForge does not require any external packages. It relies exclusively on Unity’s native 2D Sprite and 2D Tilemap Editor systems, ensuring maximum compatibility and zero setup friction.
No third-party dependencies are needed — everything works out of the box. You can extend generation with your own assets, prefabs, or rule-based tiles if desired, but GridForge runs fully standalone.
GridForge is input-agnostic. The generator does not depend on any input system — you can drop it into your project and it will work regardless of how you handle player controls.
In the Example Scenes, some demo character controllers are included (top-down, first-person, etc.) to showcase the generated levels. These controllers use the Old Input System for simplicity, but they are not required to use the asset.
If you want to test the demos with the New Input System, you can either map GridForge’s
generation calls into your own input logic, or enable both input systems under
Project Settings → Player
for quick compatibility.
The heart of the system is the GridForge script. Simply drop it on any GameObject
in your scene and you are ready to generate levels instantly.
By default, demo scenes include a GameManager
that automatically triggers GridForge
generation at startup. However, this is optional — you can call RegenerateLevel()
from
your own scripts whenever you want to refresh or rebuild a dungeon (more infos below).
Project content is organized as follows:
Root folder — contains all tiles, prefabs, and GameObjects used by the Generator scene.
Generator Scene — a clean, raw setup showcasing the procedural tool with no extra dressing.
Example Scenes — additional demos that include relative assets, effects, and props to show how GridForge can be styled in different contexts.
Add a GridForge
component to any GameObject and click Regenerate Level to instantly create a dungeon.
Generation can run at runtime or in the editor via the Inspector Button
, CTRL + G
or via Dropdown
. Use seeds for reproducibility and tweak
parameters live to strike the right balance between structure and chaos.
The Level Dimensions panel lets you configure the fundamental parameters of dungeon generation. These variables define the size, density, and overall structure of the generated layout.
Level Size (X, Y): defines the width and height of the dungeon grid. Larger values create more expansive layouts, while smaller ones result in compact arenas.
Tile Size: sets the scale of each tile in world units. This value adapts automatically whether you use sprites, Tilemaps, or 3D meshes.
Percent To Fill: determines the percentage of the grid that will be occupied by rooms and corridors. Lower percentages create airy, open maps, while higher values result in dense labyrinths.
Spawn Corner Walls: when enabled, walls are generated in level corners to produce more natural boundaries.
Remove Unnatural Walls: removes isolated wall tiles inside open spaces. Enable for cleaner arenas, disable for horror-like, cluttered labyrinths.
GridForge relies on a Drunkard’s Walk algorithm (also known as the “Drunken Walker”). One or more wandering agents, called PathMakers, move across the grid leaving floor tiles behind. Each step can branch, rotate, or terminate, creating organic layouts of rooms and corridors.
Spawn Chance: probability that the current PathMaker will spawn a new one. More PathMakers increase branching and complexity, leading to denser networks of corridors.
Destruction Chance: probability that the PathMaker will be destroyed. Higher values reduce walker lifespans, producing shorter, fragmented paths.
Rotation Chance: overall chance that a PathMaker will change direction at each step.
Rotates Left / Right / Backwards: relative weights that define how a PathMaker rotates when a rotation occurs. For example, a high Backwards value produces tighter, looping structures.
Density: the maximum number of PathMakers alive at the same time. A low density keeps the walk constrained; higher values spawn multiple agents simultaneously, quickly filling the map.
Spawn Chance: probability that the PathMaker will place a chunk instead of a single tile. Chunks accelerate generation and create larger-scale features.
Chance 2×2: likelihood that a 2×2 block of tiles will be spawned when a chunk is placed. This produces medium-sized rooms and wider hallways.
Chance 3×3: likelihood that a 3×3 block will be spawned when a chunk is placed. Useful for generating spacious hubs or arenas in the dungeon.
By adjusting these values, you can fine-tune the balance between long corridors, dense mazes, and open areas, making the algorithm adaptable to different genres (roguelikes, survival maps, RPG dungeons).
GridForge allows you to apply pattern overlays on both floors and walls. Patterns are procedural textures projected on top of the base tiles, useful for adding variety, visual motifs, or gameplay cues (e.g., ritual markings, worn-out zones, or directional hints).
Pattern: choose which generator to apply. Available modes are:
Perlin Noise: produces organic, natural variation ideal for caves or corrupted areas.
Checker: alternating grid tiles, clean and readable for dungeons or labs.
Wide Checker: a checker with a spacing of 2, creating larger alternating blocks.
Line Left: diagonal stripe pattern tilted -45°, adds a sense of direction.
Line Right: diagonal stripe pattern tilted +45°, useful for industrial or sci-fi motifs.
Noise Scale: controls the scale of the Perlin or noise-driven patterns. Higher values produce tighter, denser detail; lower values generate broader, smoother gradients.
Noise Cutoff: sets the threshold for applying the pattern. Values above the cutoff are drawn, values below remain empty. Adjusting this sharpens or softens the result.
In addition to structured patterns, GridForge supports random overlays that place decorative or functional tiles with a simple probability check. This feature is ideal for scattering details like cracks, debris, torches, moss, or any prop that makes a dungeon feel less repetitive and more alive.
Floor Random Overlay — Spawn Chance: defines the probability that a random tile will be placed on the floor. Increase the value to add environmental variation such as stains, clutter, or decorative symbols.
Wall Random Overlay — Spawn Chance: defines the probability that a random tile will be placed on the walls. Useful for adding mood elements like cracks, banners, vines, or lighting props.
The GridForge Spawn panel is the core of the tool — with a single click you decide how the level is generated. Once you select the generation type, simply assign the tiles or prefabs you want to use, and GridForge takes care of the rest.
Generate GameObjects: creates a dungeon made of GameObjects
, ideal for
3D levels or when you want to attach scripts, physics, or VFX to each tile.
Perfect if you need rich interaction with every element of the level.
Generate Grid: outputs a Tilemap Grid
using Unity’s native Tilemap system.
This is the fastest option for 2D workflows, lightweight on performance, and easy to combine with rule-based tiles
for automatic corners and edges.
No Generation: disables automatic spawning, allowing you to fetch tile data via code through GridForge’s getters. This is useful if you want to run your own custom placement logic while still leveraging GridForge’s procedural layout generation. Available getters include:
GetTiles()
: returns all the tiles and their tileType (wall
, floor
, detail
, empty
).
GetOverlayTiles()
: returns all the overlay tiles and their overlayType (empty
, wallPattern
, wallRandom
, floorPattern
, floorRandom
).
GetLevelSize()
: returns the level size.
GetTilesSize()
: returns the tile size.
GetLevelRotation()
: returns the level rotation.
This flexibility lets you switch between workflows instantly — from lightweight 2D tilemaps to fully interactive 3D prefabs — all powered by the same underlying procedural system.
Define the level of detail for the walls and floors tiles, allowing you as much control as possible:
Orientation Drawing: Assign different prefabs depending on how a tile connects to its neighbors (e.g., a floor touching two opposite walls, a single wall, or no walls at all).
Corner Tiles: Ensures visual continuity by drawing dedicated wall tiles at level corners.
Manual Tile Mapping: Provides full control, letting you override automatic placement with custom wall and floor tiles for maximum granularity.
Control which types of overlays GridForge should draw during generation. Each option lets you decide whether to enable it and what assets to use for that layer.
Draw Empty Tiles: Fill unused spaces with a chosen tile or prefab instead of leaving them blank.
Draw Floor Pattern: Enable patterned overlays on floor tiles and specify which assets to apply.
Draw Floor Random: Scatter random overlay tiles across floors for added variation.
Draw Wall Pattern: Apply patterned overlays to walls and define the assets to use.
Draw Wall Random: Place random overlays on walls to break repetition and add details.
GridForge can automatically generate colliders for both 2D and 3D workflows. Different options are available depending on the generation setup you choose.
Create Floor Collider: Generates a single large BoxCollider
across the dungeon floor.
Ideal for 3D levels where you want one continuous walkable surface instead of colliders on every tile.
Floor Collider Height: Defines the vertical thickness of the floor collider. Adjust this if you need more depth for physics or interaction with player controllers.
Create Wall 2D Composite Collider: Builds a composite collider on the walls. This merges multiple segments into a simplified collider shape, improving performance and collision stability in dense 2D tilemaps.
Delete Floor Below Overlay: Removes the floor tile underneath an overlay, useful if the overlay is used as a structural element and not a decoration.
GridForge organizes generated content into separate parent layers (Floor, Wall, Overlay, Empty). The Layer Offset settings let you shift these layers in space relative to their generation axes.
Floor Offset: Moves the entire floor layer up or down along its axis. Useful when you need to align the floor plane with characters or physics controllers.
Wall Offset: Adjusts the position of all wall tiles. This can help prevent z-fighting if walls overlap other geometry, or separate them visually from the floor.
Overlay Offset: Shifts overlays above the base floor or wall to ensure they render cleanly on top. A small positive value avoids flickering between overlay and base tile.
Empty Offset: Moves the “empty” parent layer. This is rarely needed, but can be useful if empty space tiles are used for special effects or triggers.
Level Rotation: Rotates the entire dungeon layout on the chosen axis. For example, use XZ for a top-down grid, or rotate onto XY if you want a side-scrolling layout.
Built-in randomizer scripts add variety without extra code. Use them to swap props, rotate details, and keep scenes from looking repetitive even when seeds or rules are similar.
Spawn Randomizer: Choose one item from a primary list and optionally override with secondary items based on a probability.
Rotation Randomizer: Rotate spawned objects on chosen axes within defined ranges to avoid uniform placement.