Skip to content

Conversation

@bijx
Copy link
Contributor

@bijx bijx commented Jan 8, 2026

Description:

Map requested by creator on dev discord and playtested by 42 players on Rex's stream, adds map Sierpinski, which is a sierpinski carpet shape. The map is a "party map" great for private matches, but is not part of the public map rotation.

image
Screen.Recording.2026-01-08.010120.mp4

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
  • 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:

bijx

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

This PR adds a new "Sierpinski" map to the game by registering it in the map generator, defining its structure and dimensions, localizing its name, configuring player counts, and assigning it to the arcade map category. The Didier map is concurrently reclassified from fantasy to arcade.

Changes

Cohort / File(s) Summary
Map Assets and Descriptors
map-generator/assets/maps/sierpinski/info.json, resources/maps/sierpinski/manifest.json
Added new Sierpinski map definition with 9 nations, coordinates, and regional dimensions for three zoom levels (map, map16x, map4x)
Map Registry and Localization
map-generator/main.go, resources/lang/en.json
Registered sierpinski entry in map generator; added map name localization and new "arcade" category label in language file
Game Type System
src/core/game/Game.ts
Extended GameMapType enum with Sierpinski; moved Didier from fantasy to arcade category; added Sierpinski to arcade category
Client and Configuration
src/client/components/Maps.ts, src/core/configuration/DefaultConfig.ts
Added Sierpinski to MapDescription export; configured player count limits [20, 15, 10] for the new map

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

Feature - Map

Suggested reviewers

  • evanpelle

Poem

🔺 A fractal map is born today,
Sierpinski shows the fractal way,
Nine nations dance in infinite grace,
Arcade's newest, nested space!
Didier joins the arcade fold,
Ancient patterns, new and bold. 🎮

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding the Sierpinski map that has been play-tested, which aligns with the changeset's primary purpose.
Description check ✅ Passed The description provides comprehensive context about the map's origin, testing, purpose, and includes relevant screenshots and video links, all directly related to the changeset.
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.


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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2026
@bijx bijx changed the title DEV-ONLY (for now): Sierpinski map Feat: Sierpinski map - live play-tested Jan 8, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2026
@iiamlewis
Copy link
Contributor

@bijx if this is added, can we keep it out of the main rotation of maps for now please

@iiamlewis iiamlewis added this to the Backlog milestone Jan 8, 2026
@iiamlewis iiamlewis added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Jan 8, 2026
@bijx
Copy link
Contributor Author

bijx commented Jan 8, 2026

@bijx if this is added, can we keep it out of the main rotation of maps for now please

For sure. It's a fun party map but we don't even have to add it. I'm curious to see what others think since it's such a different map compared to the rest which are more realistic

@bijx bijx marked this pull request as ready for review January 8, 2026 19:54
@bijx bijx requested a review from a team as a code owner January 8, 2026 19:54
@iiamlewis
Copy link
Contributor

@bijx could we add a new section to the maps, a new category called "community" maps or "party" maps, which contains maps like this and the Didier map

@bijx
Copy link
Contributor Author

bijx commented Jan 8, 2026

@iiamlewis I called it "Arcade" because it matches what other RTS games do, how does that sound?

image

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: 0

🧹 Nitpick comments (1)
src/core/game/Game.ts (1)

127-178: Type the category keys as a union to prevent drift now that a 4th category exists.
Right now Record<string, GameMapType[]> won’t catch typos (e.g., "arcades") and won’t force callers to handle new categories.

