Giter Site home page Giter Site logo

bwright257 / procedural-infinite-world-generator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.83 MB

A dynamic 2D world loading system with Cellular Automata-based procedural generation.

License: MIT License

C++ 100.00%
cpp procedural-generation ascii cellular-automaton

procedural-infinite-world-generator's Introduction

Procedural Infinite World Generator

PIWG Fullscreen Generation Sample

How it works

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.

Options

  1. Download and run the latest release (PIWGv_._.zip) from the releases page.

    How to use the PIWG demo.

  2. Install and compile the program on your own by following the steps below.

Installation and Setup

Supported Platforms

  • Windows

Requisites

If you have neither of these, a setup guide can be found on the VSCode website.

Download

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 Setup

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/

Compiling

  1. Open the folder Procedural-Infinite-World-Generator-main in Visual Studio Code
  2. While in Visual Studio Code, press Ctrl + Shift + B to compile the program

How to use the PIWG demo

Options

  • 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

Controls

  • 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

The PIWG Presentation

PIWG GIF

PIWG Small Sample 1

PIWG Small Sample 2

procedural-infinite-world-generator's People

Contributors

bwright257 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.