This repository contains the completed code for my Godot 4 Infinite World Generation tutorial. This system is very minimalist but could be expanded for larger-scale projects.
- Infinite procedural world generation
- Chunk-based loading and unloading
- Player-centered world creation
- Camera system with optional map view
- Simple resource distribution algorithm
- Clone or download this repository
- Open the project in Godot 4.x
- Explore the demo scene to see the infinite generation in action
- Check out the code to understand how it works
- Copy the
procedural_generationscene to your project - Add your own tileset to generate with (my example is VERY simple)
- Configure generation parameters in the 'procedural_generation.gd' script
- Adjust the Camera2D settings for your desired view
The system is very minimal, but could be extended with:
- Biome variety
- Different terrain types
- Advanced noise algorithms
- Structure placement
scripts/Player.gd- Player movement and world centeringscripts/Camera2D.gd- Optional map camera functionalityscenes/procedural_generation.tscn- Main world generation scene
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you for downloading this infinite world generation system! I hope it helps out on your game dev journey. If you have any questions or issues - create an issue in this repo or just comment on one of my videos.