Skip to content

New map: quadrants#3310

Open
flucci14 wants to merge 1 commit intoopenfrontio:mainfrom
flucci14:main
Open

New map: quadrants#3310
flucci14 wants to merge 1 commit intoopenfrontio:mainfrom
flucci14:main

Conversation

@flucci14
Copy link

Description:

I created a new map. It is called "Quadrants". It is simple. Four plain quadrants seperated with water. Fits perfectly for 4 teams of x.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • 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:

fibsx

@CLAassistant
Copy link

CLAassistant commented Feb 28, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

Walkthrough

This PR introduces a new map type called "Quadrants" to the game system. Changes include new map configuration files, an updated game type enum, translation entries, and playlist frequency registration. All modifications are additive and integrate the new map into existing data and code structures.

Changes

Cohort / File(s) Summary
Map Configuration Data
map-generator/assets/maps/quadrants/info.json, resources/maps/quadrants/manifest.json
New map region "Achiran" with four quadrant nations, including coordinates, flags, and metadata for multiple scales.
Game Type Definition
src/core/game/Game.ts
Added Quadrants enum member to GameMapType, extending the supported map type set.
Registry and Playlist
map-generator/main.go, src/server/MapPlaylist.ts
Registered quadrants map in the generator and assigned frequency weight of 100 to the playlist selection system.
Language Translation
resources/lang/en.json
Added "quadrants" translation key with value "Quadrants" in the map section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🗺️ A new quadrant rises up,
Four nations claim their ground,
From data files to code so clean,
The map's configuration sound.
When players seek their next campaign,
Achiran awaits the crown! 👑

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'New map: quadrants' clearly and concisely describes the main change: adding a new map called 'Quadrants' to the codebase.
Description check ✅ Passed The description is directly related to the changeset, explaining the new map's purpose, design (four quadrants separated by water), and intended use case (four teams).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@map-generator/assets/maps/quadrants/info.json`:
- Around line 1-25: The third nation's flag in the nations array is inconsistent
with manifest.json: update the third element (nations[2]."flag") in info.json
from "de" to "ie" to match the manifest (or alternatively change the manifest's
corresponding flag to "de" if that is intended), and while here replace the
placeholder "de" for each quadrant with distinct flag codes to visually
distinguish all four quadrants.

In `@resources/maps/quadrants/manifest.json`:
- Around line 29-32: The manifest's third quadrant entry (name "third quadrant",
coordinates [250, 750], flag "ie") conflicts with the source info.json which has
"de" for all quadrants; since manifest.json is generated from info.json the
generator will overwrite it, so either update the corresponding quadrant entry
in info.json to set flag to "ie" if you intend Ireland for the third quadrant,
or revert manifest.json's flag to "de" to match info.json; locate the quadrant
record by the name "third quadrant" or coordinates [250, 750] and make the
change there.

In `@src/core/game/Game.ts`:
- Line 84: mapCategories is missing the new GameMapType.Quadrants enum member;
edit the mapCategories object to include GameMapType.Quadrants under the correct
category (likely "fantasy" or "arcade" per PR description). Find the
mapCategories declaration and add GameMapType.Quadrants to the chosen array
alongside other types so the UI filtering recognizes it.

