For service boundaries & ownership see the dedicated service pages below.
This is the multi-page printable view of this section. Click here to print.
Architecture
- 1: Design Principles
- 2: Game Service
- 3: Robot Service
- 4: Trading Service
- 5: Map Service
- 5.1: MapType (Aggregate)
- 5.2: Map Configuration
- 6: Discussion
- 7: Learnings
1 - Design Principles
Global Design Principles
In MSD, we maintain a couple of global design principles, supposed to help in decision making. Every time we arrive at some priorization decision, these global principles should help deciding the issue. Therefore, this is a living document.
Technical Principles
(tbd - just keywords so far)
- JSON as configuration format (so that it can be reused in REST APIs)
2 - Game Service
4 - Trading Service
Functionalities
- Buying Robots
- Upgrading Robots
- Selling Resources
- (Buying Items)
Aggregates / Owns
- Money
- (Items)?
5 - Map Service
Use Cases
Create new Map Type
Trigger: REST call (POST containing the map type specification, format see TODO)
Responsible Aggregate: MapType
What happens?
- Store the specifification
- return the MapType ID
Produced Event(s): MapTypeCreated
Create Map Instance for a new Game, based on a Map Type
Trigger: Event (originating from Game service) that a new game has been created.
Responsible Aggregate: MapType
What happens?
- TODO
Produced Event(s): MapTypeInstanciated
- Generating Map
- Generating Resources
- Mining / Depleting Resources
Aggregates
See list below.
5.1 - MapType (Aggregate)
This page documents the design decisions for the MapType aggregate, which is responsible for
specifying a certain type of map, and creating an instance for it.
Configuration Principle
A map type is defined by its size and description. The grid cells are then further configured by a configuration which consists of the following sequential sections.
- Gravity distribution zones
- The gravity distribution is defined via a sequence of map areas, each having a certain gravity level.
- Those grid cells not covered by this definition have the default gravity value.
- Map structure - void / planet definition
- This section consists of several sequential layers of defining either planets or voids.
- A void is effectively a barrier, while a planet can carry a resource, a space station, or a black hole.
- Each new layer overwrites the ones before, allowing for complex distributions
- e.g. you could define a maze-like structure by first setting the whole map (or a large section of it)
to
void, and then add “pathes” ofplanetson top. - on the other hand, if you want large open space with one or several barriers in it, you start with
a
planet-defining layer, and then add thevoidsas barriers.
- e.g. you could define a maze-like structure by first setting the whole map (or a large section of it)
to
- This section consists of several sequential layers of defining either planets or voids.
- Distributions of resources, space stations, or black holes.
- Distributions consist of an area definition
