Commit Graph

1564 Commits

Author SHA1 Message Date
Evan 89fb1c0f14 make atom bombs 750k again 2025-04-06 09:11:13 -07:00
Evan 5f364adc33 cannot nuke teammates 2025-04-05 21:49:53 -07:00
Evan c7356a7348 have Team be an enum instead of an object, this was causing equality problems. 2025-04-05 21:39:12 -07:00
Evan f620264ce3 load environment variable for development 2025-04-05 21:39:05 -07:00
Evan 0dbc246a63 reduce transport frequency for fakehumanexecution, make transport render more efficient 2025-04-05 17:14:56 -07:00
Evan d560e90486 reduce refresh rate for smoother terrain rendering 2025-04-05 15:00:24 -07:00
Evan d2c455f9d2 smooth image when zoomed out 2025-04-05 14:47:54 -07:00
Evan 5fec71481d repaint overlapping trails when transport ship dies 2025-04-05 13:57:18 -07:00
Evan 7050a5816d render transport ships on main unit canvas so it doesn't erase tails 2025-04-05 13:37:49 -07:00
Evan 09ec87e335 render transportship on seperate canvas so other ships don't eat its tail 2025-04-05 11:41:36 -07:00
Evan 5fec649b9c perf: PortExecution only check to spawn trade ships every 10 ticks. 2025-04-05 11:15:15 -07:00
Evan 53a30899c6 only check break allainces on detonation, not everyt tick 2025-04-05 10:55:39 -07:00
Scott Anderson 729920bdca Avoid sqrt for euclideanDist function (#395)
## Description:

In most cases we do not need to solve for the hypotenuse length and can
do math directly on the square of the hypotenuse. For example, the
common use case for calculating euclidean distance is to check if two
points are within a certain distance of each other. In this case,
`Math.sqrt(x*x + y*y) < d` can be rewritten as `x*x + y*y < d*d`.

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-05 10:17:29 -07:00
Evan 25c18cdae2 format README 2025-04-05 10:10:36 -07:00
Evan 21752aa214 add perf improvements: don't draw full boat tail, make nukes calculations slightly more efficient 2025-04-05 10:10:15 -07:00
Evan 9837401a1b make atom bombs 500k 2025-04-04 17:02:19 -07:00
Evan 1435be00c5 bugfix: bots slider invisible on firefox 2025-04-04 16:56:13 -07:00
Duwibi e9c885644b Add English flag (#418)
## Description:

This PR adds a 50/50 English/US flag that represents the English
language in the language selection menu.

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

<Nikola123>
2025-04-04 16:44:32 -07:00
Evan b947b764b7 bugfix: npe when winner is null 2025-04-04 16:10:16 -07:00
Evan 2cb8c239cf make sendBoat() more efficient: find random tiles instead of doing a breadth first search 2025-04-04 16:04:57 -07:00
Evan 190a67b72a delete tradeship if path not found 2025-04-04 12:11:10 -07:00
Evan 9fe64c15a8 update GameStartingModal imports to fix build 2025-04-04 10:19:54 -07:00
kanekane0448 a97a608dce Add Alt + Click hotkey for sending emotes (#408)
## Description:

Allows the player to Alt + Click to send emotes to other players or
themself in order to ease communication.
Of course, the hotkey can be something different. Alt + Click is just a
suggestion.


![image](https://github.com/user-attachments/assets/9762c4f0-f62d-4c39-ba35-468ac3f5ddaa)

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

kanekane0448

PS: The new emoji table looks really good!

---------

Co-authored-by: kanekane0448 <no@mail.pls>
2025-04-04 10:15:59 -07:00
Evan 924ca2c69e bugfix: humans start with zero troops on teams, also removed manpower argument to addPlayer() 2025-04-04 10:03:00 -07:00
Duwibi 51bbf2becd Fix difference in translation strings regarding the new Between Two Seas map (#416)
##Description:
I renamed all instances of "TwoSeas" to "BetweenTwoSeas". That way it
lowers the confusion but more importrantly - it removes the difference
between the translation strings for the map.

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

<Nikola123>
2025-04-04 09:42:56 -07:00
Duwibi c700b7956f Update translations (#419)
## Description:

This PR updates the translations for: Bulgarian, Russian, Ukrainian,
German, Polish and Dutch

Acknowledgements for the MLS project:
Bulgarian🇧🇬: Nikola123 & NewHappyRabbit
Japanese🇯🇵: Aotumuri & daimyo_panda2
French🇫🇷: cldprv, gx2 & Lucasisc
Dutch🇳🇱: cldprv & tryout33
German🇩🇪: Pilkey & jacks0n
Spanish🇪🇸: 6uzm4n
Russian🇷🇺: Rulfam
Ukrainian🇺🇦: Rulfam
Polish🇵🇱: zibi, RinkyDinky & Rulfam

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

<Nikola123>
2025-04-04 09:42:26 -07:00
Duwibi 38e3e04831 Update README.md to include instructions on how to help with translation (#420)
## Description:

Updates the README.md file to include instructions on how to help with
translation

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

<Nikola123>
2025-04-04 09:42:02 -07:00
Evan abc68bf9a4 rename GameStartingModal 2025-04-04 08:54:09 -07:00
Evan 9d1b4f35e4 bugfix: SpawnExecution was not attaching PlayerExecution to humans
bugfix: WinModal was saying player died even if they hadn't spawned

added hasSpawned() method to player
2025-04-03 20:12:36 -07:00
Evan a3a05f9ed2 bugfix: start troops were set at zero, username was not set in singleplayer 2025-04-03 20:02:22 -07:00
Evan 9fa3691c5c bugfix: SpawnExecution couldn't find existing player because Game.Players() only returns alive players. This caused SpawnExecution to respawn each human player. 2025-04-03 19:31:42 -07:00
Evan e1a299c8c5 center hostlobbymodal start button 2025-04-03 17:13:16 -07:00
Evan fbfc46f2cb remove 0. prefix for version number 2025-04-03 16:24:02 -07:00
Evan 3b5853ccbc removed db/ dir, has been moved to another repo 2025-04-03 16:21:35 -07:00
Evan 3db2b4f5f3 remove electron/ dir, moved to different repo 2025-04-03 16:20:38 -07:00
Evan 2fd7bbaddf fix build, rename GameStartingModal.ts 2025-04-03 16:16:23 -07:00
Scott Anderson 10c411b1ee bug: lastEmojiSet is never used (#406)
## Description:

In the existing code, lastEmojiSent can only ever be set if it is
already set, causing it to never be used. This change updates the logic
to work as intended.

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

fake.neo

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-03 16:12:07 -07:00
APuddle210 f94da14d1f Created MapPlaylist class (#405)
## Description:

Creates new MapPlaylist class, which contains the expanded may playlist
logic. Currently implements two distinct playlists, one for big maps,
and another for small. Designed with future need for more types of
playlist in mind.

It pulls from the big playlist two for every one time it pulls from the
small playlist.

Moved out of the Master.ts as requested.

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

aPuddle
2025-04-03 16:09:34 -07:00
kanekane0448 647805de70 Update instructions english (#407)
Expand information on
- Attack ratio mechanics
- Traitor mechanics
- Warship mechanics

For the English version only!


![image](https://github.com/user-attachments/assets/bb9dfd91-18c6-415e-adbc-813f964504ea)

![image](https://github.com/user-attachments/assets/88a89ca5-0aa4-4189-9573-4581e99cbb77)

![image](https://github.com/user-attachments/assets/784f98cd-bcd0-4810-a2be-b55a12c9029f)

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

kanekane0448
(I can't guarantee that I regularly check for new messages though. I
just log in when I want to talk about the game.)

---------

Co-authored-by: kanekane0448 <no@mail.pls>
2025-04-03 16:07:31 -07:00
Guzmán 15abe17ace Fix translations, mainly the Spanish one (#410)
First of the probably many many PRs that would benefit from #409
2025-04-03 16:03:00 -07:00
Rémi Simonnin 879e7fdde0 Create esperanto translation (#411)
## Description: Creation of the esperanto translation

## Please complete the following:

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

r3ms
2025-04-03 16:02:28 -07:00
jacks0n 7a38d009d9 Hide wrongly displayed "Hide" button on main page (#403)
## Description:
A previous commit made the "Hide" button of the event log visible on the
main page. This hides it again, as before.

![image](https://github.com/user-attachments/assets/83e7dbe8-9af7-4719-8c74-f89076345a4a)

## 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>
jacks0n
2025-04-03 16:01:50 -07:00
Evan 9504bdae2d Merge branch 'main' of github.com:openfrontio/OpenFrontIO 2025-04-03 15:42:43 -07:00
Evan 950344c0bd created prestart message: add 2 second delay before starting public games to allow all players to connect 2025-04-03 15:42:25 -07:00
Aotumuri 607e5b5ff0 MLS-PACK (#355)
## 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

This is commit pack
This PR refactors and improves the language selection experience:
• Centralizes all language-related logic in LangSelector.ts &
LanguageModal.ts
	•	Redesigns the language selection UI for better UX across devices
	•	Adds new translations and supports more languages
Changes .w.
• Language selection is now handled entirely inside LangSelector.ts &
LanguageModal.ts
	•	Prevents background scrolling when open
	•	Highlights the current language at the top
	•	Always shows English second
	•	Shows browser language third (if different from current)
	•	All other languages are sorted alphabetically by English name
	•	Debug option is shown at the end when pressing D
	•	The language list is scrollable when it exceeds screen height
	
Supported Languages
["en", "ja", "fr", "bg", "nl", "ru", "ua", "de"]

Added Translation Keys
```
"lang": {
  "en": "English",
  "native": "English",
  "svg": "xx"
},
"map": {
  "map": "Map"
},
"game_starting_modal": {
  "title": "Game is Starting...",
  "desc": "Preparing for the lobby to start. Please wait."
},
"difficulty": {
  "difficulty": "Difficulty"
}
```

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

Translation collaborator
- Nikola123 (He was a very big help from setting up the translation site
to adding the json. Thank you so much!)
I don't have permission from my collaborators to display their names
here, so I'll put the discord link here

https://discord.com/channels/1284581928254701718/1352553113612980224/1352553113612980224
- tryout33

Collaborators from other servers.
- CCC Group (This is not Culture Convenience Club. Think of it like a
server where developers of various games are playing.)
- People who fixed the UI and found bugs.
meow02952 (discord id) <- This person also gave me a code suggestion.
Thanks!
moon_spear (discord id)
ww_what_ww (discord id)
Azuna (he doesn't have discord account)
- People who corrected translations, etc.
_kyoyume_ (discord id)
_ultrasuper_ (discord id)
grueg (he doesn't have discord account)

# If I forgot to include your name, or if you’d like your name to be
added, please let me know via Gmail or Discord.

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
2025-04-02 20:37:36 -07:00
Evan f09801fe3e rebalance: MIRV 25M, city cap at 2M 2025-04-02 18:25:31 -07:00
MRH 71b43de1c6 Locked focus/highlighting option (#387)
## Description:

I've added the option to toggle the Territory highlighting focus from
the current behaviour where the focus set by the currently hovered
player, to "locked focus" which will always focus/highlight your player
territory.

While the highlighting is very helpful to identify your own borders,
especially if you share borders with a player with the same colors, I
find it very distracting, and makes the game feel laggy.

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

mrh0


![image](https://github.com/user-attachments/assets/aa427233-425d-487e-bfe5-42b390561ab7)

![image](https://github.com/user-attachments/assets/f9a065a3-0fcf-481f-888d-b5781e3717c1)
2025-04-02 18:09:33 -07:00
Scott Anderson 52f64db6d3 Fix various ESLint violations (#402)
## Description:

Fixes a number of ESLint violations. Although I have tested these
changes through the local dev server, I don't have a high confidence
that the testing is sufficient, as I am new to this codebase. This
change would benefit from heightened scrutiny.

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-02 18:06:08 -07:00
Evan 77a60d5a00 attempt reconnect if no messages received for 5 seconds. 2025-04-02 16:50:58 -07:00
Evan 118a826025 Add teams to public lobby 2025-04-02 13:46:11 -07:00