mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:10:15 +00:00
d49566b73b
## Description: Literally one pixel was stopping the river Before <img width="450" height="405" alt="image" src="https://github.com/user-attachments/assets/d5af908f-2136-42f7-90cc-655d24372c22" /> After <img width="272" height="238" alt="image" src="https://github.com/user-attachments/assets/b8f595f3-cf10-4098-89cb-7b5b7f2bc9d1" /> before <img width="222" height="263" alt="image" src="https://github.com/user-attachments/assets/8a1abd1f-85c8-4673-bf7a-bcc774783e2e" /> after <img width="246" height="217" alt="image" src="https://github.com/user-attachments/assets/16249b6f-1743-4f04-ad8e-b353b29380de" /> ## Please complete the following: - [ X ] I have added screenshots for all UI updates - [ N/A ] I process any text displayed to the user through translateText() and I've added it to the en.json file - [ N/A ] 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: @dxtron_28992 --------- 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.