Feat: Alphanumeric Coordinate Grid on Alternate View#2938
Feat: Alphanumeric Coordinate Grid on Alternate View#2938
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdded a coordinate grid overlay feature: new translations, a user setting and toggle method, a KeyM keybind that emits a toggle event, and a new CoordinateGridLayer integrated into the renderer to draw alphanumeric grid lines and labels. Changes
Sequence DiagramsequenceDiagram
participant User
participant InputHandler
participant UserSettings
participant EventBus
participant CoordinateGridLayer
participant GameRenderer
User->>InputHandler: press KeyM
InputHandler->>UserSettings: toggleCoordinateGrid()
UserSettings-->>InputHandler: return new enabled state
InputHandler->>EventBus: emit ToggleCoordinateGridEvent(enabled)
EventBus->>CoordinateGridLayer: notify toggle
CoordinateGridLayer->>CoordinateGridLayer: update visibility state
GameRenderer->>CoordinateGridLayer: renderLayer(context)
CoordinateGridLayer->>CoordinateGridLayer: computeGrid() and draw lines & labels
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! 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. Comment |
|
Already mentioned in the discord (and I know you reacted to it already) but going to repeat it here for anyone else: It would be great to get the letters on the exact edge of the map (worried about ultrawide) and just being too far away from the map |
@ryanbarlow97 awesome suggestion, just added that in! Screen.Recording.2026-01-18.172805.mp4 |
|
Put back into draft until #2946 is merged so we can make the grid view a hotkey instead of being part of Alternate View |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/client/graphics/GameRenderer.ts`:
- Line 280: The build fails because RailroadLayer is being instantiated with
three args but its constructor requires four; in GameRenderer replace the
instantiation new RailroadLayer(game, eventBus, transformHandler) with a call
that passes the missing uiState as the fourth parameter (use the appropriate
uiState value available in scope), ensuring the RailroadLayer constructor
signature (game, eventBus, transformHandler, uiState) is satisfied.
… constant from DefaultKeybinds
|
@ryanbarlow97 I finally got around to fixing this up, it's got keybinds to |
|
instead of a seperate key, what about always showing it in the alternate view? |
There was a bit of discussion on being able to have this on permanently, as I would want this on during team games to make callouts e.g. “someone has a pixel in you in F12” for example |
|
i would argue that this mainly improves gameplay for people in voice, making the communication gap to casual players even bigger. |
We need to promote voice chat gameplay too |
…dling for AlternateViewEvent and updated render logic to account for alternate view visibility.
I refactored a bit to use an Offscreen Canvas so it only re-renders when a change is made to the view (camera pan, zoom, etc.). Should be more efficient now! |



Description:
Adds a coordinate grid to the Alternate View (holding spacebar) using numbers on the X-axis, and letters on the Y-axis. No more "he's attacking you in that—well, the little peninsula thing... next to the island! which island? uhh..." moments when playing with friends. Optimally maps have letters A-J (just like in the Battleships board game) but special maps like Amazon River dynamically resize to only have 2 letters so as to not have too many number columns. This feature overall can be toggled via the settings menu.
Also saw it requested on the official discord a couple times, thought it was a neat idea.
World Map
Scales correctly when zoomed in
Amazon River
Enable/Disable via settings
Screen.Recording.2026-01-17.034212.mp4
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
bijx