Commit Graph

1362 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 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
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
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 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
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
Evan 1e480b7939 require 95% to win on teams 2025-04-02 13:06:38 -07:00
Evan ddbb536918 add teams progress to spawnbar 2025-04-02 12:57:46 -07:00
APuddle210 71ddeca7f0 Map Revisions, one Addition, and Adjustment to Lobby Max Player based on Map Sizes (#389)
## Description:

Implementation of separate lobby playlists, one for large maps another
for small, with the implementation framework being easily adjusted for
additional playlist categories in the future (such as fantasy maps).

Addition of new map 'Between Two Seas' a small map, replacing Black Sea
in the public lobby rotation (Black Sea retained for singleplayer or
private lobbies.

Adjustments to lobbyMaxPlayer configuration function. Broke out into
tranches by map pixel count, commented to communicate to other collabs
which tranch to place their map in. This change pairs well with the
adjustment to lobby map selection to alternate between big and small
maps. For the Potato (and mobile) players.

Revision to Mena, adding lakes and rivers.

Revisions to Japan, adding lakes and rivers, slight change of bounds to
include more mainland and less ocean.


![image](https://github.com/user-attachments/assets/434ad418-3ad4-40d4-841f-2ab71d13effd)


![image](https://github.com/user-attachments/assets/c46863b4-6a29-494f-82f0-d249c5017c1d)


![image](https://github.com/user-attachments/assets/c1e10fc4-b5e8-465a-a4eb-d325447df954)


The below no longer applies, I talked to Duwibi (Nikola123) who
explained the source of the issue is outside my control, but that he was
taking the action necessary to resolve.

The only issue still present after testing the the display of the map
name for Between Two Seas on the Public Lobby button. I've asked for
assistance with this issue on the Discord and will submit a fix as soon
as I can figure out its cause. Does not impact gameplay and its 3:30am
so hopefully this issue is not enough to prevent a merge as aside from a
quick fix PR, I don't think I'll be able to do any more work until after
this weekend.


## 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-02 10:45:37 -07:00
michaelabilliot 524498ac75 Added Game of thrones map (#390)
## Description: The entire world from game of thrones

Thanks to apuddle7 on discord for helping me a lot with this map
especially the rivers

![Screenshot 2025-04-01 at 19 35
09](https://github.com/user-attachments/assets/d96e2de5-06f4-4103-877b-0dbf33a34137)
![Screenshot 2025-04-01 at 19 36
25](https://github.com/user-attachments/assets/22ccd251-e7ef-4f7e-b943-afa2e9c445ae)
![Screenshot 2025-04-01 at 19 23
11](https://github.com/user-attachments/assets/aa4de47b-c5bd-4610-ba84-713a4b4f7da3)

## 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: 
lunhuiyan1718
2025-04-02 10:25:57 -07:00
Poddster 90cb238b25 Resort emoji table, added 👑🏡🛡️🎯🐔🤌, removed 🤙 (#400)
## Description:

I found the old emoji table hard to use in the heat of combat, so I:

1. Reordered it, focusing on putting the arrows in a logical
orientation, and each other emoji in some kind of cohesive group.
2. Replace a duplicated 😭 with 👑, useful for telling the idiots
attacking you to instead attack the crown, otherwise you'd both dead.
3. Added 🏡🛡️🎯 as I thought they would be useful for mocking/hinting to
other payers about ports/warships/cities/defence posts, despite making
the table one line longer. The target was mainly added to put something
in the middle of the new arrow keypad-layout.
4. Replaced 🤙 with 🐔🤌. I feel 👍👎 already does what  does, so remove it
to make space for something else: another insult (🐔). I've never seen
'call me' (🤙) used in-game, or even know what it means in the context of
the game. But chef's kiss 🤌 is meme-worthy and fun to send to other
players.

old: 

![Image](https://github.com/user-attachments/assets/75816197-8d5e-4aee-989f-94207f9ab3ec)

new:

![Image](https://github.com/user-attachments/assets/5fd14788-dc16-4744-ab4e-7b3942ad8694)

See #399 

I've given this a try and I find it much easier to locate and send the
kind of emoji I want. The only real oddity are the hearts being all the
way down there. But they weren't even together last time, so it's still
an improvement.


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

`poddster` aka `Pod#7003` in the old system
2025-04-02 10:24:14 -07:00
Aotumuri c314984fbf Fixed SAM Icon in help modal (#398)
## Description:
The SAM launcher icon is missing again, fixed.
## 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:

aotumuri
2025-04-02 10:23:04 -07:00
Aotumuri 4c776629f3 Optimize Water Tile Distance Calculation with BFS (Manhattan Distance) (#396)
## Description:
Replaced with BFS from shoreline tiles to propagate Manhattan distances
efficiently in O(W) time.
I’ve confirmed that the results match the previous implementation, but
please double-check on your end as well just to be safe.
I’d also like to get input from aPuddle.

## 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-02 10:22:37 -07:00
Quentin Siruguet 8de3a5f106 Add notifications for troops attacking wilderness (#363)
+Retreat cost no soldiers when coming back from wilderness
+ Also work with contamined area


![image](https://github.com/user-attachments/assets/6dda168c-aade-4ba5-ac2a-6de028fbaf6d)

![image](https://github.com/user-attachments/assets/89966516-e86d-4d06-8b32-3bf36179eea1)


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

quentin.qsi
2025-04-02 08:37:58 -07:00