Wie kann man für ein größeres Softwaresystem sicherstellen, dass mehrere Teams parallel daran arbeiten können, ohne sich dauernd in die Quere zu kommen? Dies wird anhand des Online-Games “The Microservice Dungeon” in dieser Übung durchgespielt.
The Microservice Dungeon ist ein gemeinschaftliches Projekt aus vier Lehrveranstaltungen:
Es geht darum, gemeinsam ein Online-Spiel zu programmieren, wobei die einzelnen Teams möglichst unabhängig voneinander arbeiten können. Daher wird das Spiel als Microservice-Landschaft konzipiert. Es gibt
PS: Man kriegt den Serviceschnitt, der im Projekt gewählt wurde, ziemlich leicht raus - machen Sie das mal bitte bewusst jetzt nicht. Schauen Sie sich nur die nachfolgende Doku an, und bilden Sie sich erstmal selbst eine Meinung. Danach vergleichen wir!
The dungeon represents the gameworld and is one of the central services in our microservice dungeon game. It consists of several planets, connected with other neighbouring planets.
Our dungeon consists of planets, where each planet has an UUID
and is directly connected to its neighbouring planets.
As player you only know the existence of the planets you have been in and which are neighbours to your robots current planet.
A robot can only move to a neighbouring planet. (Exception granted for special items.)
There can be several robots one a planet, with no upper limit.
You can only see the contents of the planet you are currently in.
Each robot can only move one room each turn (some special items like “wormhole” cause exeptions). There are different types of gravity on each planet, where it get’s more difficult to moving through these planets.
Gravity | Energy Costs |
---|---|
Easy | 1 |
Medium | 2 |
Hard | 3 |
As an example: Moving from an easy gravity planet to a neighbouring medium gravity planet costs 1 energy.
Spacestations are a special type of planet, which can be seen as trading and spawn posts. On a spacestation you can:
As soon as you enter another planet with your robot, you get the information of How many other robots are on that planet. Here you can choose whether you want to engange in a fight with that player or choose to be peaceful. In battle following rules apply:
You can build blockades to stop other players from leaving the room.
Each robot’s action whether it is blocking, trading, moving, fighting or mining will be executed at the end of each round. A single round is 60 seconds and will be tracked by a special service. During the 60 second timeframe each player can schedule one command per robot to be executed at the end of the round. Actions will be batched together and executed after each other in the following sequence order:
You should now be able to start the game space cadet! We are going to give you 200 moneten and a robot to start your adventure in the Galaxy of Morpheus. During your new adventure you will be able to buy new robots and upgrade existing ones to create a strong army of robots. Be tactical with your robot’s energy usage.
Money | Robots |
---|---|
200 | 1 |
Every robot costs 100 * (1.10 ^ robot count).
LVL0 | LVL1 | LVL2 | LVL3 | LVL4 | LVL5 | |
---|---|---|---|---|---|---|
Storage | 20 | 50 | 100 | 200 | 400 | 1000 |
HP | 10 | 25 | 50 | 100 | 200 | 500 |
Damage | 1 | 2 | 5 | 10 | 20 | 50 |
Mining speed | 2 | 5 | 10 | 15 | 20 | 40 |
Mining strength | Coal | Iron | Gem | Gold | Platin | ? |
Energy capacity | 20 | 30 | 40 | 60 | 100 | 200 |
Energy regen | 4 | 6 | 8 | 10 | 15 | 20 |
Scouting | You can see neighbouring planets | In addition you can see if neighbouring planets are not empty | You can see which and how much resources the planet has | You can scan how many other player’s robots are in the room | You can use 10 energy to see 2 planet far | You can use 100 energy to see 3 planets far |
Cost | Free | 100 + (100 * 1.05^upgrades - 100) | 300 + (300* 1.05^upgrades - 300) | 900 + (900* 1.05^upgrades - 900) | 2700 + (2700* 1.05^upgrades - 2700) | 8100+ (8100* 1.05^upgrades - 8100) |
Blocking | Mining | Movement | Attacking |
---|---|---|---|
2 + 10% max energy | 1 * (mining strength level + 1) | 1 * movment difficulty | 1 * (damage level + 1) |
Resources are a central part of the microservice dungeon. It brings economical value into the gameplay. Each resource can be mined by robots and later sold for moneten 💸. There are five different kinds of mineable resources:
Resource | Cost | Rarity |
---|---|---|
Coal | 1,5 | 16 |
Iron | 3 | 7 |
Gem | 6 | 3 |
Gold | 12 | 2 |
Platin | 24 | 1 |
After every mining or scanning of a resource field the player which has mined or scanned said room gets notified of the remaining amount of resources. Resources can be depleted. Upon depletion a new resource spawns at a random location on the map. If a Robot mines with a full Inventory all mined resources are lost to space. Multiple robots can mine at the same room, with no Upper limit.
Special items are expensive one time consumables which make the gameplay a lot more fun!
Rocket | Wormhole | Long range Bombardment | Self Destruction | Reperation Swarm | Nuke | |
---|---|---|---|---|---|---|
Effect | 5 Damage on a single target | Teleport to random planet | 10 Damage to all robots on a specific planet | Self destruct a robot and damage all robots on the planet by 20 | Heal all of your robots on the planet by 20 | 100 damage on all robots on a specific planet |
Spawns and Spacestations are points of trading. You can sell resources for moneten and buy several upgrades. You can buy:
The costs for HP Restoration depends on the Level of that Robots Max HP independent of how much HP you are acctually repairing. Same goes for Energy Restoration and Max Engery Level. You can only repair a robot to max HP. When buying a new Robot it will spawn in the Room in which it has been purchased. Each Robot can hold an unlimited amount of Special Items.
Eine Lösung im eigentlichen Sinne gibt es für diese Übung nicht. Sie sollten erst einmal die nächste Übung (Context Map) machen, und dann mit der tatsächlichen Implementierung vergleichen.