Tilemap and savegames.

This commit is contained in:
Marvin Blum
2022-11-22 15:20:51 +01:00
parent b4baf65997
commit fb4bc53b64
2 changed files with 9 additions and 1 deletions

View File

@@ -22,3 +22,11 @@ The server and client communicate through a simple TCP (web socket) and JSON pro
### Authentication
For authentication oAuth with a refresh token will be used. Clients need to authenticate themselves when connecting to a game.
## Tilemap
The tilemap is implemented as a simple 2D array of objects. Each tile has an owner, properties of it's type, price, and so on. Maps are crafted by hand and don't change during the game, except for some population growth (new houses, higher demand) and changes made by the players. Roads for example cannot be changed. Each map has a biome, which sets the basic theme for the map (desert, green, artic, ...).
## Savegames
Savegames are stored in Postgres as JSON blobs and serialized/deserialized when saving/loading a game.