Godot Procedural Generation
Godot PCG (Procedural Content Generation) is a project to build a series of algorithms and demos to learn about procedural generation. The algorithms are from our course Godot PCG Secrets.
This is an algorithm as seen in Spelunky. This algorithm uses a node that walks randomly on a grid, places hand-designed level chunks, and randomizes them to generate unique levels.
This project demonstrates a technique for generating a world map with biomes and rivers, heavily relying on shaders. It's inspired by Procedurally Generated Wrapping World Maps in Unity C# although it uses a completely different implementation.
A basic generator to get started with procedural content generation. Creates rectangular rooms, rooms with organic shapes, and corridors connecting the rooms.
Procedural or emergent gameplay system where you can stack movement modifiers and different emitters to generate weapons. A game that references techniques like this are Binding of Isaac or Enter the Gungeon.
SpaceInfiniteGeneration/, you'll find four infinite world generation demos. You can travel infinitely with your ship, the world never ends. The first two demos generates worlds full asteroids using white noise and blue noise, respectively.
LayeredWorldGenerator scene shows how to use layered generation to create a universe with planets, moons, trade lanes, and asteroid belts.
PersistentWorldGenerator builds upon the previous demo and adds the ability to make persistent changes to this infinite universe.
How to use
Clone the repository and import the
godot/ directory as a Godot project. Each demo is in a separate sub-directory.
start-project/ directory contains starters for students of our course Godot PCG Secrets and not the complete demos.
In the demos, where relevant, we use a timer to show you the content generation steps, as the final level would otherwise appear instantly. Doing so helps to visualize and debug algorithms. Remove that timer code for the algorithm to run at full speed.
Contributors are welcome!
If you encounter a bug, please open an issue.
If you want to contribute to the project, for instance, by fixing a bug or adding a feature, check out our:
This project is dual-licensed:
- The source code is available under the MIT license.
- Art assets (images, audio files) are CC-By 4.0. You can attribute them to
GDQuest and contributors (https://www.gdquest.com/).