From 51650eb930878be3d58a3b3657fa8e634c5d770c Mon Sep 17 00:00:00 2001 From: evanpelle Date: Sun, 25 Aug 2024 20:21:35 -0700 Subject: [PATCH] can change spawn in beginning of game --- TODO.txt | 11 +-- src/client/ClientGame.ts | 4 +- src/client/index.html | 21 +++++ src/core/Game.ts | 10 ++- src/core/GameImpl.ts | 103 +++++++++++++++++----- src/core/Schemas.ts | 8 +- src/core/Util.ts | 10 +++ src/core/configuration/DefaultConfig.ts | 4 +- src/core/configuration/DevConfig.ts | 9 +- src/core/configuration/PastelTheme.ts | 3 +- src/core/configuration/VintageTheme.ts | 3 +- src/core/execution/AttackExecution.ts | 4 + src/core/execution/BoatAttackExecution.ts | 4 + src/core/execution/BotExecution.ts | 6 +- src/core/execution/Executor.ts | 5 +- src/core/execution/PlayerExecution.ts | 4 + src/core/execution/SpawnExecution.ts | 21 ++++- 17 files changed, 187 insertions(+), 43 deletions(-) diff --git a/TODO.txt b/TODO.txt index 51f7947d8..995e2de38 100644 --- a/TODO.txt +++ b/TODO.txt @@ -43,15 +43,16 @@ * BUG: boat doesn't work if on lake if other player not on same lake DONE 8/23/2024 * Allow boats to attack TerraNullius DONE 8/23/2024 * try vintage theme DONE 8/24/2023 -* Make lobby background the terrain map -* improve menu (keep highlighted when click, allow deselect lobby) +* BUG: fix hotreload (priority queue breaks it) DONE 8/24/2024 +* improve menu (keep highlighted when click, allow deselect lobby) DONE 8/25/2024 +* give time to (re) spawn at start of game +* store & delay tile updates for lag compensation * add shader to dim border * REFACTOR: remove player.info() * REFACTOR: give terranullius an ID, game.player() returns terranullius -* give time to (re) spawn at start of game -* store & delay tile updates for lag compensation * REFACTOR: ocean is considered TerraNullius ? -* BUG: fix hotreload (priority queue breaks it) +* REFACTOR: remove player config? * PERF: use hierarchical a* search for boats +* PERF: render tiles more efficiently * Add terrain elevation to map * boats can go around the world \ No newline at end of file diff --git a/src/client/ClientGame.ts b/src/client/ClientGame.ts index d7b943ed1..41580c8b9 100644 --- a/src/client/ClientGame.ts +++ b/src/client/ClientGame.ts @@ -182,12 +182,12 @@ export class ClientGame { return } const tile = this.gs.tile(cell) - if (!tile.hasOwner() && !this.spawned && this.myPlayer == null) { + if (tile.isLand() && !tile.hasOwner() && this.gs.inSpawnPhase()) { this.sendSpawnIntent(cell) this.spawned = true return } - if (!this.spawned || this.myPlayer == null) { + if (this.gs.inSpawnPhase()) { return } diff --git a/src/client/index.html b/src/client/index.html index 76f439141..1c1fff888 100644 --- a/src/client/index.html +++ b/src/client/index.html @@ -20,6 +20,27 @@
+
+

DEVLOG: 8/18/2024 - 8/25/2024

+ +