Skip to content

Conversation

@Tidwell
Copy link

@Tidwell Tidwell commented Nov 29, 2025

Description:

Adds New York City Map.

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:

tidwell

Screenshots

location-select map-bots map-select nation-placement

Misc

Dimensions: 1500 x 1900 px
Total Area: 2,850,000 px²
New Flag Assets: None

Inspired by this Discord Thread

Some of the water features are adjusted for playability. NYC doesn't have a ton of elevation differences, so marshland is replicated w/ highland noise. This is roughly placed to match Pre-WWI, but allows maintaining the modern silhouette of the area. This 1901 map is also the main inspiration for composition and projection. For the Nations, British and Dutch Colonies along with Native Peoples make this a bit of an amalgamation of the 17th - 20th centuries

Other elevation differences come from Topographic Map

Tribal Nation Names and Info
Additional Tribal Names/Info

@Tidwell Tidwell requested a review from a team as a code owner November 29, 2025 23:59
@CLAassistant
Copy link

CLAassistant commented Nov 29, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

Walkthrough

Adds a new map "New York City" and registers it across map assets, manifests, translations, map-generator, enums, client descriptions, default configuration, server playlist, and credits. No game logic or exported API signatures were changed.

Changes

Cohort / File(s) Change Summary
Map data & manifests
map-generator/assets/maps/newyorkcity/info.json, resources/maps/newyorkcity/manifest.json
Added JSON map data and manifest with map dimensions, land-tile counts, and a nations list containing coordinates, names, strengths, and optional flag fields.
Map generator registry
map-generator/main.go
Registered newyorkcity in the map-generator maps list.
Localization
resources/lang/en.json
Added "newyorkcity": "New York City" under the map translations.
Game enum & categories
src/core/game/Game.ts
Added GameMapType.NewYorkCity = "New York City" and included it in the regional map category.
Client map descriptions
src/client/components/Maps.ts
Added NewYorkCity: "New York City" to MapDescription.
Default configuration
src/core/configuration/DefaultConfig.ts
Added GameMapType.NewYorkCity entry to numPlayersConfig with values [60, 40, 30].
Server playlist
src/server/MapPlaylist.ts
Added NewYorkCity frequency mapping with value 3.
Credits & attribution
CREDITS.md
Added two new map-data credit/license entries for New Jersey topo and historic NYC USGS maps.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (PR)
  participant MapGen as map-generator
  participant Repo as Repository (assets & manifests)
  participant Server as Server (MapPlaylist, DefaultConfig)
  participant Core as Core (GameMapType)
  participant Client as Client (MapDescription, i18n)

  Dev->>MapGen: add `newyorkcity` entry
  Dev->>Repo: add `info.json` and `manifest.json`
  Dev->>Server: add playlist frequency, add config entry
  Dev->>Core: add GameMapType.NewYorkCity, add to categories
  Dev->>Client: add MapDescription and i18n key
  Note right of Repo: Assets + manifest now available to build pipeline
  Server->>Core: reads enum & config at runtime (registration)
  Client->>Core: uses enum -> render map list (localized)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Focus areas:
    • Verify manifest coordinates vs declared dimensions (resources/maps/newyorkcity/manifest.json).
    • Confirm localization key and client MapDescription alignment (resources/lang/en.json, src/client/components/Maps.ts).
    • Ensure enum addition doesn't break serialization/persistence or saved data (src/core/game/Game.ts).
    • Check playlist frequency and default config entry consistency (src/server/MapPlaylist.ts, src/core/configuration/DefaultConfig.ts).

Possibly related PRs

Suggested labels

Feature - Map

Suggested Reviewers

  • evanpelle
  • scottanderson

Poem

🗽 New tiles upon the grid we lay,
JSON lines record the city's day,
Enums and manifests now sing in tune,
Translations, playlist—New York's in the room,
Players soon will roam its pixel bay.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add New York City Map' directly and clearly summarizes the main change: adding a new NYC map to the project.
Description check ✅ Passed The description is directly related to the changeset, explaining what was added, confirming testing and translation work, and providing historical/design context for the map.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85b7715 and 62e9a12.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/newyorkcity/image.png is excluded by !**/*.png
  • resources/maps/newyorkcity/map.bin is excluded by !**/*.bin
  • resources/maps/newyorkcity/map16x.bin is excluded by !**/*.bin
  • resources/maps/newyorkcity/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (9)
  • CREDITS.md (1 hunks)
  • map-generator/assets/maps/newyorkcity/info.json (1 hunks)
  • map-generator/main.go (1 hunks)
  • resources/lang/en.json (1 hunks)
  • resources/maps/newyorkcity/manifest.json (1 hunks)
  • src/client/components/Maps.ts (1 hunks)
  • src/core/configuration/DefaultConfig.ts (1 hunks)
  • src/core/game/Game.ts (2 hunks)
  • src/server/MapPlaylist.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/core/configuration/DefaultConfig.ts
  • resources/lang/en.json
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
  • CREDITS.md
  • src/client/components/Maps.ts
  • map-generator/assets/maps/newyorkcity/info.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-19T11:00:55.422Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1864
File: resources/maps/arabianpeninsula/manifest.json:13-170
Timestamp: 2025-08-19T11:00:55.422Z
Learning: In OpenFrontIO, nation names in map manifests are displayed directly in the UI without translation. They do not need to be added to resources/lang/en.json or processed through translateText(). This is the established pattern across all existing maps including Europe, World, Asia, Africa, and others.

Applied to files:

  • resources/maps/newyorkcity/manifest.json
🔇 Additional comments (4)
map-generator/main.go (1)

43-43: LGTM!

The New York City map entry is correctly added in alphabetical order and follows the established pattern. The map will be processed by the existing terrain generation pipeline.

resources/maps/newyorkcity/manifest.json (3)

1-16: Map dimensions and scaling look correct.

The base map dimensions (1500 × 1900) match the PR description, and the scaled versions (map4x, map16x) have correct dimension ratios. Land tile counts are consistent with the expected scaling factors.


17-17: Display name is clear and appropriate.


18-128: Nations array structure is solid.

The 20 nations have valid coordinates within map bounds, appropriate strength values, and historically sourced names. The mix of indigenous nations and colonial settlements reflects the temporal scope. Flag codes "nl" (Netherlands) and "gb-eng" (England) follow ISO 3166 standards and are appropriate for the colonial historical context. Nation names are displayed directly in the UI without translation, consistent with established OpenFrontIO patterns.


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 Nov 30, 2025
@evanpelle
Copy link
Collaborator

evanpelle commented Dec 1, 2025

can you add https://en-gb.topographic-map.com/ and the map you used in the CREDITS.md

their license requires attribution: https://opendatacommons.org/licenses/odbl/summary/

Copy link
Collaborator

Choose a reason for hiding this comment

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

please keep same format as the other info.json

Copy link
Author

Choose a reason for hiding this comment

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

Fixed - This was an artifact from the online map editor that I forgot to remove after shuffling the nations a bit. Whoops!

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)
CREDITS.md (1)

31-39: Clarify specific NYC topo / antique map sources in credits

The new entries look good, but they are still quite generic:

  • For Topographic Map, the earlier review asked for “topographic map URL and specific map used”. Right now this points to the site root only. Please consider adding the exact NYC map page or dataset name you used so the attribution is clearly tied to the data actually in the game.
  • For Geographicus Rare Antique Maps, please double‑check that the specific NYC map you used is indeed public domain, and if so, link that map’s page (title, year) instead of only the site root. That makes future license audits much easier.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 18996fa and 1e276bb.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/newyorkcity/image.png is excluded by !**/*.png
  • resources/maps/newyorkcity/map.bin is excluded by !**/*.bin
  • resources/maps/newyorkcity/map16x.bin is excluded by !**/*.bin
  • resources/maps/newyorkcity/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (9)
  • CREDITS.md (1 hunks)
  • map-generator/assets/maps/newyorkcity/info.json (1 hunks)
  • map-generator/main.go (1 hunks)
  • resources/lang/en.json (1 hunks)
  • resources/maps/newyorkcity/manifest.json (1 hunks)
  • src/client/components/Maps.ts (1 hunks)
  • src/core/configuration/DefaultConfig.ts (1 hunks)
  • src/core/game/Game.ts (2 hunks)
  • src/server/MapPlaylist.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • resources/lang/en.json
  • map-generator/main.go
  • src/core/configuration/DefaultConfig.ts
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
  • resources/maps/newyorkcity/manifest.json
  • map-generator/assets/maps/newyorkcity/info.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: 🔬 Test
🔇 Additional comments (1)
src/client/components/Maps.ts (1)

38-38: NYC map description entry is consistent and type‑safe

NewYorkCity: "New York City" matches the enum naming and existing description pattern (e.g., Montreal), and keeps MapDescription aligned with GameMapType. No changes needed here.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 3, 2025
@Tidwell
Copy link
Author

Tidwell commented Dec 3, 2025

can you add https://en-gb.topographic-map.com/ and the map you used in the CREDITS.md

their license requires attribution: https://opendatacommons.org/licenses/odbl/summary/

Added two entries to the CREDITS.md

  • The full topographic map info and full url
  • Direct link to the historical map, and a link to the FAQ where the site specifies that Digital Downloads are Public Domain (map is US Gov. created and before 1925).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants