https://github.com/cxong/gomapgen
A 2d map generator written in Go
https://github.com/cxong/gomapgen
ascii go map-generator procedural-generation tiled
Last synced: 3 months ago
JSON representation
A 2d map generator written in Go
- Host: GitHub
- URL: https://github.com/cxong/gomapgen
- Owner: cxong
- License: bsd-2-clause
- Created: 2014-07-30T10:07:30.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T12:06:02.000Z (over 1 year ago)
- Last Synced: 2024-07-02T18:44:11.857Z (over 1 year ago)
- Topics: ascii, go, map-generator, procedural-generation, tiled
- Language: Go
- Size: 6.16 MB
- Stars: 41
- Watchers: 4
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GoMapGen
========A 2d map generator written in Go
$ go run main.go --algo=rogue
Using seed 1512389956399933000
+--------------------------------+
| WWWWWWW WWWW |
| W.....W W..W |
| W.....+## W..W WWWWWWW |
| WWW+WWW ##+..+## W.....W |
| # W..W ###+.....W |
| # W..W WWW+WWW |
| # WW+W # |
| # # # |
| # # # |
| # # # |
| # WW+W ## |
| # W..W # |
| WWW+WWW W..W # |
| W.....W W..W # |
| W.....W ##+.<+### # |
| W.....+## W..W # # |
| W.....W W..W ##### |
| WWW+WWW W..W # |
| ## WW+W # |
| # # # |
|WWWW+WWWW #### ### |
|W.......W # # |
|W.......W # # |
|W.......W # # |
|W.......+### # |
|W.......W WWW+WWW |
|W.......W W.....W |
|WWWWWWWWW W..>..W |
| WWWWWWW |
| |
| |
| |
+--------------------------------+This map generator implements a number of different algorithms and can output to ASCII, CSV and TMX tile map.
See `main.go` for all the options.
## --algo=rogue --width=30 --height=18

## --algo=village

## --algo=shop --width=16 --height=13

## --algo=bspinterior --corridorWidth=2

## --algo=bsp --width=24 --height=20

## --algo=walk --width=16 --height=16 --iterations=500

## --algo=interior --minroomsize=4 --maxroomsize=8 --width=24 --height=24

## --algo=cell --width=24 --height=20 --template=kenney

# Developer Getting Started
1. [Install go](https://golang.org)
2. `go get github.com/cxong/gomapgen`
3. Go to the source location, run `go run main.go`
4. This should create a folder named `tmx_export/`
5. [Install Tiled](https://www.mapeditor.org)
6. Open `tmx_export/map.tmx` in Tiled
7. Look at the generated map!