🗺️ How to Create a Map for OpenFront
This guide explains how to create a custom map that works with the OpenFront game and integrate it into the project repository. (Nothing has changed regarding the preparation of the map image, so you can also help yourself with [aPuddle's thread](#1350917721444847639 message) for that)
🧩 Steps to Add a Map
1. Prepare Your Map Image
-
Create an image of your map that follows the format required by the map generator.
-
Each pixel’s color corresponds to a terrain type.
-
Recommended maximum size: 4M pixels (2000×2000 px) for optimization.
-
Refer to the color palette by aPuddle (linked below) to ensure correct terrain mapping.
-
💡 Tip: The map generator converts each pixel to a terrain type based on its color.
2. Create the Map Info File
- Create an info.json file that defines your map’s metadata and nations, using this structure:
{ "name": "Name of your map", "nations": [ { "coordinates": [x, y], "flag": "xx", "name": "Name of the nation", }, { "coordinates": [x, y], "flag": "xx", "name": "Name of the nation", } ] }
- 💡 Note:
"flag" should use the two-letter country code for the nation.
3. Fork the Repository
-
Visit the official OpenFront GitHub repository
-
Click "Fork" to create your own fork of the project.
-
Open the fork in your preferred text editor.
-
💡 Note:
You can familiarize yourself with GitHub Forks and Pull Requests on VS Code with this tutorial - https://www.youtube.com/watch?v=zQSLq7RX8Eg
4. Add Your Map Files
Inside your opened repo, create a new folder for your map in:
map-generator/assets/maps/
Add the following files:
`image.png — your map image file
info.json — your map info file`


