Commit Graph

101 Commits

Author SHA1 Message Date
VariableVince 6ca81211ea Alert frame: add to in-game settings, orange for attack instead of red (#2561)
## Description:

The red alert frame for betrayals was added in
https://github.com/openfrontio/OpenFrontIO/pull/1195. It also flashes
red for incoming land attacks since
https://github.com/openfrontio/OpenFrontIO/pull/2358.

The same color for betrayals and attacks leads to confusion. And
possibly red alert fatigue. But when players find themselves fatigued
and want to shut it off for awhile, they can't because the setting
doesn't exist in-game. Also, the setting description on the homepage
settings didn't yet reflect that the alert frame flashes for attacks
too.

This PR fixes this by:

- making the color for land attacks orange. This is well discernable
from red for various colorblindness types, while still looking alarming.
- adding the setting to in-game SettingsModal 
- adding land attack to setting description

Reference to comments on it on Dev Discord:

https://discord.com/channels/1359946986937258015/1381347989464809664/1441232666065240064


https://discord.com/channels/1359946986937258015/1360078040222142564/1434574256704061523

Orange alert frame on being attacked over land:

https://github.com/user-attachments/assets/e0772d62-5b25-4213-a393-dd5af13e8bc9

Settings description change and addition to in-game toggles:
<img width="560" height="160" alt="Added to description what was added
in PR 2358"
src="https://github.com/user-attachments/assets/bc6e2206-b7ac-498d-9009-d2b6e302d3cf"
/>

<img width="665" height="425" alt="In SettingsModal and with attacks
added to description"
src="https://github.com/user-attachments/assets/d489830c-e359-4a5f-8eb4-3caa7d0c21b2"
/>

## 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:

tryout33
2025-12-04 13:26:55 -08:00
Hauke12345 dcf5d1b103 Fading handshake (#2474)
## Description:
Add dynamic alliance icon with time-based fill and extension request
indicator

- Implement bottom-up green fill on alliance icon proportional to
remaining time
- Use AllianceIconFaded.svg as base layer with green overlay clipped
from top
- Add 20-82.40% clip range to account for icon vertical offset 

## 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


<img width="1132" height="631" alt="Screenshot 2025-11-18 205205"
src="https://github.com/user-attachments/assets/4af71ddc-f847-4460-9046-167275efc773"
/>
<img width="1387" height="792" alt="Screenshot 2025-11-18 205532"
src="https://github.com/user-attachments/assets/9dd0e018-323f-4de1-bae8-2633c09fe867"
/>

## Please put your Discord username so you can be contacted if a bug or
regression is found:
hauke4707

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-11-19 12:32:01 -08:00
Fx Morin a883d612e0 Performance: Remove un-optimized blurring (#2466)
## Description:
I haven't been able to play openfront for a while now, so today I took
some time to fix the performance issue.
It turns out its `backdrop-filter: blur(5px);` being used on a
background element, causing the entire website to re-paint on nearly
every change.
This causes the game to run at 8 fps on my computer, with chrome
reporting 700ms of INP presentation delay.

The solution here was simply to pre-blur the background image.

<details>
<summary>Here's the instructions on how to pre-blur exactly like it
currently does</summary>

Install sharp
`npm install sharp`  

Run blur
```ts
sharp(`./resources/images/EuropeBackground.webp`)
  .blur(5)
  .toFile(`./resources/images/EuropeBackgroundBlurred.webp`);
```
This could be automated if you plan to do more backgrounds.  
</details>
  

The surprising part is that I'm running a A5000 with a Ryzen 9 5950X. So
I usually never lag from anything, which is what made this kinda
interesting. I assume the issue is caused by my 4K display or Kubuntu.

## Video:
This video showcases the 700+ms of delay on the main menu buttons. Video
is in real-time.


https://github.com/user-attachments/assets/ad5ff509-6bc7-48ff-8cba-85409be774f0



## 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

<details>
<summary>Discord Username</summary>

fx.morin

</details>
2025-11-16 13:32:30 -08:00
iamlewis c0c31a980b Discord and OFM advert added (#2380)
## Description:

Adds a win modal for OFM and the main discord. Adds needed translation
keys and an OFM picture back to the resources file

## 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:

Iamlewis

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-11-04 15:56:27 -08:00
evanpelle 4144628808 Revert "Halloween Event (#2285)"
This reverts commit b69adf70b3.
2025-11-04 09:26:48 -08:00
evanpelle ca28db735f Revert "Resize structure sprites so they don't leave pixels behind when deleted (#2304)"
This reverts commit df8118e27d.
2025-11-04 09:26:39 -08:00
DevelopingTom df8118e27d Resize structure sprites so they don't leave pixels behind when deleted (#2304)
## Description:

Reduce halloween sprites size so they don't leave pixel behinds when
deleted

## 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
2025-10-26 23:05:30 +01:00
DevelopingTom b69adf70b3 Halloween Event (#2285)
## Description:

Changed theme colors for an "autumn" ambiance:

<img width="395" height="254" alt="image"
src="https://github.com/user-attachments/assets/67bd07d3-e74b-49e2-ba0b-c87958767d45"
/>

Changed structures pixel art:

<img width="756" height="605" alt="image"
src="https://github.com/user-attachments/assets/5158ae81-0641-413c-8862-367259496a9a"
/>


Change existing FX with new halloween-themed ones:


https://github.com/user-attachments/assets/fb99be49-43cd-4d85-ad77-8c153070edaf

Added new FX playing randomly on the map:


https://github.com/user-attachments/assets/16631113-77e6-4b8c-b1b6-c147f5f1d275

Added a couple of new emojis, which are used by the bots when attacked:
👻🎃

## 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
2025-10-25 14:06:15 -07:00
Abdallah Bahrawi 175d492b99 Improve player panel (#2060)
## Description:

Fixes #2015
Improved the Player Panel UI for better usability and appearance.

**Screenshots**

<img width="334" height="523" alt="2"
src="https://github.com/user-attachments/assets/bd0afaac-07df-4abc-a20f-208a0783e558"
/>

<img width="337" height="523" alt="3"
src="https://github.com/user-attachments/assets/f712ad77-4546-487b-9a9c-2c535b8a45f7"
/>

**Future Plan**

Add a modal for sending gold and troops to other players from the Player
Panel.

<img width="343" height="494" alt="sending troops"
src="https://github.com/user-attachments/assets/9c9c21db-e13a-426f-93e9-b477a9db442a"
/>


## 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:

abodcraft1

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-10-06 12:45:30 -07:00
icslucas b31200a3ac MUSIC (#2090)
## Description:
add music to the game
Describe the PR.
add music
<img width="549" height="770" alt="image"
src="https://github.com/user-attachments/assets/d8457d85-6f63-4024-8b69-572f8c9bb225"
/>

## 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:

Lucas
2025-09-30 11:13:32 -07:00
Tristan b09fc88453 opti : Compress all images losslessly from 140Mo to 30Mo (#2063)
## Description:

Compress all images (.png, .svg, .webp) losslessly from 140Mo to 30Mo.

To confirm : find . -type f \( -iname "*.png" -o -iname "*.svg" -o
-iname "*.webp" \) -exec du -ch {} + | tail -n1
Before : 140M 
Now : 30M

## Please complete the following:

- [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:

Iron_Mine : (300612003138109451)
2025-09-22 10:08:57 -07:00
evanpelle 9d5c108b83 move resources out of non-commercial (#2008)
## Description:

Move assets out of non-commercial so they can be relicensed to Creative
Commons BY-SA 4.0 in a follow up PR

## 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
2025-09-04 19:00:33 -07:00
evanpelle 35ad6f3abf create account on purchase (#1966)
## Description:

When purchasing an item, user will be logged in as their email
automatically.

* Users can be logged in either via discord or email (the top right
button has an email or discord icon depending on which is logged in
* Created AccountModal to show current login and has option to log in
via Discord or send recovery email
* Created TokenLoginModal which is triggered during account recovery or
after purchase
* Update DiscordUserSchema to 
* Removed choco pattern key listeners, they were causing NPEs when empty
input was provided on forms

<img width="408" height="479" alt="Screenshot 2025-08-29 at 5 35 31 PM"
src="https://github.com/user-attachments/assets/a2be5556-b534-4279-931b-799d8ece122c"
/>
support email or discord identity
<img width="801" height="351" alt="Screenshot 2025-08-29 at 5 38 59 PM"
src="https://github.com/user-attachments/assets/9d18ef8f-a6f8-4c22-b583-c31d9b176467"
/>
<img width="97" height="83" alt="Screenshot 2025-08-29 at 5 39 51 PM"
src="https://github.com/user-attachments/assets/994d7ade-fa02-4adb-a6f8-e929af4089b2"
/>
<img width="102" height="83" alt="Screenshot 2025-08-29 at 5 40 03 PM"
src="https://github.com/user-attachments/assets/f829dd49-996b-479d-9b75-d81092e31da4"
/>
<img width="59" height="43" alt="Screenshot 2025-08-29 at 5 40 19 PM"
src="https://github.com/user-attachments/assets/aacf39e7-2528-463b-95cb-a58bc8c2194b"
/>


## 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
2025-08-31 19:09:38 -07:00
kanishk tyagi 21c4a76c16 fix ally request svg aspect ratio (#1731)
## Description:

The alliance icon was appearing squished in the radial menu because the
SVG was being forced into a 32x32 square without proper aspect ratio
preservation.

Change:
Added `viewBox="0 0 834 528"` and `preserveAspectRatio="xMidYMid meet"`
to the SVG element, which maintains the original aspect ratio (1.58:1)
when scaled to fit the allocated space.

After changes:
[
<img width="166" height="184" alt="Screenshot 2025-08-07 at 4 52 15 PM"
src="https://github.com/user-attachments/assets/c1438b4d-9302-4a2b-8e25-c6d289e7148e"
/>
](url)

Refer to the issue for before.

Fixes #1730 

## 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
- [x] I have read and accepted the CLA agreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:

phantom845

Co-authored-by: Kanishk-T <kanishk.tyagi@yugen.ai>
2025-08-18 07:18:16 +00:00
Vivacious Box b479d04c6c Icons update (#1562)
## Description:

Add option toggle for structure sprites
Add new icons
Add new shapes
Add scaling for text and bigger text

<img width="853" height="548" alt="image"
src="https://github.com/user-attachments/assets/2f3e0b3d-af34-485b-a897-11fd74f6c51a"
/>
<img width="690" height="375" alt="image"
src="https://github.com/user-attachments/assets/9dea3fc2-6054-473d-9530-0222e49948ac"
/>


## 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
- [x] I have read and accepted the CLA aggreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Mr. Box

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-08-04 10:06:53 -07:00
evanpelle e0b486320a add SEO & Open Graph (#1692)
## Description:

The first Google result contains a join code. Using the canonical should
tell Google to use openfront.io instead. Also add metadata for Open
Graph links. Set favicon in the index.html instead of Main.ts so google
can pick it up.

## 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
- [x] I have read and accepted the CLA agreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
2025-08-03 04:54:03 +00:00
Scott Anderson b05881fad0 Revert "Display OFM25 ad in WinModal (#1281)"
This reverts commit 61745ba39a.
2025-07-31 14:23:57 -04:00
Vivacious Box 105286ed29 Add new icon shapes and filter for filtering icons on the layer (#1348)
## Description:

Add triangle shape for missile silos, square for sam, octagon for
defense posts, and add a filter in the topbar to highlight structures


![image](https://github.com/user-attachments/assets/d0986037-d4d7-41c6-b353-2a69b1eeb7c4)

![highlight](https://github.com/user-attachments/assets/0018e68a-31d4-478f-be57-56c3f71ee32a)


## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Vivacious Box
2025-07-07 09:36:55 -07:00
DiesselOne 4e48eba910 Better In Game UI (#1243)
## Description:
Top Bar Refactor – UI & UX Improvement Proposal

This update overhauls the top game bar to improve clarity,
responsiveness, and overall user experience across desktop and mobile.
It consolidates player resources (e.g., building counts), integrates
game controls (pause, settings, time), and enhances visual contrast.

Key changes:

Redesigned top bar with player data and game options.

Team color indicator bar (team games only).

Countdown bar during "Choose Starting Position" phase.

Removed redundant info (e.g., troop/worker counts shown elsewhere).

Inspired by strategy games like Travian Legends, this refactor offers a
cleaner and more intuitive layout, especially for smaller screens.

⚠️ Note: This is a large change and likely contains visual or functional
bugs I can’t currently spot due to fatigue. Thorough testing is required
before approval.

## 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
- [ ] 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Diessel
![Snímek obrazovky 2025-06-21 v 8 13 46](https://github.c
![Snímek obrazovky 2025-06-21 v 8 13
35](https://github.com/user-attachments/assets/e166ee1b-6173-48f5-8e2d-598d796a7e2d)
om/user-attachments/assets/3a0edbef-e621-4fc4-b6b7-c1ed
![Snímek obrazovky 2025-06-21 v 8 13
20](https://github.com/user-attachments/assets/1214ab61-323c-4317-8722-eaa4b932a60c)
8f9a8219)
![Snímek obrazovky 2025-06-21 v 8 10
04](https://github.com/user-attachments/assets/374fe15a-bfad-4469-9950-3ec631b6e2d3)

Closes #1165

---------

Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-30 19:49:42 -07:00
Vivacious Box 77dddbf3ee New icons (#1287)
## Description:

Add a new pixi layer for rendering structure icons
Add new sprites for structures

![image](https://github.com/user-attachments/assets/d5171b31-c83b-431a-a0f6-87b85b460a3f)

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Vivacious Box

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-27 17:00:01 -07:00
Scott Anderson 61745ba39a Display OFM25 ad in WinModal (#1281)
## Description:

Display OFM25 ad in WinModal 50% of the time.


![image](https://github.com/user-attachments/assets/e61c3139-d81e-4f50-a703-db8ec8e97cee)

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-27 14:40:59 -04:00
DevelopingTom 43397779fa Add trains (#1159)
## Description:

Add a rail network to handle train stations/railroad between structures.

Changes:
- `RailNetwork` is responsible for the train station graph. Use it to
connect new `TrainStations`
- A `RailRoad` connects two `TrainStation`
- No loop possible in the rail network
- Train stations handles its railroads
- Added a layer to draw the railroads under the structures

#### Clusters
- To speed up computations, each `TrainStation` references its own
cluster
- A cluster is a list of `TrainStation` connected with each other,
created by the `RailNetwork` when connecting the station
- Train stations spawn trains randomly depending on its current cluster
size
- A `TrainStation` decides randomly of the train destination by picking
one from the cluster

#### Production building:
- Added a factory which has no gameplay impact currently. _To be
discussed._

#### Train stops:
- When a train reaches a factory, it's filled with a "cargo". The loaded
trains has no impact currently. _To be discussed._
- When a train reaches a city, the player earn 10k gold
- When a train reaches a port, it sends a new tradeship if possible
- If a destination/source is destroyed, the train & railroad are deleted
too


https://github.com/user-attachments/assets/42375c17-9e04-4a42-98d0-708c81ffd609


https://github.com/user-attachments/assets/fbecdb53-a516-4df8-87fb-1f9a62c4efa0



## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

IngloriousTom

---------

Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
2025-06-22 08:14:08 -07:00
Doo 9717c95c34 Update building images and adjust border/territory radii for unit configuration (#1037)
## Description:

Implementing the new images for building with better quality:
https://github.com/openfrontio/OpenFrontIO/issues/778

**Before :**

![image](https://github.com/user-attachments/assets/7ad756c5-f22f-4058-9153-59f6a0363382)


**After :** 

![image](https://github.com/user-attachments/assets/c5773420-336e-49c4-b8a1-8686c0bfc35b)



## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

.doo

---------

Co-authored-by: rldtech <r.le-disez+oplab@groupeonepoint.com>
Co-authored-by: tnhnblgl <51187395+tnhnblgl@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-13 05:23:50 +00:00
oleksandr-shysh 871d8c499c Multi-level radial menu (#1018)
## Description:

- Refactored the radial menu to enable multi-level functionality.
- Organized the actions into submenus.

<img width="192" alt="Знімок екрана 2025-06-03 о 16 33 24"
src="https://github.com/user-attachments/assets/6dae9792-bcae-4fc9-8ce4-1203d0efbfac"
/>
<img width="313" alt="Знімок екрана 2025-06-03 о 16 34 17"
src="https://github.com/user-attachments/assets/5d78098f-b05b-40c4-bd70-8f2e3c08da2b"
/>
<img width="308" alt="Знімок екрана 2025-06-03 о 16 40 22"
src="https://github.com/user-attachments/assets/01b00906-9e8b-47e9-8f97-cfd3c023c352"
/>
<img width="277" alt="Знімок екрана 2025-06-03 о 16 37 04"
src="https://github.com/user-attachments/assets/60718c5b-8544-43e6-b891-2833d7fb789a"
/>
<img width="353" alt="Знімок екрана 2025-06-03 о 16 36 32"
src="https://github.com/user-attachments/assets/8c35a0f8-5588-470f-8af4-8e6d4ba66d88"
/>


## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

oleksandr037617_47021

---------

Co-authored-by: Oleksandr Shysh <oleksandr.s@develops.today>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-06 17:04:24 -07:00
Théodore Léon a4fffce7f3 Monitoring client connections (#941)
## Description:
Disconnected client detection :
If a client haven't send a ping to the server since more than 30 seconds
They will then be marked disconnected with a dedicated icon.
No action are yet taken, this allows for extensive in-game test before
adding the *consequences* of the player leaving the game.
I also added extensive unit tests, lessening the risk of regression for
the future.


![image](https://github.com/user-attachments/assets/884e5e99-15e8-4544-bd52-7524542cc82a)



## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:
theodoreleon.aetarax

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-06 13:30:23 -07:00
Guillaume Quarmeau 461177b2be Added support for dark mode icons for Alliance Request Icon and Embargo Icon (#993)
## Description:
Alliance Request and Embargo icons now switch from white to black
according to whether dark mode is enabled.

![Screenshot 2025-06-01
120058](https://github.com/user-attachments/assets/ccc97b7b-088c-4294-953b-63fdfb0c354e)
*Dark mode off*

![Screenshot 2025-06-01
120011](https://github.com/user-attachments/assets/1ff3f9bb-c01e-4c49-b03b-97851914af1b)
*Dark mode on*

## Potential issue:
The only caveat is that upon changing the theme when both icons are
displayed, the display order is not conserved, so they may appear in a
different order than before.
This seems however to be a very small use case, and rather insignificant
as icons don't have an order to begin with.
Do let me know if this is a problem though!

## 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

@vermylion
2025-06-02 11:39:16 -07:00
VariableVince 866ff7c487 Rename helpModal images so CDN cache is refreshed on commit (#810)
## Description:

Overwritten images (same file name) from PR
https://github.com/openfrontio/OpenFrontIO/pull/785 took more than a day
to all be shown in Instructions (helpModal) on .dev. Prevent this from
happening on commit to prod by renaming them.

There's talk about cache busting but that isn't implemented (yet) for
now.

Two of the 7 renamed ones:

![afbeelding](https://github.com/user-attachments/assets/71f95659-71ce-4504-9b21-bd02e67c0786)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-05-18 14:13:25 -07:00
VariableVince 01ef525e11 Update Instructions and text in Build menu/Player panel (#785)
## Description:

New images in Instructions where needed for:
- event panel: wasn't mentioned yet
- infopanel changed: quick chat, donate gold, stop/start trading etc
- player icons: traitor, embargo, requesting alliance
- radial menu: now differs between enemy/ally
- leaderboard: was changed
- options: time display was changed, cookie preferences button is now
visible so kept that in the new image

Some justifcations of part of the textual changes:
- Trade: info was already behind and now updated to include changes from
PR https://github.com/openfrontio/OpenFrontIO/pull/707
- Retreats: weren't yet mentioned. Added this to new info about Event
panel. Including https://github.com/openfrontio/OpenFrontIO/pull/699,
and not-yet-but-soon merged PR
https://github.com/openfrontio/OpenFrontIO/pull/740 and
https://github.com/openfrontio/OpenFrontIO/pull/705
- Radial Menu: close button has been replaced, explain that
right-clicking closes it now.
- Traitor: being a traitor and its consequences, like the changed
defense debuff and effects on trade.
- SAM: launcher hit chanches % changed.
- Port: Battleships > Warships and other changes.
- Warship: made more clear that only enemy trade ships/warships/boats
are captured/destroyed. Made 'attack-click' more clear.
- Boat: the word Boat was used, not Transport ship. While on server and
in code it is called a Transport (ship) too. Tried to clear this up.
Since it is now explained n Instructions, it doesn't have to be
clarified per se elsewhere. Like in Build menu for Warship it says
"Captures trade ships, destroys ships and boats" which can stay this way
as it is now assumed knowledge that boat = transport.
- More uniform capitalisation for 'Openfront' terms: capitalization was
used differently across terms like Info panel and build menu, Alternate
view and Alternate View. Other instances are more ambiguous like "Small
explosive bomb that destroys territory, buildings, ships and boats"
which i kept as is.
- Embargo: the word 'embargo' was deliberately removed earlier, because
it wasn't always understood by target audience
(https://github.com/openfrontio/OpenFrontIO/pull/147). But some remnants
were left. Using 'stop trading' in all but one spot now: it's used as
one-word explanation for the Dollar stop sign player icon, just like
other icons also have short 'Ally' 'Traitor' etc. So the players who do
use the word embargo still have one reference left.

- Build menu: left Warship description as is (see 'Boat:' above).
Updated Port description from "Sends trade ships to allies to generate
gold" to "Sends trade ships to generate gold". Trade is not only with
allies anymore. And there's more details that are in Instructions like
the effects stop/start trading, that don't have to be in the Build menu.
This lessens the chances of having to change the Port description in
Build menu again.

- Player info: changed "Embargo against you" to "Stopped trade with you"
(see 'Embargo:' above).

Keys that need to be (re)translated in MLS:
- NEW keys: info_chat, info_trade, ally_donate_gold, build_menu_desc,
icon_embargo, icon_request, ui_playeroverlay, ui_playeroverlay_desc,
ui_events, ui_events_desc, ui_events_alliance, ui_events_attack,
ui_events_quickchat
- UPDATED keys: info_enemy_desc, ally_betray, build_port_desc,
build_warship_desc, build_sam_desc, icon_crown, icon_traitor,
radial_boat, radial_build, build_menu.desc.port, embargo,
option_settings, build_defense_desc, radial_desc, ui_leaderboard_desc

Font looks weird in screenshots because of zoom 40% in browser to
capture it all:
![Instructions
1](https://github.com/user-attachments/assets/d349bb12-f0ec-407d-b29f-68b25cf98dc1)
![Instructions
2](https://github.com/user-attachments/assets/0d7753b7-99a6-41f3-99d7-182cf1ef57f3)
![Instructions
3](https://github.com/user-attachments/assets/9087f2e3-8e8e-4c77-8ec4-a2410e15d3d3)
![Instructions
4](https://github.com/user-attachments/assets/132c5b61-d211-4fbe-82a9-508feef1ad37)
![Instructions
5](https://github.com/user-attachments/assets/decde07b-9c63-4520-a845-109810c106a4)


![afbeelding](https://github.com/user-attachments/assets/10d12b20-48e9-406e-b3a3-01dbf5a76642)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Added new UI elements and icons for alliance requests, embargo status,
and gold donation in the help modal and player info panels.
- Introduced detailed sections in the help modal for events, player
overlays, and expanded build menu explanations.

- **Improvements**
- Enhanced and clarified descriptions for leaderboard, event panels,
player overlays, ally betrayal, and build menu items.
- Improved visual grouping, layout, and styling consistency in the help
modal and across UI icons.

- **Style**
- Updated and unified image and icon styles for consistent appearance in
the help modal.
- Added new CSS classes for modal images and icons; removed fixed-size
radial menu image style.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-17 21:04:33 -07:00
evan c58ac10835 add news button for update release notes 2025-05-08 13:15:01 -07:00
Aotumuri 5ddc25897f Add quick chat (#412)
## Description:

Fixes #480 

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

<DISCORD USERNAME>
2025-05-08 09:00:25 -07:00
evanpelle cc9b1a305b add link to tournament (#621)
## Description:

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

<DISCORD USERNAME>

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-29 13:22:29 -07:00
evan a2ba10bdbd show density under player name 2025-04-23 14:26:12 -07:00
Evan ae4f4d3ed6 traitor only lasts 30 seconds, 50% defense debuff 2025-04-17 20:30:52 -07:00
Aotumuri 3eccbaa982 Added User Settings Modal (#379)
## Description:

This PR adds a **User Settings** modal accessible from the main UI.

Currently available settings include:
- Toggle for Dark Mode
- Writing Speed Multiplier (slider)
- Bug Count (number input)
-  Troop and Worker Ratio (slider)
-  Left Click to Open Menu
-  Emoji toggle

Settings are saved via `localStorage` and persist across sessions.
There's also a hidden Easter Egg...

https://discord.com/channels/1284581928254701718/1286741605310533653/1355900228712009908
<img width="787" alt="スクリーンショット 2025-03-31 8 40 08"
src="https://github.com/user-attachments/assets/a9943834-cf40-4fa6-b828-06a8476172da"
/>

Fixes #482 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

<DISCORD USERNAME>
aotumuri
2025-04-14 11:47:50 -07:00
Aotumuri 745017aee2 Added Gold & Troop donate button (#373)
## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

Changed the icon for the troop donation button, as it looked like it was
donating gold.
I replaced it with a soldier icon to better reflect its function.
Additionally, I updated the icon below it to clearly represent gold
donation instead.

## Please put your Discord username so you can be contacted if a bug or
regression is found:
aotumuri

The cat is because of an extension I have put in. Please ignore it.
<img width="345" alt="スクリーンショット 2025-03-30 10 13 06"
src="https://github.com/user-attachments/assets/9088be1a-57b4-4d10-9507-ca8dc0fcc68c"
/>
<img width="396" alt="スクリーンショット 2025-03-30 10 18 10"
src="https://github.com/user-attachments/assets/2555fd24-0bbc-4b40-8f80-ccf43a1e9a75"
/>

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-03-31 10:51:05 -07:00
Readixyee 0891637eb2 MissileSilo cooldown (#309)
changed the sam cooldown to be a general cooldown function and added a
missilesilo cooldown

The function either adds the current tick as the starting point of the
cooldown or sets the cooldown to null and updates the unit. That way
getcooldown function can be used to get back the tick the cooldown was
started and can be compared to the cooldown set in the config.

changed the sam test / added a missilesilo test

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-03-29 15:19:07 -07:00
Mittanicz 6678d6e36e Image optimalization (#343)
I have minify images and convert them to webp format that reduce size
and keep quality.
Reduce size of bg image since its already blured by css so no need to
have it that big.

Reduce size of thumbs and helper images in helper modals should be fine
since they will not exceed the container size. Even that make them
larger than containter just to be safe
2025-03-26 10:05:45 -07:00
Aotumuri f188af6029 Added SAM icon due to missing asset (#318)
There was a report on Discord about the SAM icon not displaying
correctly.

https://discord.com/channels/1284581928254701718/1353348395506466937/1353348395506466937
After checking the CSS, I found that it was referencing a non-existent
path.
Since there was no dedicated image for the SAM, I created a custom one
to replace it.

Let me know if any adjustments are needed!
Thank you!
<img width="324" alt="スクリーンショット 2025-03-23 22 53 38"
src="https://github.com/user-attachments/assets/157f9b70-615c-4454-baaf-7f0c33e98ecf"
/>
<img width="759" alt="スクリーンショット 2025-03-23 22 42 33"
src="https://github.com/user-attachments/assets/35f3ea51-5804-4007-8e8d-40659f47276a"
/>
2025-03-24 15:47:07 -07:00
Ilan Schemoul 24f25d677a sam is red when reloading (#268) 2025-03-18 14:16:02 -07:00
Ilan Schemoul 3ce5785d1e nuke icon (#207)
- **feat: white nuke icon next to name if player nukes you**
![Capture d'écran 2025-03-10
220439](https://github.com/user-attachments/assets/1b717b2d-bffb-45fc-96ea-2feb57d25de0)
- **feat: red nuke icon if player sends nuke towards you**
- 
![Capture d'écran 2025-03-10
220358](https://github.com/user-attachments/assets/b755fa06-9510-4bd1-8312-7180dc681d85)
2025-03-11 15:44:45 -07:00
evanpelle 4c372b3877 fix build error importing image from extra, rename Extra=>extra (#212) 2025-03-11 08:33:58 -07:00
evanpelle d0359a2db4 Merge pull request #149 from UnBuiltTree/icon-remake
Icon Remake
2025-03-06 18:49:19 -08:00
UnBuiltTree 919e6ff9a4 Icon adjustments 3 2025-03-06 20:01:29 -06:00
UnBuiltTree 7b93bc8038 Fort Icon Alt2 2025-03-06 08:30:01 -06:00
UnBuiltTree aa85da97d3 Icon Adjustments 2025-03-06 08:19:36 -06:00
UnBuiltTree 89326baa37 Updated StructureLayer and GameMap for Remake of Icons, added extra building png icons resources. 2025-03-05 21:29:19 -06:00
Todd Groff c648da2277 Merge branch 'main' into randmap 2025-03-02 16:29:57 -05:00
evanpelle 38b762b8bc Merge pull request #95 from ilan-schemoul/embargoes
feat: everyone trade with everyone, anyone can embargo a player to stop trade
2025-03-02 10:58:05 -08:00
NewHappyRabbit 9b85651ad8 Fixed dark mode class being added in different places (body and html elements).
Fixed flag "None" (xx.svg) being able to be set and used ingame.

All menu modals will now close if you click outside of them.

Fixed info icon in instructions.

Added an icon to show the number of new events that happened while the events panel is hidden.

Removed opacity from the svg icons files and added it to the player-icons div, making them have the same opacity and being more visible.
2025-03-02 09:39:36 -08:00
ilan schemoul e2083b53df feat: icon over player name to signal embargo 2025-03-02 18:34:22 +01:00