Proposed diff
-export const mapCategories: Record<string, GameMapType[]> = {
+export type MapCategoryKey = "continental" | "regional" | "fantasy" | "arcade";
+
+export const mapCategories: Record<MapCategoryKey, GameMapType[]> = {
   continental: [
     GameMapType.World,
     GameMapType.GiantWorldMap,
     GameMapType.NorthAmerica,
     GameMapType.SouthAmerica,
     GameMapType.Europe,
     GameMapType.EuropeClassic,
     GameMapType.Asia,
     GameMapType.Africa,
     GameMapType.Oceania,
   ],
   regional: [
     GameMapType.BritanniaClassic,
     GameMapType.Britannia,
     GameMapType.BlackSea,
     GameMapType.GatewayToTheAtlantic,
     GameMapType.BetweenTwoSeas,
     GameMapType.Iceland,
     GameMapType.EastAsia,
     GameMapType.Mena,
     GameMapType.Australia,
     GameMapType.FaroeIslands,
     GameMapType.FalklandIslands,
     GameMapType.Baikal,
     GameMapType.Halkidiki,
     GameMapType.StraitOfGibraltar,
     GameMapType.Italia,
     GameMapType.Japan,
     GameMapType.Montreal,
     GameMapType.GulfOfStLawrence,
     GameMapType.Lisbon,
     GameMapType.NewYorkCity,
     GameMapType.Manicouagan,
     GameMapType.Lemnos,
     GameMapType.TwoLakes,
     GameMapType.StraitOfHormuz,
     GameMapType.AmazonRiver,
   ],
   fantasy: [
     GameMapType.Pangaea,
     GameMapType.Pluto,
     GameMapType.Mars,
     GameMapType.DeglaciatedAntarctica,
     GameMapType.Achiran,
     GameMapType.BaikalNukeWars,
     GameMapType.FourIslands,
     GameMapType.Svalmel,
     GameMapType.Surrounded,
   ],
   arcade: [GameMapType.Didier, GameMapType.Sierpinski],
 };
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4d4822 and ad6d78c.

📒 Files selected for processing (5)
  • map-generator/main.go
  • resources/lang/en.json
  • src/client/components/Maps.ts
  • src/core/configuration/DefaultConfig.ts
  • src/core/game/Game.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/core/configuration/DefaultConfig.ts
  • map-generator/main.go
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 2306
File: src/core/game/Game.ts:141-141
Timestamp: 2025-10-27T08:59:47.620Z
Learning: In OpenFrontIO, gamemode-specific map variants that have altered geography from their real-world counterparts should be categorized as "fantasy" rather than "regional", even if based on real locations. Example: BaikalNukeWars is in "fantasy" because it has different islands than real Baikal.
📚 Learning: 2025-08-27T08:12:19.610Z
Learnt from: mokizzz
Repo: openfrontio/OpenFrontIO PR: 1940
File: resources/lang/en.json:763-766
Timestamp: 2025-08-27T08:12:19.610Z
Learning: In OpenFrontIO, some country entries in src/client/data/countries.json may have similar names but different codes (e.g., "Empire of Japan" vs "Empire of Japan1"). Each unique code requires its own translation key in resources/lang/en.json after normalization. Always verify against countries.json before suggesting removal of translation keys.

Applied to files:

  • resources/lang/en.json
📚 Learning: 2025-10-27T08:59:47.620Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 2306
File: src/core/game/Game.ts:141-141
Timestamp: 2025-10-27T08:59:47.620Z
Learning: In OpenFrontIO, gamemode-specific map variants that have altered geography from their real-world counterparts should be categorized as "fantasy" rather than "regional", even if based on real locations. Example: BaikalNukeWars is in "fantasy" because it has different islands than real Baikal.

Applied to files:

  • resources/lang/en.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy to openfront.dev
🔇 Additional comments (5)
resources/lang/en.json (2)

212-261: Add is consistent with map-key normalization (lowercase, no spaces).
sierpinski matches the existing pattern (newyorkcity, giantworldmap, etc.), so this should resolve correctly via the normal map-key translation lookup.


262-267: Don't update non-English locale files in this PR.

The map_categories.arcade and sierpinski keys in en.json are correct. Other locale files will be updated by the translation team in dedicated translation PRs. Regular PRs should only modify en.json; the project has a separate workflow for all other language files.

src/client/components/Maps.ts (1)

11-58: Good: MapDescription stays exhaustive after adding GameMapType.Sierpinski.
This keeps the compile-time “missing map label” guard working.

src/core/game/Game.ts (2)

72-118: Enum addition looks clean.
GameMapType.Sierpinski = "Sierpinski" matches the existing naming style and should be stable for serialization.


127-178: No action needed—the codebase already uses dynamic category iteration. Both SinglePlayerModal.ts and HostLobbyModal.ts iterate over mapCategories using Object.entries() rather than hard-coding category names, so the arcade category is automatically included in the UI without any changes to caller code.

Likely an incorrect or invalid review comment.

@evanpelle evanpelle merged commit 8b6dfea into main Jan 9, 2026
11 checks passed
@evanpelle evanpelle deleted the sierpinski-map branch January 9, 2026 04:01
@coderabbitai coderabbitai bot mentioned this pull request Jan 10, 2026
4 tasks
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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants