This is a tool to generate map files for OpenFront.
- Install go https://go.dev/doc/install
- Install dependencies:
go mod download
- Run the generator:
go run .
- Create a new folder in assets/maps/<map_name>
- Create image.png
- Create info.json with name and countries
- Add the map name in main.go
- Run the generator:
go run .
- Find the output folder at generated/maps/<map_name>
- Download world map (warning very large file) https://drive.google.com/file/d/1W2oMPj1L5zWRyPhh8LfmnY3_kve-FBR2/view?usp=sharing
- Crop the file (recommend Gimp), we recommend roughly 2 million pixels for performance reasons. Do not go over 4 million pixels.
- Look at existing info.json for structure
- Use country codes found here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
- Islands smaller than 30 tiles (pixels) are automatically removed by the script.
- Bodies of water smaller than 200 tiles (pixels) are also removed.