mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 17:00:16 +00:00
46bbc8f296
## Description: Made a type of map we don't already have: Small square map, one Island in each corner. Could be great for boat gameplay or maybe even nuke wars. The special thing is: **All islands are exactly 25% of the territory!** Was a lot of work drawing that in GIMP... <img width="1164" height="1168" alt="Screenshot 2025-11-20 000839" src="https://github.com/user-attachments/assets/ad8345c7-562d-49e8-b367-12be9274f3e4" /> <img width="1227" height="1222" alt="Screenshot 2025-11-20 000633" src="https://github.com/user-attachments/assets/f7e2c58a-fcb3-4e07-91f2-aead5f497fad" /> <img width="361" height="288" alt="Screenshot 2025-11-20 000655" src="https://github.com/user-attachments/assets/120f82ef-2d19-497b-8a31-819e30013c89" /> <img width="756" height="282" alt="Screenshot 2025-11-20 005949" src="https://github.com/user-attachments/assets/8ee04da3-d5fa-4ec9-9e99-9e30ebda2b78" /> ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin --------- Co-authored-by: Evan <evanpelle@gmail.com>
MapGenerator
This is a tool to generate map files for OpenFront.
Installation
- Install go https://go.dev/doc/install
- Install dependencies:
go mod download - Run the generator:
go run .
Creating a new map
- 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>
Create image.png
- 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.
Create info.json
- Look at existing info.json for structure
- Use country codes found here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
Notes
- Islands smaller than 30 tiles (pixels) are automatically removed by the script.
- Bodies of water smaller than 200 tiles (pixels) are also removed.