In `@src/server/MapPlaylist.ts`:
- Line 25: The Quadrants map's frequency is set to an outlier value (Quadrants:
100) which will overwhelmingly dominate the playlist; change the frequency to a
reasonable value consistent with other maps (e.g., 4 or 5) by updating the
Quadrants entry in the playlist configuration (look for the Quadrants key in the
MapPlaylist map/array) so its frequency aligns with others like World and
Sierpinski.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c911bfb and 08726a1.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/quadrants/image.png is excluded by !**/*.png
  • resources/maps/quadrants/map.bin is excluded by !**/*.bin
  • resources/maps/quadrants/map16x.bin is excluded by !**/*.bin
  • resources/maps/quadrants/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (7)
  • map-generator/assets/maps/quadrants/info.json
  • map-generator/main.go
  • resources/lang/en.json
  • resources/maps/quadrants/manifest.json
  • resources/maps/quadrants/thumbnail.webp
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts

Comment on lines +1 to +25
{
"name": "Achiran",
"nations": [
{
"coordinates": [250, 250],
"flag": "de",
"name": "first quadrant"
},
{
"coordinates": [750, 250],
"flag": "de",
"name": "second quadrant"
},
{
"coordinates": [250, 750],
"flag": "de",
"name": "third quadrant"
},
{
"coordinates": [750, 750],
"flag": "de",
"name": "fourth quadrant"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if files exist and display their contents
echo "=== Checking info.json ===" 
if [ -f "map-generator/assets/maps/quadrants/info.json" ]; then
  cat -n "map-generator/assets/maps/quadrants/info.json"
else
  echo "File not found: map-generator/assets/maps/quadrants/info.json"
fi

echo ""
echo "=== Checking manifest.json ===" 
if [ -f "resources/maps/quadrants/manifest.json" ]; then
  cat -n "resources/maps/quadrants/manifest.json"
else
  echo "File not found: resources/maps/quadrants/manifest.json"
fi

echo ""
echo "=== Listing quadrants directory contents ===" 
if [ -d "resources/maps/quadrants" ]; then
  ls -la "resources/maps/quadrants/"
else
  echo "Directory not found: resources/maps/quadrants"
fi

echo ""
echo "=== Checking available flag files ===" 
if [ -d "resources/flags" ]; then
  echo "Looking for de and ie flags:"
  ls resources/flags/ | grep -E "^(de|ie)(\.|$)" || echo "No exact matches found"
else
  echo "Directory not found: resources/flags"
fi

Repository: openfrontio/OpenFrontIO

Length of output: 2271


Fix flag inconsistency for the third quadrant between source and manifest.

The third quadrant has flag "de" in info.json but flag "ie" in manifest.json. They must match. Either update info.json line 16 to use "ie" to match the manifest, or update the manifest.json line 31 to use "de".

Additionally, all four quadrants currently use the same flag in info.json, which appears to be placeholder data. Consider using different flags to visually distinguish each quadrant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@map-generator/assets/maps/quadrants/info.json` around lines 1 - 25, The third
nation's flag in the nations array is inconsistent with manifest.json: update
the third element (nations[2]."flag") in info.json from "de" to "ie" to match
the manifest (or alternatively change the manifest's corresponding flag to "de"
if that is intended), and while here replace the placeholder "de" for each
quadrant with distinct flag codes to visually distinguish all four quadrants.

Comment on lines +29 to +32
{
"coordinates": [250, 750],
"flag": "ie",
"name": "third quadrant"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Flag inconsistency with source file.

The third quadrant here uses "ie" (Ireland), but info.json has "de" for all quadrants. Since manifest.json is generated from info.json, running the map generator will overwrite this with "de". Update info.json if you want "ie" for the third quadrant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@resources/maps/quadrants/manifest.json` around lines 29 - 32, The manifest's
third quadrant entry (name "third quadrant", coordinates [250, 750], flag "ie")
conflicts with the source info.json which has "de" for all quadrants; since
manifest.json is generated from info.json the generator will overwrite it, so
either update the corresponding quadrant entry in info.json to set flag to "ie"
if you intend Ireland for the third quadrant, or revert manifest.json's flag to
"de" to match info.json; locate the quadrant record by the name "third quadrant"
or coordinates [250, 750] and make the change there.


export enum GameMapType {
World = "World",
Quadrants = "Quadrants",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quadrants is missing from mapCategories.

The new Quadrants enum member is added but not placed in any category (continental, regional, fantasy, arcade). Other maps are categorized for UI filtering. Based on the PR description ("four plain quadrants separated by water"), this likely belongs in fantasy or arcade.

Suggested fix

Add GameMapType.Quadrants to the appropriate category, for example:

   arcade: [
     GameMapType.TheBox,
     GameMapType.Didier,
     GameMapType.DidierFrance,
     GameMapType.Sierpinski,
+    GameMapType.Quadrants,
   ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/game/Game.ts` at line 84, mapCategories is missing the new
GameMapType.Quadrants enum member; edit the mapCategories object to include
GameMapType.Quadrants under the correct category (likely "fantasy" or "arcade"
per PR description). Find the mapCategories declaration and add
GameMapType.Quadrants to the chosen array alongside other types so the UI
filtering recognizes it.

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Feb 28, 2026
@bijx
Copy link
Contributor

bijx commented Mar 2, 2026

Could you post some screenshots/videos of the map in the PR 🙏

@iiamlewis iiamlewis added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Mar 2, 2026
@iiamlewis iiamlewis added this to the v31 milestone Mar 2, 2026
@flucci14
Copy link
Author

flucci14 commented Mar 4, 2026

grafik grafik ![Video Project 3](https://github.com/user-attachments/assets/a56f949c-fa42-4979-a4b6-74fc4bb441e7)

@FloPinguin
Copy link
Contributor

I'm not sure about this map, its just "The Box" but with a bit of water?

Please react to the coderabbit Review, frequency 100 is wrong

@flucci14
Copy link
Author

flucci14 commented Mar 6, 2026

Up to you if you like the map :D Yes it is a simple map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maps A new map, or adjustments to an existing map itself, its json, etc,

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

5 participants