Commit Graph

74 Commits

Author SHA1 Message Date
evanpelle 6499569240 add winston logger (#289) 2025-03-18 14:36:30 -07:00
Evan 364387578b fix lobby duration at 60s now that we limit lobby size. remove "high traffic time" 2025-03-15 17:22:15 -07:00
Ilan Schemoul 2dd0c56583 fix: lobby were twice as long because of dynamic timer (#252)
We previously had a system where lobbyLifetime = gameCreationRate * 2
It was to always have one lobby ready.
With dynamic timer (start if enough player or timer's over) we cannot
rely on this system (which used setInterval) so we have one lobby and
check every 100ms if we need to create another lobby.
Might add 100ms+time of creating a lobby ms latency. Which is fine I
guess.
2025-03-14 14:30:05 -07:00
Ilan Schemoul 07ad7912bc feat: timer starts if enough player or enough time (#229)
Avoid these huge lobbies
2025-03-12 14:18:34 -07:00
evanpelle 5dc00bc3ab use git commit hash verification when replaying archived games (#204) 2025-03-10 12:40:36 -07:00
evanpelle 33292aec5c feat: replay archived games, gamestate hash verification (#195)
create endpoint to load archived game. when joining game client first
checks if the game is active, if not it requests the game archive from
the server. the archive is sent to LocalServer to replay the game
locally. Every 10 ticks a hash is stored on the archive, and during
replay the LocalServer verifies this hash.
2025-03-09 14:24:39 -07:00
ilan schemoul 1b76c46bc5 feat: remove LocalPersistantStats so we locally save GameRecords
GameRecords also now include PlayerStats
2025-03-08 17:39:41 +01:00
Evan 74ce3b3187 Update to Gatekeeper 2025-03-02 09:39:54 -08:00
Evan daa9820c32 added security middleware 2025-03-02 09:39:54 -08:00
Evan bad74a0488 schedule game duration based on time of day 2025-03-02 09:39:54 -08:00
Evan 3b492df56b set trust proxy to 3 2025-03-02 09:39:54 -08:00
Evan ccc2140f2d don't log each hash 2025-03-02 09:39:36 -08:00
Evan b449d6ef9b don't send desync message to client until fixed. 2025-03-02 09:39:36 -08:00
Evan a9caee6323 make GameManager more efficient 2025-03-02 09:39:36 -08:00
Evan a029b4277f use node cluster to shard server 2025-03-02 09:39:09 -08:00
Evan ff33c2db50 have server check hashes, crash game if out of sync 2025-03-02 09:29:10 -08:00
Evan cd5e2dfbb5 only limit ips in public games 2025-03-02 09:29:10 -08:00
Evan e0938253df send game hash to server each second 2025-03-02 09:29:10 -08:00
Evan 808107c9c3 don't log zod validation errors 2025-03-02 09:29:10 -08:00
NewHappyRabbit 02d5060352 Customizable creative mode 2025-02-24 23:06:50 +02:00
Evan a7f08b5233 allow up to 3 of same ip to join game 2025-02-23 19:57:51 -08:00
Evan 0994fb19bb rate limit start & create private lobby, change max game duration to 3 hours 2025-02-23 19:42:25 -08:00
Evan 528c8c371e only allow 1 ip per game, don't allow modifying public games 2025-02-23 19:42:15 -08:00
Evan 951d708763 only allow one ip per game 2025-02-23 19:41:56 -08:00
Evan a072a24433 add ws rate limiter 2025-02-23 19:41:38 -08:00
Evan 876fb8dbf9 validate persistent id to prevent player spoofing 2025-02-18 13:53:28 -08:00
Evan 6d507914c9 add websocket error handling 2025-02-12 13:31:22 -08:00
NewHappyRabbit 1f1a07113c Fixed creative mode not working in private lobby 2025-02-12 02:21:46 +02:00
NewHappyRabbit 684b0bb2e0 Added checkboxes to disable Bots and NPCs for single player and private lobbies 2025-02-11 03:29:56 +02:00
Evan b3498976fb show game map name in public lobby 2025-02-09 13:15:06 -08:00
Evan 4ee37323f9 format codebase with prettier 2025-02-01 12:05:11 -08:00
Evan a5a2f46099 have client send winner to server 2025-02-01 12:05:11 -08:00
evanpelle 8e61632b8b implement pause feature,
bugfix: server stops in the beginning if no ticks found
2024-12-25 15:19:35 -08:00
evanpelle 57cbf5c55e Refactor: Split config into Config and ServerConfig 2024-12-25 14:04:19 -08:00
evanpelle 44d6962b88 have private lobby show players 2024-12-24 11:47:11 -08:00
Evan 33b3255a38 try-catch on websocket message to prevent crashing server 2024-12-23 11:31:17 -08:00
Evan 113518a96e use better structured logging 2024-12-17 20:34:15 -08:00
evanpelle 1417808c14 store user's persistent id in bigquery 2024-12-17 14:30:16 -08:00
Evan 722165c401 adding persistent id 2024-12-17 14:30:16 -08:00
Evan d99b60b477 fix config build error, better logging in game server 2024-12-17 14:30:16 -08:00
Evan 4d3f690c45 bugfix: private game ending when no clients connected (disconnects caused games to end), so check for no recent pings as well 2024-12-16 21:12:55 -08:00
Evan e7791b183b fix active clients == 0 2024-12-15 13:26:42 -08:00
Evan 1576a2c744 update version, ping every 5 seconds, only end game if no pings for 20 seconds 2024-12-15 13:24:05 -08:00
Evan 2970cd9d34 actually make game wait 30s with no clients before ending, only archive game if someone joined 2024-12-15 13:07:34 -08:00
Evan 5cf6a35fee multiply by 1000 to wait 30s before stopping game. 2024-12-15 12:55:06 -08:00
Evan 2fc81c7d17 store client ips in bigquery table 2024-12-14 10:03:05 -08:00
Evan 323e30b875 fix join private lobby websocket reconnect bug 2024-12-08 13:17:23 -08:00
Evan 7669105a1b record games in gcs 2024-12-07 18:30:04 -08:00
Evan cd09c0a1d6 record game metadata to gcs 2024-12-07 08:54:09 -08:00
Evan b8db74247f add heartbeats, better websocket disconnection handling 2024-12-07 08:54:09 -08:00