Skip to content

Procedural generation algorithms and demos for the Godot game engine

License

Notifications You must be signed in to change notification settings

raistlin/godot-procedural-generation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot Procedural Generation

project banner

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.

➡ Follow us on Twitter and YouTube for free game creation tutorials, tips, and news! Get one of our Godot game creation courses to support our work on Free Software.

Screenshot of a level generated by the Random walker algorithm

Available demos

RandomWalker

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.

Level generated by the Random walker algorithm

WorldMap

This project demonstrates a technique for generating 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.

Generated world map

BasicDungeonGenerator

A basic generator to get started with procedural content generation. Creates rectangular rooms, rooms with organic shapes, and corridors connecting the rooms.

How to use

Clone the repository. Each demo is in a separate directory.

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.

Contributing

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:

  1. Contributor guidelines.
  2. GDScript style guide

Licenses

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/).

About

Procedural generation algorithms and demos for the Godot game engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 92.3%
  • GLSL 7.7%