-
Notifications
You must be signed in to change notification settings - Fork 762
Feat: Sierpinski map - live play-tested #2819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
|
@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 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 |
|
@iiamlewis I called it "Arcade" because it matches what other RTS games do, how does that sound?
|
There was a problem hiding this 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 nowRecord<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
📒 Files selected for processing (5)
map-generator/main.goresources/lang/en.jsonsrc/client/components/Maps.tssrc/core/configuration/DefaultConfig.tssrc/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).
sierpinskimatches 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.arcadeandsierpinskikeys 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:MapDescriptionstays exhaustive after addingGameMapType.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. BothSinglePlayerModal.tsandHostLobbyModal.tsiterate overmapCategoriesusingObject.entries()rather than hard-coding category names, so thearcadecategory is automatically included in the UI without any changes to caller code.Likely an incorrect or invalid review comment.

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.
Screen.Recording.2026-01-08.010120.mp4
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
bijx