Kontakt
stefan.bente[at]th-koeln.de
+49 2261 8196 6367
Discord Server
Prof. Bente Personal Zoom
Adresse
Steinmüllerallee 4
51643 Gummersbach
Gebäude LC4
Raum 1708 (Wegbeschreibung)
Sprechstunde nach Vereinbarung
Terminanfrage: calendly.com Wenn Sie dieses Tool nicht nutzen wollen, schicken Sie eine Mail und ich weise Ihnen einen Termin zu.

Übung »Serviceschnitt eines großen IT-Systems, am Beispiel von "The Microservice Dungeon"«

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.

Dauer
Ca. 120 min
Video(s) hierzu

Worum geht es?

The Microservice Dungeon ist ein gemeinschaftliches Projekt aus vier Lehrveranstaltungen:

  • Informatikprojekt (Informatik BA, 5. Sem.)
  • DDD/FAE (Digital Sciences Master / Spezialisierung Software Architecture)
  • Microservice Architectures (Code & Context BA, 3. Sem.)
  • Project Launch (Code & Context BA, 5. Sem.)

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

  1. … einige “zentrale Services”, die die Spiellogik als REST-API und Events zur Verfügung stellen. Um diese Services geht es in dieser Übung.
  2. … eine beliebig große Zahl von “Player” Services, die komplett unabhängig von einander gegen diese APIs/Events programmieren und versuchen, möglichst erfolgreich gegen die anderen Player-Services zu spielen.

Ihre Aufgabe

  1. Lesen Sie die Beschreibung der Dungeon-Regeln lesen (jede:r für sich), siehe unten unter dieser Aufgabenstellung.
  2. Bilden Sie Kleingruppen zu ca. 4 Personen
  3. Diskutieren Sie das Gesamtsystem. Haben Sie Fragen? Fragen Sie den Professor.
  4. Suchen Sie sich auf diesem Miroboard eine Stelle für Ihr Team. (Miroboards)
    • Sammeln Sie wichtige Entities und Funktionalitäten als Zettel
    • Clustern Sie diese Entities und Funktionalitäten so, dass sie sinnvoll von einem unabhängigen Team implementiert werden können, ohne dass die sich dauernd mit anderen Teams abstimmen müssen.
    • Geben Sie diesen Clustern einen (Service-)Namen.

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!

Die Dungeon-Beschreibung

Dungeon

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.

Dungeon Example

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.

Movement

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

Spacestations are a special type of planet, which can be seen as trading and spawn posts. On a spacestation you can:

  • Sell resources
  • Repair robots
  • Upgrade robots
  • Buy robots

Fighting

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:

  • As with all action every player can only do one atack per turn. That means either one normal atack or one Special Item
  • First all damage Dealt gets calculated, then all damage recieved. That means even when you get destroyed you will still have dealt damage that turn.
  • When a Robot is destroyed all its resources are equally divided between all other robots in that room
  • If a robot has full cargo and can not carry it´s share of resources they will again be distributed among the remaining robots wiht free cargo space
  • If there is not enouth space anywhere to carry the dropped resources they will be lost to space

You can build blockades to stop other players from leaving the room.

  • Blockading costs 2 Energy + 10% of max energy capacity for every round the blockade is uphold
  • during a blockade robot can enter the room but not leave it
  • blocking has to be renewed every round making it impossible for a Robot to do anything else while blockading
  • If a player tries to move through a blockade it still costs energy

Gameloop

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:

  1. Blocking
  2. Trading
  3. Moving
  4. Fighting
  5. Mining
  6. Scouting

Gameplay

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.

Starting Stats

Money Robots
200 1

Every robot costs 100 * (1.10 ^ robot count).

Robot Upgrades

  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)

Energy Costs

Blocking Mining Movement Attacking
2 + 10% max energy 1 * (mining strength level + 1) 1 * movment difficulty 1 * (damage level + 1)

Mining Resources

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

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

Trading

Spawns and Spacestations are points of trading. You can sell resources for moneten and buy several upgrades. You can buy:

  • New Robots
  • Robot Upgrades
  • Special Items
  • Energy Restoration
  • HP Restoration

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.

Lösung

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.