The Procedural Infinite World Generator, or PIWG for short, is a program which simultaneously creates procedurally generated two dimensional landscapes and dynamically loads and unloads sections of the world. These sections, called regions, are uniform partitions of the world which each store an array of individual tiles. The algorithm used for the generation of the tiles within these regions is a derivation of cellular automata, which comes from the popular Conway's Game of Life. Loading and unloading of individual regions is determined by the location of the so-called active region and the load distance around that region. Regions that set to be loaded in are first populated by random noise and then conjoined with the other to-be-loaded regions in order for the cellular automaton to be most effective. Alongside this, the regions which fall out of the load distance are unloaded so that the program remains efficient.
- Download and run the latest release (PIWGv_._.zip) from the releases page.
- Install and compile the program on your own by following the steps below.
- Windows
If you have neither of these, a setup guide can be found on the VSCode website.
Clone or download a ZIP of the program from the main branch.
If you downloaded a ZIP, extract the Procedural-Infinite-World-Generator-main folder.
BearLibTerminal is used for rendering the demo. For more information about the library, visit the BearLibTerminal GitHub.
Go to the BearLibTerminal Website.
- Download the Windows archive
- Extract the folder and locate the Include/ and Windows64/ folders
- From the Include/ folder, find the C/ folder and move BearLibTerminal.h to Procedural-Infinite-World-Generator-main/Demo/BLT/
- From the Windows64/ folder, move BearLibTerminal.lib to Procedural-Infinite-World-Generator-main/Demo/BLT/
- From the same folder, move BearLibTerminal.dll to Procedural-Infinite-World-Generator-main/
- Open the folder Procedural-Infinite-World-Generator-main in Visual Studio Code
- While in Visual Studio Code, press Ctrl + Shift + B to compile the program
- Navigate to where the program was installed, and simply run the PIWGdemo.exe file found in the root folder.
- Open a terminal in the folder containing the executable and run ./PIWGdemo.exe
- Move your Mouse to load in regions around the cursor
- W moves the world north
- A moves the world west
- S moves the world south
- D moves the world east
- The Up Arrow increases the load distance
- The Down Arrow decreases the load distance
- Escape closes the program