Commit Graph

2987 Commits

Author SHA1 Message Date
scamiv 9710bf3526 Enhance contest management in TerritoryLayer and TerritoryWebGLRenderer
- Introduced ENABLE_CONTEST_TRACKING constant to toggle contest tracking functionality.
- Updated TerritoryLayer to conditionally handle contest updates and rendering based on contestEnabled state.
- Refactored TerritoryWebGLRenderer to manage contest-related uploads and rendering based on contestEnabled flag.
- Improved shader logic to incorporate contestEnabled uniform for better control over contest rendering.
2026-01-12 00:49:56 +01:00
scamiv 938e36fc74 refactor: remove contested territory smoke effects and add tile count tracking
- Remove unused GLSL noise functions (hash12, valueNoise, fbm) from TerritoryWebGLRenderer
- Remove contested fill smoke rendering code that used these noise functions
- Add contestTileCount field to TerritoryLayer to track total contested tiles
- Update debug output to include contest tile count for monitoring
2026-01-12 00:39:08 +01:00
scamiv fc0a335319 Removed contest speed tracking and related properties from TerritoryLayer and TerritoryWebGLRenderer to simplify contest handling.
- Updated contest strength calculations to utilize troop counts directly, enhancing accuracy in contest dynamics.
- Streamlined rendering logic by eliminating unnecessary checks and textures related to contest speeds, improving performance and clarity.
- Refactored related methods to focus on contest strength, ensuring a more cohesive approach to contest state management.
2026-01-11 23:01:42 +01:00
scamiv 25d1805d21 Implement change mask functionality in TerritoryWebGLRenderer
- Added support for change mask textures and framebuffers to track territory ownership changes.
- Introduced a new shader program for change mask processing, enhancing visual fidelity during transitions.
- Updated rendering logic to incorporate change mask updates, improving performance and accuracy in contested areas.
- Refactored related uniform and framebuffer management for better organization and clarity.
2026-01-11 22:32:24 +01:00
scamiv 0a3a77193f accept delay, use triplebuffer,
Refactor contest management in TerritoryLayer and TerritoryWebGLRenderer

- Updated contest duration handling to use ticks instead of milliseconds for improved precision.
- Introduced new tick-based state management for contest updates and rendering.
- Enhanced interpolation logic for smoother transitions between contest states.
- Removed obsolete smooth state handling and related properties to streamline code.
- Added support for older contest states in the WebGL renderer for better visual fidelity.
2026-01-11 21:46:31 +01:00
scamiv 7831f09d46 needs cleanup.
feat: Add view transforms and contest speed/strength visualization
- Add contest speed tracking with exponential moving average for dynamic contest visualization
- Add contest strength calculation based on attacker/defender troop ratios
- Implement view transform support (scale/offset) for zoom and pan functionality
- Add animated contest effects with noise-based cloud rendering
- Improve smooth territory transitions with better edge handling
- Add debug overlay for development with contest and rendering stats
- Refactor WebGL renderer to support world-space rendering instead of pixel-perfect
2026-01-11 19:59:33 +01:00
scamiv 19451fc679 Refactor TerritoryWebGLRenderer to simplify contest handling
- Removed unused variables and logic related to contest state, including attacker relations and border management.
- Streamlined rendering logic by eliminating unnecessary checks for contested states, improving code clarity and performance.
2026-01-10 22:21:28 +01:00
scamiv 6d2a0adff2 Refactor contest duration management in TerritoryLayer and TerritoryWebGLRenderer
- Introduced a constant for default contest duration in TerritoryLayer
- Updated contest duration handling in TerritoryWebGLRenderer
2026-01-10 20:37:40 +01:00
scamiv 3c1d313a0c Enhance TerritoryLayer and theme configuration with player highlight color
- Added playerHighlightColor method to Theme interface and implemented it in PastelTheme and PastelThemeDark classes.
- Updated TerritoryLayer to redraw when the theme changes, ensuring consistent visual updates.
- Modified hoverHighlightOptions to use the new player highlight color for improved territory visualization.
2026-01-10 20:23:58 +01:00
scamiv f31850fba1 minor cleanup 2026-01-10 20:10:41 +01:00
scamiv 6369e706b4 double-jfa distance smoothing 2026-01-10 19:27:22 +01:00
scamiv cc189f7587 Refactor TerritoryLayer and TerritoryWebGLRenderer for improved smoothing management
- Removed redundant smooth state handling in TerritoryLayer, replacing it with a snapshot mechanism for smoother transitions.
- Updated rendering logic in TerritoryWebGLRenderer to utilize framebuffers for state management, enhancing performance and visual fidelity.
- Adjusted shader logic to accommodate new smoothing conditions and removed obsolete properties related to smooth state tracking.
2026-01-10 18:45:50 +01:00
scamiv 96efe978a0 Implemented full‑res JFA smoothing for territory ownership changes and wired it into the layer update loop. The renderer now builds a distance field from the previous‑owner border on the GPU and blends old/new colors over the 100 ms window; contested areas still use their checkerboard effect and skip smoothing.
Details:

Added per‑tile smoothing state in TerritoryLayer.ts (prev owner + change mask + 100 ms timing) and feed progress into the renderer each frame.
Added JFA seed + ping‑pong passes, prevOwner/changeMask textures, and smooth uniforms in TerritoryWebGLRenderer.ts, plus shader blending based on JFA distance.
2026-01-10 04:12:26 +01:00
scamiv 4504c7bd9e Update contest duration 2026-01-10 02:45:16 +01:00
scamiv 12be7514d3 Refactor TerritoryLayer and TerritoryWebGLRenderer for contest management
- Introduced contest management in TerritoryLayer, replacing previous transition handling with a new system for managing contests between tile owners.
- Added methods to handle contest state, including starting, updating, and expiring contests.
- Updated TerritoryWebGLRenderer to support rendering contest data, including new textures and uniforms for contest owners, IDs, and times.
- Enhanced rendering logic to visually represent contest states, including color changes and border effects during contests.
2026-01-10 02:38:57 +01:00
scamiv 0dfb903078 Reused the quick‑info hover logic so territory highlighting now follows boats/ships too.
- Added shared hover helper in HoverInfo.ts (same rules as PlayerInfoOverlay, including nearby ships on water).
- PlayerInfoOverlay.ts now uses getHoverInfo(...) instead of its local hover logic.
- TerritoryLayer.ts now uses getHoverInfo(...) and highlights the unit owner when hovering ships/boats.
2026-01-09 22:07:51 +01:00
scamiv 48c369d22f Remove redundant handling 2026-01-09 21:49:17 +01:00
scamiv fda0b999d9 Refactor TerritoryLayer and TerritoryWebGLRenderer for enhanced transition management
- Updated transition handling in TerritoryLayer, replacing epoch and progress tracking with a more efficient system using arrays for start times and active masks.
- Introduced new methods to manage transition states and ensure proper initialization of transition data.
- Modified TerritoryWebGLRenderer to align with the new transition management, removing obsolete properties and updating uniform handling for transitions.
- Improved rendering logic to support smoother visual updates during tile transitions.
2026-01-09 21:46:21 +01:00
scamiv ddd42fef59 Removed the CanvasTerritoryRenderer and related logic
Refactor TerritoryLayer and Renderer for improved transition handling

- Removed unused imports and types, streamlining the TerritoryLayer code.
- Replaced the `TerritoryRendererStrategy` interface with direct usage of `TerritoryWebGLRenderer`.
- Enhanced transition management by introducing epoch and progress tracking for tile transitions.
- Updated rendering logic to utilize the new transition properties, ensuring smoother visual updates.
- Removed the CanvasTerritoryRenderer and related logic, consolidating rendering responsibilities within the WebGL renderer.
2026-01-09 19:35:22 +01:00
scamiv 62345fc730 Implement tile transition effects in TerritoryLayer
- Introduced a new `TileTransition` type to manage tile transitions.
- Added methods to handle the beginning and updating of tile transitions.
- Enhanced `TerritoryRenderer` interfaces to support transition progress.
- Updated `TerritoryWebGLRenderer` to manage transition textures and rendering.
- Modified `GameView` to track owner changes for tiles, enabling transition effects during gameplay.
2026-01-09 18:55:07 +01:00
scamiv 5ffb90dce8 Enhance TerritoryLayer with palette signature management
- Added `lastPaletteSignature` to track palette changes.
- Implemented `computePaletteSignature()` to generate a unique signature based on player views and settings.
- Introduced `refreshPaletteIfNeeded()` to refresh the palette when the signature changes, ensuring visual consistency in the TerritoryLayer.
2026-01-09 18:08:53 +01:00
scamiv 46e713baf6 v1-dev 2026-01-09 18:00:28 +01:00
evanpelle 1c3ba55ecf update openfront email address in privacy policy and terms of service 2026-01-08 20:31:05 -08:00
bijx 8b6dfeaf4a Feat: Sierpinski map - live play-tested (#2819)
## Description:

Map requested by creator on [dev
discord](https://discord.com/channels/1359946986937258015/1458638914012315741/1458638914012315741)
and playtested by 42 players on [Rex's
stream](https://www.youtube.com/watch?v=r9w9nr5Toso), 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.

<img width="1400" height="1400" alt="image"
src="https://github.com/user-attachments/assets/8eead359-73d5-497f-8fee-40f413a22d0e"
/>



https://github.com/user-attachments/assets/3a726343-18e4-4f91-9f5c-1fff459d5a5f



## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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

---------

Co-authored-by: iamlewis <lewismmmm@gmail.com>
2026-01-08 20:01:43 -08:00
FloPinguin eaef00e05c Some little HumansVsNations improvements before public games launch 🤖 (#2825)
## Description:

- Added `generateUniqueNationName()` to `NationCreation` because I saw a
duplicate name while spawning 300 nations on Pangaea 😄
- Switched HumansVsNations public game difficulty from hard to
impossible because I realized how crazy strong troop donations between
humans are (in an enzo HVN stream).

Maybe I have to make nations donate troops to each other, we will see...
Playtests won't tell the truth because the players attending these are
probably better than the usual OF player. I will try to check the HVN
winrate via API after launch

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-08 19:58:27 -08:00
FloPinguin 96aa39a415 Improve nations 🤖 (#2817)
## Description:

### Refactor

- Moved `maybeSpawnWarship()` from `NationExecution` to
`NationWarshipBehavior`
- Moved `maybeAttack()` (and sub-methods) from `NationExecution` to
`AiAttackBehavior`

### Betrayal

- Added nice betrayal logic in `maybeBetray()`. Previously that method
was basically just a placeholder for a future implementation.

### Attacking

- Added `veryWeak()` attack strategy for hard and impossible difficulty
nations attack orders to target MIRVed players with higher priority
- Optimized the `weakest()` attack strategy so that nations don't attack
stronger players. This should make nation-attacks feel less random
(humans complained in discord)
- `findNearestIslandEnemy()` and `randomBoatTarget()` also no longer
returns stronger players
- `afk()` and `hated()` attack strategies no longer return MUCH stronger
players
- Several tiny refactorings, fixes and balance optimizations in
`AiAttackBehavior`

### Emojis

- Added some `canSendEmoji()` because I saw some "cannot send emoji"
warnings in the console

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-08 19:27:47 -08:00
dependabot[bot] 9c7709ccb5 Bump the npm_and_yarn group across 1 directory with 2 updates (#2830)
Bumps the npm_and_yarn group with 2 updates in the / directory:
[@smithy/config-resolver](https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/config-resolver)
and [qs](https://github.com/ljharb/qs).

Updates `@smithy/config-resolver` from 4.1.4 to 4.4.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/smithy-lang/smithy-typescript/releases"><code>@​smithy/config-resolver</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​smithy/config-resolver</code><a
href="https://github.com/4"><code>@​4</code></a>.4.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [9ccb841]
<ul>
<li><code>@​smithy/types</code><a
href="https://github.com/4"><code>@​4</code></a>.11.0</li>
<li><code>@​smithy/node-config-provider</code><a
href="https://github.com/4"><code>@​4</code></a>.3.7</li>
<li><code>@​smithy/util-endpoints</code><a
href="https://github.com/3"><code>@​3</code></a>.2.7</li>
<li><code>@​smithy/util-middleware</code><a
href="https://github.com/4"><code>@​4</code></a>.2.7</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/smithy-lang/smithy-typescript/blob/main/packages/config-resolver/CHANGELOG.md"><code>@​smithy/config-resolver</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>4.4.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [9ccb841]
<ul>
<li><code>@​smithy/types</code><a
href="https://github.com/4"><code>@​4</code></a>.11.0</li>
<li><code>@​smithy/node-config-provider</code><a
href="https://github.com/4"><code>@​4</code></a>.3.7</li>
<li><code>@​smithy/util-endpoints</code><a
href="https://github.com/3"><code>@​3</code></a>.2.7</li>
<li><code>@​smithy/util-middleware</code><a
href="https://github.com/4"><code>@​4</code></a>.2.7</li>
</ul>
</li>
</ul>
<h2>4.4.4</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [5a56762]
<ul>
<li><code>@​smithy/types</code><a
href="https://github.com/4"><code>@​4</code></a>.10.0</li>
<li><code>@​smithy/node-config-provider</code><a
href="https://github.com/4"><code>@​4</code></a>.3.6</li>
<li><code>@​smithy/util-endpoints</code><a
href="https://github.com/3"><code>@​3</code></a>.2.6</li>
<li><code>@​smithy/util-middleware</code><a
href="https://github.com/4"><code>@​4</code></a>.2.6</li>
</ul>
</li>
</ul>
<h2>4.4.3</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [3926fd7]
<ul>
<li><code>@​smithy/types</code><a
href="https://github.com/4"><code>@​4</code></a>.9.0</li>
<li><code>@​smithy/node-config-provider</code><a
href="https://github.com/4"><code>@​4</code></a>.3.5</li>
<li><code>@​smithy/util-endpoints</code><a
href="https://github.com/3"><code>@​3</code></a>.2.5</li>
<li><code>@​smithy/util-middleware</code><a
href="https://github.com/4"><code>@​4</code></a>.2.5</li>
</ul>
</li>
</ul>
<h2>4.4.2</h2>
<h3>Patch Changes</h3>
<ul>
<li>372b46f: allow * region with warning</li>
</ul>
<h2>4.4.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [6da0ab3]
<ul>
<li><code>@​smithy/types</code><a
href="https://github.com/4"><code>@​4</code></a>.8.1</li>
<li><code>@​smithy/node-config-provider</code><a
href="https://github.com/4"><code>@​4</code></a>.3.4</li>
<li><code>@​smithy/util-endpoints</code><a
href="https://github.com/3"><code>@​3</code></a>.2.4</li>
<li><code>@​smithy/util-middleware</code><a
href="https://github.com/4"><code>@​4</code></a>.2.4</li>
</ul>
</li>
</ul>
<h2>4.4.0</h2>
<h3>Minor Changes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/521d67c38f8928c514d1fcea3fc08e40c2300513"><code>521d67c</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/8b90f360df2a5c80c105db732b3c2f6972994854"><code>8b90f36</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/cc0124e69e2d6943f0960854bcc3abf2defd2c20"><code>cc0124e</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/07f95d95712b511256b542c4dfa368bd70580be8"><code>07f95d9</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/372b46fb0751e6e61cdfccee1fa7e6a531cf6aa4"><code>372b46f</code></a>
fix(config-resolver): allow asterisk region with warning (<a
href="https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/config-resolver/issues/1760">#1760</a>)</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/472a5ea035237e10c560ed362c0e0105805ad26f"><code>472a5ea</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/8af2d330260513d3e51c98f1f137793b5330ceb4"><code>8af2d33</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/13c5cd95b682c9252e6cf15b771b5decdc860729"><code>13c5cd9</code></a>
chore(config-resolver): add region validation cache (<a
href="https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/config-resolver/issues/1750">#1750</a>)</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/f7c7b8249fa91391f73f62fb4237e5436c61be41"><code>f7c7b82</code></a>
Version NPM packages</li>
<li><a
href="https://github.com/smithy-lang/smithy-typescript/commit/9fb748e02081659c1aa523cdab64621467eddbf6"><code>9fb748e</code></a>
Version NPM packages</li>
<li>Additional commits viewable in <a
href="https://github.com/smithy-lang/smithy-typescript/commits/@smithy/config-resolver@4.4.5/packages/config-resolver">compare
view</a></li>
</ul>
</details>
<br />

Updates `qs` from 6.13.0 to 6.14.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ljharb/qs/blob/main/CHANGELOG.md">qs's
changelog</a>.</em></p>
<blockquote>
<h2><strong>6.14.1</strong></h2>
<ul>
<li>[Fix] ensure arrayLength applies to <code>[]</code> notation as
well</li>
<li>[Fix] <code>parse</code>: when a custom decoder returns
<code>null</code> for a key, ignore that key</li>
<li>[Refactor] <code>parse</code>: extract key segment splitting
helper</li>
<li>[meta] add threat model</li>
<li>[actions] add workflow permissions</li>
<li>[Tests] <code>stringify</code>: increase coverage</li>
<li>[Dev Deps] update <code>eslint</code>,
<code>@ljharb/eslint-config</code>, <code>npmignore</code>,
<code>es-value-fixtures</code>, <code>for-each</code>,
<code>object-inspect</code></li>
</ul>
<h2><strong>6.14.0</strong></h2>
<ul>
<li>[New] <code>parse</code>: add
<code>throwOnParameterLimitExceeded</code> option (<a
href="https://redirect.github.com/ljharb/qs/issues/517">#517</a>)</li>
<li>[Refactor] <code>parse</code>: use <code>utils.combine</code>
more</li>
<li>[patch] <code>parse</code>: add explicit
<code>throwOnLimitExceeded</code> default</li>
<li>[actions] use shared action; re-add finishers</li>
<li>[meta] Fix changelog formatting bug</li>
<li>[Deps] update <code>side-channel</code></li>
<li>[Dev Deps] update <code>es-value-fixtures</code>,
<code>has-bigints</code>, <code>has-proto</code>,
<code>has-symbols</code></li>
<li>[Tests] increase coverage</li>
</ul>
<h2><strong>6.13.1</strong></h2>
<ul>
<li>[Fix] <code>stringify</code>: avoid a crash when a
<code>filter</code> key is <code>null</code></li>
<li>[Fix] <code>utils.merge</code>: functions should not be stringified
into keys</li>
<li>[Fix] <code>parse</code>: avoid a crash with
interpretNumericEntities: true, comma: true, and iso charset</li>
<li>[Fix] <code>stringify</code>: ensure a non-string
<code>filter</code> does not crash</li>
<li>[Refactor] use <code>__proto__</code> syntax instead of
<code>Object.create</code> for null objects</li>
<li>[Refactor] misc cleanup</li>
<li>[Tests] <code>utils.merge</code>: add some coverage</li>
<li>[Tests] fix a test case</li>
<li>[actions] split out node 10-20, and 20+</li>
<li>[Dev Deps] update <code>es-value-fixtures</code>,
<code>mock-property</code>, <code>object-inspect</code>,
<code>tape</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ljharb/qs/commit/3fa11a5f643c76896387bd2d86904a2d0141fdf7"><code>3fa11a5</code></a>
v6.14.1</li>
<li><a
href="https://github.com/ljharb/qs/commit/a62670423c1ccab0dd83c621bfb98c7c024e314d"><code>a626704</code></a>
[Dev Deps] update <code>npmignore</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/3086902ecf7f088d0d1803887643ac6c03d415b9"><code>3086902</code></a>
[Fix] ensure arrayLength applies to <code>[]</code> notation as
well</li>
<li><a
href="https://github.com/ljharb/qs/commit/fc7930e86c2264c1568c9f5606830e19b0bc2af2"><code>fc7930e</code></a>
[Dev Deps] update <code>eslint</code>,
<code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/0b06aac566abee45ef0327667a7cc89e7aed8b58"><code>0b06aac</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/64951f6200a1fb72cc003c6e8226dde3d2ef591f"><code>64951f6</code></a>
[Refactor] <code>parse</code>: extract key segment splitting helper</li>
<li><a
href="https://github.com/ljharb/qs/commit/e1bd2599cdff4c936ea52fb1f16f921cbe7aa88c"><code>e1bd259</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/f4b3d39709fef6ddbd85128d1ba4c6b566c4902e"><code>f4b3d39</code></a>
[eslint] add eslint 9 optional peer dep</li>
<li><a
href="https://github.com/ljharb/qs/commit/6e94d9596ca50dffafcef40a5f64eca89962cf34"><code>6e94d95</code></a>
[Dev Deps] update <code>eslint</code>,
<code>@ljharb/eslint-config</code>, <code>npmignore</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/973dc3c51c86da9f4e30edeb4b1725158d439102"><code>973dc3c</code></a>
[actions] add workflow permissions</li>
<li>Additional commits viewable in <a
href="https://github.com/ljharb/qs/compare/v6.13.0...v6.14.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/openfrontio/OpenFrontIO/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 19:23:34 -08:00
Aotumuri 9f530b5fd7 Public lobby team count wording update (#2836)
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves
https://github.com/openfrontio/OpenFrontIO/pull/2677#issuecomment-3725268126

## Description:

Update public lobby team count strings to clarify that counts refer to
teams .

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

aotumuri
2026-01-08 19:22:39 -08:00
DevelopingTom 971e7f4a45 Move UI elements from the FX layer to a new UI layer (#2827)
## Description:

Some FX animations were previously used as UI elements (e.g. nuke area,
naval invasion target, gold text).
This PR moves those animations to a dedicated UI layer.

Those UI elements handle correctly the current zoom level and remain
sharply rendered at all zoom levels.

The new UI layer can be disabled using the same setting that disables
the FX layer.

Performance-wise, this layer is equivalent to the FX layer, as it reuses
the same animations.

### Naval target
Don't scale with the zoom level, but has a minimum zoom level so the
targeted tile can still be easily highlighted by zooming


![ui_naval_invasion](https://github.com/user-attachments/assets/43c36c80-ffba-4443-bd53-05617c793fc8)

### Nukes
Has to scale because the size is set, but the border radius is not so
the area is more visible from afar.


![ui_nukes](https://github.com/user-attachments/assets/7ca0685c-0432-4b72-8c6d-48a814a02326)


### Popup text
Scale with zoom level, and stop showing when zoomed-out:

![ui_text](https://github.com/user-attachments/assets/d92c085e-9e20-4cad-bf3a-ae5d320dde33)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

IngloriousTom
2026-01-08 19:21:40 -08:00
Evan 8ff3f4496c Update & improve 1v1 Ranked Matchmaking (#2831)
references #2001

## Description:

Improve the ranked matchmaking modal. Better messages, and show 1v1 elo


<img width="450" height="210" alt="Screenshot 2026-01-08 at 7 11 20 PM"
src="https://github.com/user-attachments/assets/e4f8323c-5d98-48de-babe-b51526a6d408"
/>

<img width="622" height="614" alt="Screenshot 2026-01-08 at 7 11 14 PM"
src="https://github.com/user-attachments/assets/73d10f84-b5b5-4ba8-95bb-a181a9fd9dae"
/>



## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

evan
2026-01-08 19:18:04 -08:00
bijx c769e4a99a Feat: SAM Radius arcs show when building cities (#2828)
## Description:

Simple PR, but adds the feature where using the hotkey to build a city
will show SAM radius layer to let user know safe areas to build.

<img width="2126" height="1398" alt="image"
src="https://github.com/user-attachments/assets/8aed5514-51c4-40f4-a446-e3c52346abc8"
/>

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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
2026-01-09 01:10:22 +00:00
Mattia Migliorini 2dada6f516 Handle Nation win condition (#2824)
Resolves #2823

## Description:

When playing in single-player mode, if an NPC reaches 80% land control
before the player, the game enters a broken state where:

- The game clock stops
- Win checking stops permanently
- Even if the player later conquers 100% of land, victory is never
awarded
- The game becomes "stuck" in a zombie state.

This PR addresses this allowing Nations to be set as winners in single
mode, and in this case showing a "Nation {nation} has won" modal to the
user. This WinModal is the same as the "{player} has won", with the only
change being the title.

Nation wins in FFA, from the human player perspective:

<img width="1457" height="837" alt="image"
src="https://github.com/user-attachments/assets/1ce569bd-6616-4a23-b4a4-afedad2c64f8"
/>

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

deshack_82603
2026-01-08 13:51:23 -08:00
Arkadiusz Sygulski b090f2f624 HPA* Pathfinding (#2815)
## Pathfinding with HPA*

Hi! The primary objective of this PR is to replace per-tile A* with
hierarchical pathfinding - HPA*. In practice, this means we create an
abstract graph on top of the actual map with far fewer points and use it
to decide on general path structure. Only then we go back to tile-level
and build path between selected waypoints. This speeds up long distance
pathfinding by over 1000x in some cases. To make the review easier, it
comes with a benchmark and visual playground.

## PREPROCESSING

H part of HPA* means "hierarchical" and requires preprocessing.

This PR includes pre-processing as part inside `new Game()` constructor.
It takes about 135ms for `giantworldmap` on my machine, which increases
the effective initialization from ~95ms to ~230ms. This time could be
reduced in different ways, which are **out of scope** for this PR.

After confirming the initialization time is bearable on low-end devices,
I argue merging this PR as-is is acceptable tradeoff. It creates small
lag at the beginning of a round but pays for itself in the first minute
of the match.

## Nerdy details

**Architecture**
- HPA*-style hierarchical pathfinding
- 32×32 sectors on minimap with gateway nodes on borders
- Gateway graph built via BFS during preprocessing
- Water component optimization skips unreachable gateway pairs
- A* on gateway graph → local A* within sectors → Bresenham path
smoothing
- Minimap upscaling identical to currently used in MiniAStar

**Key Optimizations**
- Typed arrays instead of high-level primitives
- Stamp-based visited tracking (no need to recreate buffers, O(1)
clearing)
- Optional - enabled by default - caching of tile paths between gateways
- Line of sight smoothing for the final path

## Review Focus

Play with included tools, benchmark and visualization. Pathfinding
should be safe to merge as a black box - you do not need to understand
the details. Outcomes can be tested empirically in-game. Visualize (and
share!) edge cases with included playground. Confirm the 100x speedup is
real with benchmark.

If you plan to dive into the code, I suggest the following order:
- Pathfinding abstraction in `src/core/pathfinding/`
- Pathfinding tests in `tests/core/pathfinding/`
- NavMesh in `src/core/pathfinding/navmesh/` + integration with
`Game.ts`
- Benchmark in `tests/pathfinding/benchmark/`

Do not look at playground's code, it has been created with a clanker.
The design is 100% mine and I spent way too long polishing it, but I
haven't even once edited the code manually. There is probably no
abstraction whatsoever, just do not look at the code, let it play.

## Core Changes

#### Pathfinding (`src/core/pathfinding/navmesh/`)
- HPA* + refinement -> three phased pathfinding: A* over the graph ->
naive path -> refinement
- comes with A* and BFS optimized for for specific needs

#### Pre-Processing (`src/core/pathfinding/navmesh/`)
- identify water bodies to avoid pathfinding between disconnected nodes
- create high-level graph of gateways on top of tile map

#### Abstraction (`src/core/pathfinding/`)

- common `PathFinder` interface that can return full path and also act
as state machine (`.next()`)
- adapters for both new and legacy algorithm with fallback to legacy if
navigation mesh not available

#### Benchmark (`tests/pathfinding/benchmark/`)

- `npx tsx tests/pathfinding/benchmark/run.ts` - no guesswork, numbers
- `npx tsx tests/pathfinding/benchmark/run.ts --synthetic` - 1000s of
synthetic paths
- `npx tsc tests/pathfinding/benchmark/generate.ts` - generate more as
needed, test new maps
- includes ONE synthetic scenario to avoid PR bloat, generate more
locally / later

#### Playground (`tests/pathfinding/playground/`)

- `npx tsx tests/pathfinding/playground/server.ts` - visualize paths
with both new and legacy algorithm

## Benchmarks

### Compared with legacy in default - hand picked - scenario:
```
Initialization: 95.95ms -> 227.29ms
Pathfinding: 3038.43ms -> 6.45ms
Distance: 26972 -> 26810 tiles
```

### 42,000 synthetic routes across all maps
```
Running 42 synthetic scenarios with hpa.cached adapter...

 synthetic/achiran                   | Init:    93.42ms | Path:    139.07ms | Dist: 1481630 tiles | Routes: 1000/1000
 synthetic/africa                    | Init:    87.14ms | Path:    155.08ms | Dist: 1829414 tiles | Routes: 1000/1000
 synthetic/asia                      | Init:    57.60ms | Path:    112.55ms | Dist: 1204082 tiles | Routes: 1000/1000
 synthetic/australia                 | Init:    78.18ms | Path:     77.12ms | Dist:  978375 tiles | Routes: 1000/1000
 synthetic/baikal                    | Init:    78.26ms | Path:    152.14ms | Dist: 1600016 tiles | Routes: 1000/1000
 synthetic/baikalnukewars            | Init:    81.44ms | Path:    165.90ms | Dist: 1699283 tiles | Routes: 1000/1000
 synthetic/betweentwoseas            | Init:    29.29ms | Path:    114.99ms | Dist: 1338075 tiles | Routes: 1000/1000
 synthetic/blacksea                  | Init:    30.66ms | Path:     93.14ms | Dist:  949217 tiles | Routes: 1000/1000
 synthetic/britannia                 | Init:    74.12ms | Path:     85.62ms | Dist:  866752 tiles | Routes: 1000/1000
 synthetic/deglaciatedantarctica     | Init:   105.49ms | Path:    192.93ms | Dist: 1574684 tiles | Routes: 1000/1000
 synthetic/didier                    | Init:    81.51ms | Path:    153.70ms | Dist: 1734876 tiles | Routes: 1000/1000
 synthetic/eastasia                  | Init:    49.29ms | Path:    128.63ms | Dist: 1410270 tiles | Routes: 1000/1000
 synthetic/europe                    | Init:    92.55ms | Path:    178.35ms | Dist: 1525216 tiles | Routes: 1000/1000
 synthetic/europeclassic             | Init:    33.50ms | Path:    104.40ms | Dist: 1209759 tiles | Routes: 1000/1000
 synthetic/falklandislands           | Init:    63.00ms | Path:    107.41ms | Dist: 1080251 tiles | Routes: 1000/1000
 synthetic/faroeislands              | Init:    71.91ms | Path:     49.52ms | Dist:  604613 tiles | Routes: 1000/1000
 synthetic/fourislands               | Init:    45.75ms | Path:     78.91ms | Dist:  937439 tiles | Routes: 1000/1000
 synthetic/gatewaytotheatlantic      | Init:    81.00ms | Path:    257.06ms | Dist: 2555551 tiles | Routes: 1000/1000
 synthetic/giantworldmap             | Init:   214.25ms | Path:    220.42ms | Dist: 1976693 tiles | Routes: 1000/1000
 synthetic/gulfofstlawrence          | Init:    45.16ms | Path:     96.05ms | Dist: 1014604 tiles | Routes: 1000/1000
 synthetic/halkidiki                 | Init:    74.68ms | Path:    149.39ms | Dist: 1546781 tiles | Routes: 1000/1000
 synthetic/iceland                   | Init:    58.72ms | Path:     78.16ms | Dist: 1001554 tiles | Routes: 1000/1000
 synthetic/italia                    | Init:    29.78ms | Path:    139.93ms | Dist: 1412024 tiles | Routes: 1000/1000
 synthetic/japan                     | Init:   161.07ms | Path:    118.65ms | Dist: 1154393 tiles | Routes: 1000/1000
 synthetic/lemnos                    | Init:    52.59ms | Path:    136.69ms | Dist: 1481101 tiles | Routes: 1000/1000
 synthetic/lisbon                    | Init:    49.27ms | Path:     86.53ms | Dist: 1032011 tiles | Routes: 1000/1000
 synthetic/manicouagan               | Init:    53.74ms | Path:    110.52ms | Dist: 1307630 tiles | Routes: 1000/1000
 synthetic/mars                      | Init:    29.39ms | Path:     80.55ms | Dist: 1091702 tiles | Routes: 1000/1000
 synthetic/mena                      | Init:    26.37ms | Path:    120.09ms | Dist: 1272751 tiles | Routes: 1000/1000
 synthetic/montreal                  | Init:    26.08ms | Path:    106.77ms | Dist: 1187736 tiles | Routes: 1000/1000
 synthetic/newyorkcity               | Init:    56.60ms | Path:    181.19ms | Dist: 1753875 tiles | Routes: 1000/1000
 synthetic/northamerica              | Init:    96.29ms | Path:    123.02ms | Dist: 1217221 tiles | Routes: 1000/1000
 synthetic/oceania                   | Init:    52.81ms | Path:     51.96ms | Dist:  482373 tiles | Routes: 1000/1000
 synthetic/pangaea                   | Init:    21.29ms | Path:     56.58ms | Dist:  716189 tiles | Routes: 1000/1000
 synthetic/pluto                     | Init:    53.89ms | Path:    141.62ms | Dist: 1304362 tiles | Routes: 1000/1000
 synthetic/southamerica              | Init:    85.19ms | Path:    123.03ms | Dist: 1301403 tiles | Routes: 1000/1000
 synthetic/straitofgibraltar         | Init:    76.68ms | Path:    108.30ms | Dist: 1304592 tiles | Routes: 1000/1000
 synthetic/straitofhormuz            | Init:    38.97ms | Path:     67.78ms | Dist:  754920 tiles | Routes: 1000/1000
 synthetic/surrounded                | Init:    95.35ms | Path:     90.18ms | Dist: 1017142 tiles | Routes: 1000/1000
 synthetic/svalmel                   | Init:    60.58ms | Path:    104.75ms | Dist: 1235501 tiles | Routes: 1000/1000
 synthetic/twolakes                  | Init:    62.05ms | Path:     94.54ms | Dist: 1140807 tiles | Routes: 1000/1000
 synthetic/world                     | Init:    41.43ms | Path:     93.42ms | Dist:  873406 tiles | Routes: 1000/1000

Completed 42 scenarios
Total Initialization Time: 2796.32ms
Total Pathfinding Time: 5026.64ms
Total Distance: 53160274 tiles
```

## Playground

**That's the fun part**. Watch NavMesh running circles around legacy
`PathFinder.Mini` in real time. Debug inner workings, test edge cases,
share URLs for debugging.


https://github.com/user-attachments/assets/34e2e3f5-fbc1-4b1f-917d-820766e98d5d

## Discord Tag
`moleole`
2026-01-08 13:34:18 -08:00
bijx 9512e480d2 Fix: Players don't auto-send emoji replies when donated to, unlike nations (#2808)
## Description:

The new (awesome) nation emoji updates had a small bug in them when I
was playtesting with a friend where donating troops to them (a human
player) would result in the player automatically sending an emoji reply.
Sometimes these replies were negative-connotations like  and 🥱, which
could impact how other players perceive their donation attempt. This PR
fixes that issue.

### Example of player nation sending emojis automatically


https://github.com/user-attachments/assets/99689966-b784-4c3f-b43b-953a4a102e2d

### Donating to player after fix


https://github.com/user-attachments/assets/ace0c1ee-3eb8-4240-9c78-167dd773cfb2



## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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
2026-01-08 15:08:11 +00:00
bijx 5d9b834696 Feat: Infocard shows wilderness / irradiated terrain state (#2807)
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves #2516

## Description:

Introduces a state to the Player Info Overlay which simply shows what
type of terrain the player is hovering on. This just builds on the
principles of continuous feedback when designing UX because players
react positively when the game responds to input action.

<img width="839" height="846" alt="image"
src="https://github.com/user-attachments/assets/4b2969e0-127d-4032-9c49-9cbff9bb2aeb"
/>

<img width="666" height="602" alt="image"
src="https://github.com/user-attachments/assets/5fd15ab1-98b1-472f-a83e-a1ee10338673"
/>



https://github.com/user-attachments/assets/7e39f53e-6d2e-479e-badd-b41484591b8b



## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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
2026-01-07 19:49:49 -08:00
bijx 1cd18835c2 fix: Input text fields no longer have transparent backgrounds after tailwind update (#2809)
## Description:

Woah 🚨🚨 massive PR alert!!! Kidding, this is a really small fix that
adds back the white background on text input fields since (I believe)
the tailwind updates made recently reset the styles here. This just adds
it back via CSS.

### Before
<img width="1317" height="724" alt="image"
src="https://github.com/user-attachments/assets/8ecaed7e-2808-4e36-8348-c9f8da7804ca"
/>
<img width="1135" height="629" alt="image"
src="https://github.com/user-attachments/assets/713d0aae-5209-474f-b48e-1623fb8f513d"
/>

## After
<img width="1330" height="812" alt="image"
src="https://github.com/user-attachments/assets/afe5c392-0555-47d7-a5b2-a068561efdb2"
/>
<img width="1219" height="834" alt="image"
src="https://github.com/user-attachments/assets/6bf51124-55e2-4bc3-b475-75f931a4ee84"
/>


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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
2026-01-07 19:31:45 -08:00
Ryan Huellen f67ba713bc fix: possibility for negative values in gold and troop donation (#2810)
## Description:

Previously, the zod schemas for troop and gold donation allowed for
negative values which could open the game up to vulnerabilities through
undefined behavior in the future. We mitigate these vulnerabilities but
adding `.nonnegative` to the `DonateGoldIntentSchema` and
`DonateTroopIntentShcema` respectively. Today, code exists to prevent
this deeper in the codebase, but we should also prevent this earlier if
possible during intent validation.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

haticus
2026-01-07 19:31:08 -08:00
TsProphet94 516d268c88 Restructured PR for Britannia Remastered Addition (#2813)
## Description:

Adds a new detailed Britannia map featuring modern UK, Ireland, and
northern France regions. The previous Britannia map has been preserved
as "Britannia Classic".

<img width="4096" height="5031" alt="United Kingdom"
src="https://github.com/user-attachments/assets/8a6ca3ab-bc91-438f-8ca7-7fdf7c5260b8"
/>

<img width="4096" height="5031" alt="United Kingdom_debug"
src="https://github.com/user-attachments/assets/a9a7bcd2-1dc5-40c6-a547-a7a79e636060"
/>



Changes
Added new Britannia map with modern county/region divisions
Renamed existing Britannia map to "Britannia Classic"
Added map-generator source assets for both maps
Updated GameMapType enum with BritanniaClassic
Configured player counts: 50/30/20 for both maps
Added playlist frequencies: Britannia (5), Britannia Classic (4)
Updated language translations

New Britannia Nations (partial list)
Ireland: Mayo, Kerry, Clare, Meath, and more
Scotland: Highland, Argyll and Bute, and more
England: North Yorkshire, and more
France: Pas-de-Calais
Britannia Classic

The original Britannia map with historical kingdoms (Dumnonia, Dyfed,
Gwent, Gwynedd, Powys, Strathclyde, Dalriata, Wessex, Sussex, Kent,
etc.) is now available as "Britannia Classic".

## Please complete the following:

- [X ] I have added screenshots for all UI updates
- [X ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X ] I have added relevant tests to the test directory
- [X ] 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:

TSProphet

---------

Co-authored-by: Harry <Harry.bath94@gmail.com>
Co-authored-by: iamlewis <lewismmmm@gmail.com>
2026-01-07 19:29:35 -08:00
evanpelle 81ae714533 Revert "Allow NUM_WORKERS override (#2776)"
This reverts commit 3cd22745f7.

num_workers was not passed to the client
2026-01-07 16:16:58 -08:00
Aotumuri 3cd22745f7 Allow NUM_WORKERS override (#2776)
Resolves #2610

## Description:

Add NUM_WORKERS env override for server worker count.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:
aotumuri

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2026-01-06 19:40:00 -08:00
FloPinguin ebcb654825 Added a public game modifier system 😮 For more variety (#2801)
## Description:

Added a public game modifier system. It causes that

5% of public games are played on the compact version of the map
10% of public games have "Random Spawn" activated

Percentages can easily get changed via `DefaultConfig`.
We can also easily add more modifiers.
Modifiers can stack, so in rare cases you will play on a compact map
with random spawn 😄
More variety!

### "Compact Map" modifier implementation

- With the "Compact Map" modifier the lobby max player count gets
reduced to 25% and only 25% of the regular bots and only 25% of the
regular nations will spawn (because the map has only 25% of its regular
size)
- In private lobbies and singleplayer the nation reduction happens too
(When "Compact Map" is enabled).

### Restrictions

- Duos/Trios/Quads team modes do not get Random Spawn (defeats the
purpose)
- Maps with smallest player count < 50 do not get Compact Map in team
games (not enough players after the reduction to 25%). I have calculated
all the possible max player counts.

### How it looks like

Random Spawn modifier:

<img width="528" height="183" alt="Screenshot 2026-01-06 194959"
src="https://github.com/user-attachments/assets/2f729da9-80c3-4548-8205-71129da2a76a"
/>

Very rare case: Two modifiers at the same time and only 10 max players
have been chosen from `[GameMapType.FaroeIslands]: [20, 15, 10]`.
Because of the 75% reduction in player count only 3 players are allowed
(3 is the minimum). I think its funny that you can play a 1v1v1 in rare
occasions 😄

<img width="526" height="184" alt="Screenshot 2026-01-06 194938"
src="https://github.com/user-attachments/assets/834326eb-df03-41b7-b1db-1efa3f1013b5"
/>

### Funny side-effect

Team games with random spawn. That will be interesting. No more "Who is
better in donating troops to the frontline". Instead you have to heavily
coordinate with your teammates.

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-06 19:37:58 -08:00
FloPinguin 387190b916 New map! "Amazon River" 🏞️ (#2798)
## Description:

We didn't have a river map and we didn't have a map with a crazy size.
So I made a "Amazon River" map with a crazy size.
280 x 5536!
21 nations based on real locations.
Should be interesting gameplay because you don't have many attack
options, your only escape is the river.
The land tiles size is similar to the achiran and iceland map.

<img width="2442" height="147" alt="Screenshot 2026-01-06 150831"
src="https://github.com/user-attachments/assets/91c4142d-c1e3-4aee-ac49-529b8d9f60c4"
/>

<img width="2324" height="139" alt="Screenshot 2026-01-06 150957"
src="https://github.com/user-attachments/assets/5e049ae5-f32a-495f-afde-9e20257b3676"
/>

Because the map is so wide, it looked really ugly stretched in the
thumbnails. So I added some CSS which removes the thumbnail stretching
of the Amazon River map. We can also use this logic for other thumbnails
which shouldn't get stretched.

In `Maps.ts`, `PublicLobby.ts` and `GameInfoModal.ts`.

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-06 19:34:02 -08:00
Wraith ae5c111282 fix(build): remove old configration files for postcss and tailwind in (#2803)
## Description:

fix(build): remove old configration files for postcss and tailwind in
docker builds and eslint config

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

wraith4081
2026-01-06 19:31:26 -08:00
aConifer effce3d14a add teammate pulse highlight during spawn phase in team games (#2768)
Adds a pulsing highlight effect for teammates during the spawn phase in
team games. This helps colorblind players identify their teammates on
the map more easily.

- Teammates show a subtle green/team-colored pulse (5-14px radius)
- Player's own pulse remains unchanged (8-24px white pulse)
- Only activates during spawn phase in team games
- Animation stays synchronized with player's own pulse

I didn't want to come empty handed with my request so I generated the
code
I do know python and a little rust, but don't have TypeScript experience
- I know you guys are probably getting flooded with AI slop so I hope
its okay.
Please implement the feature at the very least because its SO much
better not having to hunt around.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

So the code calls drawTeammateHighlights() inside of
drawFocusedPlayerHighlight() so it can only occur where current
highlighting occurs
Then uses the existing isOnSameTeam() to find teammates
Then uses the existing drawBreathingRing() function 


- [x] I have added screenshots for all UI updates
I took a video since it best captures the feature
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
I'm not that good at coding formally, I tested it manually by loading
into team games, but I'm going to need help with the code being tested.
(Please help)
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
I did load into multiple lobbies and made sure the feature works, its a
really simple feature so I am confident there isn't any Lovecraftian bug
lurking in it. It also uses mostly existing functions and features
within the code base.




https://github.com/user-attachments/assets/857cce43-4fb2-4c5d-bc04-1a6617570dee

Co-authored-by: Daniel <daniel@mangoit.ca>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: iamlewis <lewismmmm@gmail.com>
2026-01-06 14:22:57 -08:00
Wraith e79c805804 refactor(ui): migrate tailwindcss v3 to v4 (#2735)
## Description:

migrate tailwindcss v3 to v4

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

wraith4081

---------

Co-authored-by: iamlewis <lewismmmm@gmail.com>
Co-authored-by: Ryan <7389646+ryanbarlow97@users.noreply.github.com>
2026-01-06 14:21:52 -08:00
evanpelle 24716f848d bugfix: hide language button when starting game 2026-01-06 09:33:25 -08:00
FloPinguin 69fe93f6ff Fix little translation problem "host_modal.bots" (#2799)
## Description:

Fixes this:

<img width="1485" height="960" alt="image"
src="https://github.com/user-attachments/assets/fa27b2da-fe2c-4423-9f25-3051b93de77b"
/>

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-06 08:23:13 -08:00
Evan 38f8c6b995 Move language button to bottom left (#2796)
## Description:

Move the language button to the bottom left so it takes up less space.

<img width="615" height="567" alt="Screenshot 2026-01-05 at 5 54 23 PM"
src="https://github.com/user-attachments/assets/f29d5bcb-8627-493a-8c0f-1966cb9c9be6"
/>

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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:

evan
2026-01-05 17:57:26 -08:00
bijx b9f4a8d77b Feat: Singleplayer Achievements (#2734)
Contributes towards the ongoing task of adding achievements: #2706

## Description:
Introduces a concept design and API implementation for singleplayer win
achievements. New row of ~5~ 4 medals is added to the map select screen
in the Singleplayer modal, one for each difficulty:
<img width="3132" height="779" alt="image"
src="https://github.com/user-attachments/assets/da8f0314-ccad-4f45-a03f-1beb46981301"
/>

In order to achieve a medal in a particular map, you must win the
singleplayer game (multiplayer and private match games don't count) in
the selected difficulty **without tampering with the options or
settings**. If any setting is changed from the default, regardless of
the difficulty, you will ~receive a fifth "Custom" medal~ not receive
the medal for that difficulty. Team games **do not** count towards the
medal achievement.

Completion of a medal will fill in the full correct color, as defined in
our `variables.css`:
<img width="694" height="778" alt="image"
src="https://github.com/user-attachments/assets/1b2d8370-aa86-4329-9402-adf43f3ef799"
/>

Completion medals can be toggled on or off (hidden by default) with the
toggle button at the top of the section:


https://github.com/user-attachments/assets/d08a58e0-b534-430e-9e8f-559134ad8852


[API implementation PR](https://github.com/openfrontio/infra/pull/234)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] 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

---------

Co-authored-by: iamlewis <lewismmmm@gmail.com>
Co-authored-by: Evan <evanpelle@gmail.com>
2026-01-05 16:27:36 -08:00
FloPinguin ecc174d248 New map! "Didier" 🧸 (#2794)
## Description:

Didier map for the big french youtuber Fuze which already published
several OpenFront videos.
I took the real france, cut away the bordering countries and made it
look like Didier 😄
Gave it eyes, hands and feet.
Made sure we have some rivers, also put Corsica in the right bottom
corner!
It's quite large. Similar to the europe map. Has 42 nations (38 french
cities and 4 funny custom nations for the youtuber).
Made with [TsProphets map
generator](https://github.com/TsProphet94/OpenFrontMapGenerator), QGIS
and GIMP.
For public games I put a rare map frequenzy of 2 because most people
probably don't know Fuze.

@ibnhalwa from discord gave some insider knowledge about Fuze (He's
french, I'm not).

<img width="2100" height="2250" alt="image"
src="https://github.com/user-attachments/assets/5d1c3c45-4b2e-4f60-a02f-89b26f938652"
/>

<img width="1278" height="1218" alt="Screenshot 2026-01-05 184540"
src="https://github.com/user-attachments/assets/6e300bb0-6e9f-4b0f-bad8-94f031d250b1"
/>


![1_1200x1200_crop_center](https://github.com/user-attachments/assets/09b2aca7-32be-4ddc-9638-de7fe8c9f30c)

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] 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:

FloPinguin
2026-01-05 16:19:13 -08:00