### Summary
Investigated and resolved slow execution time of this script since the
addition of the thumbnail generation functionality. Determined that
thumbnail generation was not the source of the increased execution time,
likely due instead to change from bun back to npm. Some other minor
improvements made.
### Execution Time Optimizations
Investigated which components of the process were taking the most time
and determined the longest running component to be the
`removeSmallLakes()` function. Research determined that the `.forEach`
looping method to be significantly slower than the `for (const var of
vars)` method and replaced all instances of the former with the latter.
Further review identified possibility to reduce the number of calls to
the getArea() function by combining the `removeSmallLakes()` with the
`processOcean()` function, which was already determining the size of all
bodies of water.
After revision to the `forEach` loops and inclusion of
`removeSmallLakes()` within `processOcean()`, the next slowest executing
component was the `processDistToLand()` function. Aside from being slow
this function was also difficult to understand. Revised function perform
Manhattan distance calculations against the `shorelineWaters[]` array
and identify the minimum value rather than walking out from the
shoreline using the `neighbors()`. This change yielded between ~35% -
~45% faster execution times for this function (~275 seconds -> ~150
seconds; ~225 seconds -> ~165 seconds).
The change to `processDistToLand()` was tested by running the new
version of the function alongside the old version of the function and
having any differences in the calculated distance to land printed to the
console. Initially the test identified errors arising from a reference
to an x coordinate value that should have been a y coordinate value.
Once resolved no further differences were found.
### Other Minor Changes
Changes to `processOcean()` now also explicitly prevent the largest body
of water from being removed, regardless of what value is passed in for
`removeSmall`, and additionally nest the calls to `processShore()` and
`processDistToLand()` within this function rather than within
`generateMap()` for better comprehensibility. `processOcean()` renamed
to `processWater`.
Also inserted additional console.log lines to better communicate state
of the scripts during runtime, removed unnecessary export statement from
`createMiniMap()` function which requires parameters not readily
available from outside contexts (and which was not called externally
anyways). Revised multiple instances where `terrain` was used to refer
to a single item of a Terrain[][] array to instead use `tile` for
comprehensibility, and consistency with the terminology used elsewhere
in the application.
Added an explicit variable declaration of `removeSmall` to the
generateTerrainMaps.ts file and included it in the call to
`generateMap()` to make toggling this option easier in the future. Moved
the `min_lake_size` constant out of the relevant function and to the top
of the TerrainMapGenerator.ts file for better visibility and consistency
with where `min_island_size` is being declared.
This PR adds full translation support for all out-of-game UI elements,
including the start screen, public/private lobby modals, and other
pre-game interfaces.
All static text has been externalized to en.json and ja.json for future
language support.
If you find any spots that are not yet translated (missing from the
JSON), please let me know.
Thanks a lot!
This is a follow-up to PR
[#305](https://github.com/openfrontio/OpenFrontIO/pull/305).
---------
Co-authored-by: Cldprv <dubois.cnm@tutanota.com>
Co-authored-by: jacks0n <rosty.west89@gmail.com>
The flag for West Virginia was not displaying correctly.
This was due to a mismatch between the key (West_Virginia) and the
displayed name (West Virginia).
I corrected the key reference to ensure the flag loads properly.
<img width="171" alt="スクリーンショット 2025-03-23 23 02 02"
src="https://github.com/user-attachments/assets/be18538b-18e5-462c-b52e-b37d6399ae08"
/>
Updated structure icon border rendering to improve legibility, I often
find that I miss important enemy structures like SAM launchers as they
share a similar icon to many other structures.
Supported shapes:
- Square (SAM, Missile)
- Round (City, Port)
- Hexagon (Defense post)
- Diamond (not used, square rotated 45deg)

Create base components with shared styles, as start of make ui better.
For now shoul look same but underhood new copoments are used.
This should be first PR that handle this and many more comes. I am in
rush due conflict with other ppl, but should work as i tested.
Testing again and look at structure
Main goal i have global css not scope in component die loading times and
size of elements. (Modal due nature of lit and shadow dom is exception,
maybe later find better way).
Documenting the components will happen later as base components
establish their usage.
This is a map of the Australian country. It has 7 bots - the 7 states of
the country. This is my first time making a pull request, so I'm sorry
if i messed something up or something doesn't work.
This pull request adds multi-language support to the start screen.
Languages are managed via JSON files, making it easy to add new
languages in the future.
I added a basic language selection button for switching between
languages.
However, I believe it would benefit from a better design — my design
skills are limited, so I apologize in advance.
Looking forward to your feedback and possible design improvements.
Fixing issues #282 where players can bypass max username length by
editing their storage. I added a sanitization on the server side to
avoid all kind of cheat on the username as we can't trust clients
Previous patch modified largeModifier to increase it. It boosted
attacker loss but also increased speed a lot (not intentional). We now
declare two different modifier for speed and for attacker loss. Attacker
loss should remain the same.
Speed was brought as before (to slow down a bit huge players). Except
instead of sqrt (exponent 1/2) we do exponent 0.6. So the speed modifier
decreases a bit faster with size (to disadvantage a bit huge players who
are invincible right now)
Co-authored-by: ilan schemoul <ilanschemoul@gmail.com>
Does what the title says. I made sure there were no duplicate entries.
Tested by launching the dev build and confirming the flags are all
present.
While all have present items, a couple (Alaska and West Virginia) do
fail to render. I think this is because the .svg files are too large.
Selecting these flags does not cause any issues upon entering the game,
they're just invisible.
In any event I am working with N0ur on some more flag updates that will
be forthcoming in the next few days, will address these couple then.


Added functions to TerrainMapGenerator to create a bitmap from the
Minimap Terrain array with the colors being identical to those rendered
in game, with the additional change of setting the Alpha of all water to
0.
Calls added to generateTerrainMaps to actually generate the thumbnail
PNGs,
Revision to src\client\utilities\maps.ts to reflect that the images
pulled into the UI should be those ending in 'Thumb.png,'
I've tested by launching the game and starting a few matches.
hile I'd hoped that using the minimaps as the basis for the thumbnails
would speed things up I think the actual bottleneck is the writing to
the file system.
Below is a screenshot showing these thumbnails in the UI.




Finally I will say that while the code additions work, given my novice
status with typescript and asynch calls these changes may benefit more
from review and a little critical feedback before they're ready to
merge.