Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a269916
new coordinate grid layer
bijx Jan 15, 2026
b0760c5
added to game renderer
bijx Jan 15, 2026
40396d6
improved design
bijx Jan 15, 2026
4b0ef53
add min columns and recompute logic for special map cases (amazon river)
bijx Jan 17, 2026
2e7efe7
added settings to toggle
bijx Jan 17, 2026
ff9ca19
format
bijx Jan 17, 2026
961dba8
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 17, 2026
4bc617f
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 18, 2026
12e5a60
moved labels inside map
bijx Jan 18, 2026
faee516
grid cells rather than column and row labels1
bijx Jan 18, 2026
a085cf4
grid now cuts off at edge
bijx Jan 18, 2026
139e810
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 19, 2026
30cf45c
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 20, 2026
1d4121e
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 20, 2026
a2bce8c
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 21, 2026
9d61f28
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Jan 23, 2026
140a396
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 1, 2026
33184c9
Add coordinate grid toggle functionality and removed settings option,…
bijx Feb 1, 2026
69430bc
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 6, 2026
2a9f6ab
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 13, 2026
846a6d6
Update default keybind for coordinate grid in UserSettingModal to use…
bijx Feb 14, 2026
2202b4d
fix railroad layer after merge
bijx Feb 14, 2026
52f0283
Removed the leftover user-setting API for coordinate grid from UserSe…
bijx Feb 14, 2026
8799659
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 14, 2026
3c7b733
Enhance CoordinateGridLayer to support alternate view mode. Added han…
bijx Feb 15, 2026
d141e84
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 15, 2026
31cb601
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 16, 2026
781912b
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 17, 2026
0327b83
Add caching mechanism for coordinate grid rendering1
bijx Feb 17, 2026
e686856
Merge branch 'main' into bijx/alphanumeric-coordinate-grid
bijx Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions resources/images/GridIconWhite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"table_key": "Key",
"table_action": "Action",
"action_alt_view": "Alternate view (terrain/countries)",
"action_coordinate_grid": "Toggle coordinate grid overlay",
"action_attack_altclick": "Attack (when left click is set to open menu)",
"action_build": "Open build menu",
"action_emote": "Open emote menu",
Expand Down Expand Up @@ -503,6 +504,8 @@
"attack_ratio_desc": "What percentage of your troops to send in an attack (1–100%)",
"territory_patterns_label": "🏳️ Territory Skins",
"territory_patterns_desc": "Choose whether to display territory skin designs in game",
"coordinate_grid_label": "Coordinate Grid",
"coordinate_grid_desc": "Toggle the alphanumeric grid overlay",
"performance_overlay_label": "Performance Overlay",
"performance_overlay_desc": "Toggle the performance overlay. When enabled, the performance overlay will be displayed. Press shift-D during game to toggle.",
"easter_writing_speed_label": "Writing Speed Multiplier",
Expand Down
9 changes: 9 additions & 0 deletions src/client/HelpModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class HelpModal extends BaseModal {
const isMac = /Mac/.test(navigator.userAgent);
return {
toggleView: "Space",
coordinateGrid: "KeyM",
centerCamera: "KeyC",
moveUp: "KeyW",
moveDown: "KeyS",
Expand Down Expand Up @@ -269,6 +270,14 @@ export class HelpModal extends BaseModal {
${translateText("help_modal.action_alt_view")}
</td>
</tr>
<tr class="hover:bg-white/5 transition-colors">
<td class="py-3 pl-4 border-b border-white/5">
${this.renderKey(keybinds.coordinateGrid)}
</td>
<td class="py-3 border-b border-white/5 text-white/70">
${translateText("help_modal.action_coordinate_grid")}
</td>
</tr>
<tr class="hover:bg-white/5 transition-colors">
<td class="py-3 pl-4 border-b border-white/5">
${this.renderKey(keybinds.swapDirection)}
Expand Down
14 changes: 14 additions & 0 deletions src/client/InputHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export class AutoUpgradeEvent implements GameEvent {
) {}
}

export class ToggleCoordinateGridEvent implements GameEvent {
constructor(public readonly enabled: boolean) {}
}

export class TickMetricsEvent implements GameEvent {
constructor(
public readonly tickExecutionDuration?: number,
Expand All @@ -154,6 +158,7 @@ export class InputHandler {
private moveInterval: NodeJS.Timeout | null = null;
private activeKeys = new Set<string>();
private keybinds: Record<string, string> = {};
private coordinateGridEnabled = false;

private readonly PAN_SPEED = 5;
private readonly ZOOM_SPEED = 10;
Expand Down Expand Up @@ -201,6 +206,7 @@ export class InputHandler {

this.keybinds = {
toggleView: "Space",
coordinateGrid: "KeyM",
centerCamera: "KeyC",
moveUp: "KeyW",
moveDown: "KeyS",
Expand Down Expand Up @@ -316,6 +322,14 @@ export class InputHandler {
}
}

if (e.code === this.keybinds.coordinateGrid && !e.repeat) {
e.preventDefault();
this.coordinateGridEnabled = !this.coordinateGridEnabled;
this.eventBus.emit(
new ToggleCoordinateGridEvent(this.coordinateGridEnabled),
);
}

if (e.code === "Escape") {
e.preventDefault();
this.eventBus.emit(new CloseViewEvent());
Expand Down
11 changes: 11 additions & 0 deletions src/client/UserSettingModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const isMac =

const DefaultKeybinds: Record<string, string> = {
toggleView: "Space",
coordinateGrid: "KeyM",
buildCity: "Digit1",
buildFactory: "Digit2",
buildPort: "Digit3",
Expand Down Expand Up @@ -475,6 +476,16 @@ export class UserSettingModal extends BaseModal {
@change=${this.handleKeybindChange}
></setting-keybind>

<setting-keybind
action="coordinateGrid"
label=${translateText("user_setting.coordinate_grid_label")}
description=${translateText("user_setting.coordinate_grid_desc")}
defaultKey=${DefaultKeybinds.coordinateGrid}
.value=${this.getKeyValue("coordinateGrid")}
.display=${this.getKeyChar("coordinateGrid")}
@change=${this.handleKeybindChange}
></setting-keybind>

<h2
class="text-blue-200 text-xl font-bold mt-8 mb-3 border-b border-white/10 pb-2"
>
Expand Down
2 changes: 2 additions & 0 deletions src/client/graphics/GameRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { BuildMenu } from "./layers/BuildMenu";
import { ChatDisplay } from "./layers/ChatDisplay";
import { ChatModal } from "./layers/ChatModal";
import { ControlPanel } from "./layers/ControlPanel";
import { CoordinateGridLayer } from "./layers/CoordinateGridLayer";
import { DynamicUILayer } from "./layers/DynamicUILayer";
import { EmojiTable } from "./layers/EmojiTable";
import { EventsDisplay } from "./layers/EventsDisplay";
Expand Down Expand Up @@ -282,6 +283,7 @@ export function createRenderer(
new TerrainLayer(game, transformHandler),
new TerritoryLayer(game, eventBus, transformHandler, userSettings),
new RailroadLayer(game, eventBus, transformHandler, uiState),
new CoordinateGridLayer(game, eventBus, transformHandler),
structureLayer,
samRadiusLayer,
new UnitLayer(game, eventBus, transformHandler),
Expand Down
Loading
Loading