mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 08:00:43 +00:00
3de5fb4204a02878be69c5167970ca575b9619d2
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3de5fb4204 |
Move map metadata into info.json and generate map TypeScript from it (#4227)
**Add approved & assigned issue number here:** N/A — maintainer refactor. ## Description: Makes each map's `info.json` the single source of truth for map metadata — adding a map is now a folder with `image.png` + `info.json`, a `gen-maps` run, and an en.json display name. **info.json / manifest.json carry full map metadata.** Every `map-generator/assets/maps/<map>/info.json` declares `id` (the `GameMapType` enum key), `name` (the enum value — wire format, unchanged for all 94 maps), `translation_key`, `categories`, and `multiplayer_frequency` (the public-playlist weight that used to be the `FREQUENCY` record in MapPlaylist.ts). The generator validates everything and mirrors it into `resources/maps/<map>/manifest.json`. 23 stale info.json `name` values were normalized to the canonical enum value; enum values are byte-identical, so replays and stored game configs are unaffected. **The generator emits the TypeScript and discovers maps itself.** New `map-generator/codegen.go` generates `src/core/game/Maps.gen.ts` (`GameMapType`, `GameMapName`, `mapCategories`, `mapTranslationKeys`, `multiplayerFrequency` — now a full `Record<GameMapName, number>`, killing the old `Partial`) on every run; `Game.ts` re-exports it. The hardcoded map registry in `main.go` is gone — maps are auto-discovered from the `assets/maps` / `assets/test_maps` directories. MapConsistency tests fail with a "run `npm run gen-maps`" message if info.json, manifest.json, and Maps.gen.ts drift. The tracked `map-generator/map-generator` binary is rebuilt to match. **New categories: continents + world/cosmic/tournament/other, multi-category support.** `continental`/`regional`/`fantasy`/`arcade` are replaced by `featured`, `world`, `europe`, `asia`, `north_america`, `africa`, `south_america`, `oceania`, `antarctica`, `cosmic`, `tournament`, and `other`. Maps can list multiple categories, so straddlers (Black Sea, Bosphorus, Caucasus, Between Two Seas, Bering Sea/Strait, Mena, Strait of Gibraltar, Hawaii, Arctic) appear under both regions. Featured is itself a category (same 7 maps as before). MapPlaylist keeps its arcade exclusion via an explicit set. **Map picker UI.** Two tabs: **Featured** (default — featured maps plus a Favorites section when maps are starred) and **All** (one prominent collapsible bar per category with a map count, collapsed by default). The selected map is prepended to the featured grid when it lives elsewhere. `getMapName()` resolves through the generated `mapTranslationKeys`, which also fixes tourney maps never resolving a valid translation key. ## Please complete the following: - [ ] I have added screenshots for all UI updates (maintainer change — picker described above) - [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 ## Please put your Discord username so you can be contacted if a bug or regression is found: evanpelle 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
b043dc6c15 |
Team Maps Expansion: New team spawnzones for multiple maps (#4058)
## Description: Lets give Teams and HvN gamemodes some attention. Adds team spawnzones to the following maps, and boosts them to appear more frequently as this gamemode: - Straitofgibraltar - 2 teams - Aegean - 2 teams - Beringsea - 2 teams - Beringstrait - 2 teams - Bosphorusstraits - 2 teams - Conakry - 2 teams - Falklandislands - 2 teams - Straitofhormuz - 2 teams - Tradersdream - 2 teams - Surrounded - 2 teams & 4 teams - Pluto - 2 teams - Gulf of St. Lawrence - 3 teams These maps (especially the ones for 2 teams) are all very symmetrical and would be nice gift for the playerbase, which enjoys these kind of games like FourIslands4Teams and Baikal2Teams. This is also nice for HvN, as it centralizes the players and gives them a better chance at defeating the nations. Screenshots of the maps with the new team spawnzones: <img width="1320" height="486" alt="Captura de pantalla 2026-05-28 001558" src="https://github.com/user-attachments/assets/e0b4bea6-d1b7-4793-a995-ec2a139a5af6" /> <img width="1177" height="528" alt="Captura de pantalla 2026-05-28 001913" src="https://github.com/user-attachments/assets/28ec5bf8-3a02-4660-ba62-3edbcabeaf51" /> <img width="1147" height="531" alt="Captura de pantalla 2026-05-28 002032" src="https://github.com/user-attachments/assets/b148f1ae-473a-4505-b0f4-ca8820fbbb55" /> <img width="1219" height="536" alt="Captura de pantalla 2026-05-28 002348" src="https://github.com/user-attachments/assets/89af4d27-eadf-447c-9bde-d0dcfe1ff757" /> <img width="923" height="524" alt="Captura de pantalla 2026-05-28 002704" src="https://github.com/user-attachments/assets/50ad1b11-1685-41fb-b14d-088a2f0db88b" /> <img width="1307" height="456" alt="Captura de pantalla 2026-05-28 002859" src="https://github.com/user-attachments/assets/4ef18da9-336a-4698-8af0-2769467148b4" /> <img width="1219" height="548" alt="Captura de pantalla 2026-05-28 003134" src="https://github.com/user-attachments/assets/d0a514bf-e6e6-43f6-89b7-2168bc395010" /> <img width="1200" height="538" alt="Captura de pantalla 2026-05-28 003449" src="https://github.com/user-attachments/assets/c1672296-db4d-4baf-9992-4bb380fab4e9" /> <img width="1032" height="501" alt="Captura de pantalla 2026-05-28 003650" src="https://github.com/user-attachments/assets/8dd5ee07-3ac3-4f03-a56e-31c01d612655" /> <img width="1074" height="525" alt="Captura de pantalla 2026-05-28 003951" src="https://github.com/user-attachments/assets/e140706b-3f1c-4e09-b70c-efc3e6536c60" /> <img width="914" height="513" alt="Captura de pantalla 2026-05-28 004632" src="https://github.com/user-attachments/assets/e0dd6820-62f4-48b6-8356-df20c0e6ed8f" /> <img width="988" height="509" alt="Captura de pantalla 2026-05-28 005518" src="https://github.com/user-attachments/assets/0da95c41-1191-4de4-a3ce-873839c00605" /> <img width="986" height="514" alt="Captura de pantalla 2026-05-28 000505" src="https://github.com/user-attachments/assets/4eb20c73-56ba-4f9f-90af-8a047aa399eb" /> ## 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: tri.star1011 |
||
|
|
755e7b76cc |
Expand Aegean Map for balancing purposes (#3459)
## Description: Expands the Aegean map to the left. Currently the 2 major landmasses are unbalanced, which causes the eastern side to almost always win, both in FFA and team games. Original Width: 1600px | New Width=1700px Also adds more nations / NPCs in the Greek side to create more balance with the Turkish side, aswell as in the islands, to compensate for the lack of bots / tribes spawning in there, to boost early island gameplay and fasten games. <img width="355" height="415" alt="image" src="https://github.com/user-attachments/assets/066d86cd-5a6b-4a07-bfa4-264b7ef82a3c" /> ## 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: tri.star1011 |
||
|
|
84ae5fc879 |
Adds Aegean map (#3384)
## Description: Adds Aegean map, a map centered in the Aegean Sea and the aegean islands between Greece and Turkey. Map has approx. 1M land tiles, size of 1600x2000. Nations are named after Ancient Greece era city-states and tribes. Elevation source from OpenTopography, already credited <img width="1600" height="2000" alt="image" src="https://github.com/user-attachments/assets/e4f52d6e-bba4-4641-9eac-31e3ddee354e" /> <img width="453" height="445" alt="Captura de pantalla 2026-03-08 141256" src="https://github.com/user-attachments/assets/5d2bc8cf-1e54-461a-ae0f-9bb2dafc2db6" /> This has been a heavily requested map in the community, having suggestions in the Discord, Subreddit and even in some videos (for example i saw Ultimus Rex suggest an aegean map when asked what maps he would like in his last stream) The map is designed so that the greek and turkish main landmasses are around 400,000 pixels in area, which combined account for around less or equal to 80% of the map. This means players will have to cross the sea to win, and to do so they will have to hop across the islands, which means there will be heavy warship action, instead of having stalemates like in most island maps where the gap between islands is too large and players would rather bomb each other. ## 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: tri.star1011 |