https://github.com/meshiest/go-dungeon
A dungeon generator written in go
https://github.com/meshiest/go-dungeon
dungeon-generator go golang roguelike-dungeons
Last synced: 10 months ago
JSON representation
A dungeon generator written in go
- Host: GitHub
- URL: https://github.com/meshiest/go-dungeon
- Owner: Meshiest
- License: mit
- Created: 2016-08-05T21:19:47.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-09T21:00:40.000Z (almost 10 years ago)
- Last Synced: 2025-08-14T21:25:32.733Z (11 months ago)
- Topics: dungeon-generator, go, golang, roguelike-dungeons
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 77
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Go Dungeon
This is a simple dungeon generator built in go
To use it, simply `import "github.com/meshiest/go-dungeon/dungeon"` and `go get`
To generate a dungeon, use: `dungeon := dungeon.NewDungeon(size int, numRooms int)` to generate a square dungeon with `size` side length and `numRooms` rooms
To preview a dungeon, you can `dungeon.Print()`, which will demo the dungeon using '#' to denote floor and ' ' to denote wall
To access the grid of a generated dungeon, you can use the `[][]int dungeon.Grid` where `1` denotes floor and `0` denotes wall
Check out *main.go* for an example! (`go run main.go`)
Here is a 100x100 with an attempted 200 rooms:

Here is a 50x50 with an attempted 200 rooms rendered with opengl:
