Commit Graph

30 Commits

Author SHA1 Message Date
Evan 8b6895d745 add prettier import plugin 2025-03-31 13:09:27 -07:00
evanpelle ab3f4fbac1 All players must join game before spawn (#380)
## Description:
The server stores all players that have joined, and once the game starts
it sends a list of players to all clients. Players cannot join after the
game has started. Server now generated the PlayerID instead of the
client.

The is necessary for team mode, we need to know how who is playing the
game before it starts so we can properly assign teams based on clans.

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

evan
2025-03-30 17:04:29 -07:00
tropptr-torrptrop 72016f3dd4 Focused player border highlight (#304)
Tried to implement feature to outline player under mouse cursor.
Intention is to improve gameplay and provide a way to estimate players
territories for strategic planning / avoid attacking wrong players with
confusingly similar colors.

When you stop cursor at the player - his borders will be drawn in white
color.
To focus on other player - click or move cursor to other player. 
To hide outline - click on empty space (water, land). 
"Focus" UI feature also triggers outline for the target player (easier
to see who exactly is that you are looking at).


![1](https://github.com/user-attachments/assets/f7bda876-4b20-456c-9463-d2cfbb53ad5a)

![2](https://github.com/user-attachments/assets/f5cd6d12-fd52-4890-b3ee-caba9ff17753)
![FUN 2025-03-20 23 06
23](https://github.com/user-attachments/assets/f0e6e343-9442-4d89-9b7a-4bd01c6e00d0)
![FUN 2025-03-20 23 07
51](https://github.com/user-attachments/assets/2cc748e1-bc66-4834-82ad-22a4184a3006)


Done via getting player under mouse cursor, setting it as global
focusedPlayer and painting borders in white color.
Tried to maintain minimal changes and utilize existing rendering queue.
Also added hover delays to avoid excessive redraws and provide better
experience. Redraws only happens when focusedPlayer changes - one time
for old focused player to clean outline and one time for new focused
player.
2025-03-29 14:41:28 -07:00
Evan 40966ca3b9 format all files with prettier 2025-02-12 08:28:15 -08:00
Evan 2fa576c841 sanitize profane usernames 2025-02-08 19:00:35 -08:00
Evan 0969088dc9 actually call heartbeat, remove interval in GameRunner 2025-02-01 20:18:57 -08:00
Evan 641d08a9ee have heartbeart executeNextTick on GameRunner to prevent browser throttling web workers 2025-02-01 20:18:57 -08:00
Evan 4ee37323f9 format codebase with prettier 2025-02-01 12:05:11 -08:00
evanpelle d009ef925c use error update to show error modal 2025-02-01 12:05:11 -08:00
evanpelle 4bbb63fd48 move Game updates to GameUpdate.ts 2025-02-01 12:05:11 -08:00
Evan f0f5bae79f thread_split: convert all tile to tileref 2025-02-01 12:05:11 -08:00
evanpelle fed18e471c thread-split: create PlayerProfile transfer flow 2025-02-01 12:05:11 -08:00
Evan e76837c75a thread-split events display 2025-02-01 12:05:11 -08:00
Evan 3da6008e9f thread split: get units working 2025-02-01 12:05:11 -08:00
Evan 8c947a9fbf use updates for serializing game updates 2025-02-01 12:05:11 -08:00
evanpelle 7673cf03ac multithreading: radial menu works 2025-02-01 12:05:11 -08:00
evanpelle 8a320f184c build worker messaging system 2025-02-01 12:05:11 -08:00
Evan 3e8517363f use GameView in renderers 2025-02-01 12:05:11 -08:00
Evan 8616e9bfcb game runs in seperate thread 2025-02-01 12:05:11 -08:00
Evan dab427d614 put methods onto terraintile 2025-02-01 12:05:11 -08:00
evanpelle 111775a3f4 generate mini map offline and load it from binary. this reduces loading time by 30-40% 2024-12-25 11:27:36 -08:00
evanpelle ff02d9d8b6 have core/ directory use consolex for remote logging 2024-12-18 12:00:00 -08:00
evanpelle f3cb220711 don't use crypto.randomUUID() because older browsers may not support it 2024-12-18 08:01:13 -08:00
evanpelle b97ef32adb only calculate cluster when tile changes 2024-12-10 20:28:39 -08:00
Evan 9391dad131 remove worker timeout 2024-12-03 19:20:07 -08:00
evanpelle 5a4a62bb86 in progress 2024-12-03 16:44:28 -08:00
evanpelle 4edd66dc1f AStar returns cell instead of path 2024-12-03 14:35:09 -08:00
Evan 30f72a3365 NPCs create battleships, destroyers. start work on miniastar 2024-11-30 12:41:22 -08:00
Evan 5d4befb117 Created mini map for a star search 2024-11-29 20:35:08 -08:00
Evan 4899196613 refactor: move worker into worker file 2024-11-29 15:57:39 -08:00