Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/semibran/dungeon
Seedable roguelike dungeon generator
https://github.com/semibran/dungeon
dungeon generator roguelike
Last synced: 9 days ago
JSON representation
Seedable roguelike dungeon generator
- Host: GitHub
- URL: https://github.com/semibran/dungeon
- Owner: semibran
- License: mit
- Created: 2017-05-11T18:01:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T02:17:26.000Z (over 7 years ago)
- Last Synced: 2024-10-20T13:54:24.986Z (16 days ago)
- Topics: dungeon, generator, roguelike
- Language: JavaScript
- Size: 3.91 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# dungeon
> Seedable roguelike dungeon generator## install
```sh
npm install dungeon
```## usage
```js
const Dungeon = require('dungeon')
```A `Dungeon` is a plain object with the fields `width`, `height`, `rooms`, `mazes`, and `doors`.
See [`test.js`](https://github.com/semibran/dungeon/blob/master/test.js) for a running example.
### `Dungeon`
Generate a `Dungeon` of the specified `width` and `height` with the given [`seed`](https://github.com/semibran/random#seed).
```js
var dungeon = Dungeon(25, 25)(Seed(Math.PI))
```
This function is curried, so you could assign it to a variable and generate multiple dungeons of that specific size later on.
```js
var generate = Dungeon(25, 25)
```## license
MIT