gomapgen
gomapgen copied to clipboard
A 2d map generator written in Go
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
- Install go
-
go get github.com/cxong/gomapgen
- Go to the source location, run
go run main.go
- This should create a folder named
tmx_export/
- Install Tiled
- Open
tmx_export/map.tmx
in Tiled - Look at the generated map!