lgilders / dungeon-generator-v4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2D Dungeon Generator

This project was bootstrapped with Create React App.

See a live demo here.

Getting Started

Optionally, if you are on the main repository page, press '.' (period) for in-browser IDE.

Otherwise, download the repository via the cmd:

git clone git@github.com:lgilders/dungeon-generator-v4.git

In the project directory via terminal, run:

npm ci

Runs the installation of the app's dependencies.

npm start

Runs the app in development mode. Open http://localhost:3000 to view it in your browser.

The page will reload when you make code changes. You may also see any lint errors in the console.

Making a 2D Dungeon

The app begins with default values provided for the following input options:

  • Map Width
  • Map Height
  • Partition Minimum Width
  • Partition Minimum Height
  • Room Minimum Width
  • Room Minimum Height
  • Seed

Click the Generate a Dungeon! button to see your new dungeon layout.

Note: Partition refers to the space partition / division of the map's size. See the Resources below for details.

Warning: If you provide a series of options that clash, then a default value will be substituted instead.

Resources

Space Partitioning

The binary space partitioning tree implementation follows the algorithm given in the book Procedural Content Generation in Games

JavaScript Binary Tree

The binary tree implementation comes from the work of Angelos Chalaris.

TODO

Thoroughly cover buildRooms and slicePartitions with unit tests.

Convert dungeon display to graphical version using tile sets with controllable orthographic camera.

About


Languages

Language:JavaScript 85.5%Language:CSS 8.1%Language:HTML 6.4%