Game Loop

Game Loop

Game Loop

The current phases of the execution part of a round are these(for more information look in the technical views of robot and trading):

1. Trading
2. Moving
3. Repairing
4. Battleing
5. Mining
6. Regenerating

Events

Before a game

Before the start of a game there are these three game service related events.

  • Game Created

  • Player “name” joined the game. (optional, if no player joins then this event is not produced)

  • Excursus: The game world is created through a REST call to the map service. The game world is automatically sized to the created game maximal player and round amount.

POST

http://{defaultHost}/gameworlds

example request payload

{
  "gameworld": {
    "player_amount": 100,
    "round_amount": 1000
  }
}
  • The map service is producing an event for the created game world in the channel gameworld-created

example event payload

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "spacestation_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "status": "active"
}
  • Game started

During a game

In the gameplay there is a loop of repeating events:

  • Round x started (With round x started event automatically begins the command collection phase, where all the players send their commands to the game service)

  • Command Input ended. (after this event the game service is distributing the commands as packages to the other services for every possible command type in the correct phase order. The services execute the commands directly after receiving it. The other services have no awareness about phases.)

  • Round x ended.(After this event a new round will start. Here you can adjust your strategy, after receiving all responses to all actions )

Game ending

The final event is:

  • Game ended (with this event a game ends. No commands can be issued anymore. GameLog service should provide a scoreboard and trophies. When a new game starts, you have to join it again to play.)

Cheat Sheet

Game Timeline

Repository Link Game

Last modified February 4, 2025: fix go & npm dependencies (8ff1fa0)