# Corona Sim Wiki Because we mainly use [Gitlab]( for our code and our documentation the latest version is always [here](

## Main Goal and Motivation The current coronavirus pandemic is impacting the living conditions of most people. Countries tried to slow the spread of the virus by implementing a variety of countermeasures. To give a better understanding on their effectiveness, we want to program a simulation game. We hope, that players will get a deeper understanding of how pandemics are spreading and how to defeat them. Hopefully, many who play our game will understand why some restrictions are neccessary in times like these. For our simulation we want to be as close to real life as possible. By doing so we hope to maximise the learning effect and the relatability for our players.

## Setting You (the player) are a mayor of a small city during a pandemic. As a mayor you want to get reelected. For that the response to the pandemic must be adequate or else the population loses their trust in your abilities. Your relatives also live in the City and when you make bad choices, they might suffer from the consequences.

## Technical Details We used Godot as our game engine, partly because it seemed easy to pick up and supports deploying the game as a website. We choosed GDScript as our language of choice, because Godot advertises GDScript (the inhouse developed ScriptLanguage) which has the best compatibility with Godot (Our initial choice was C#, but a note that the support was in beta made us switch). For information regarding the architecture of the simulation, have a look at [the Design Specification](

## Current State The project is (at the time of writing) heavily WIP. Therefore not all features are available and things might change. This being said, [the current version is online](

Things that already (mostly ^^) work:

- generating a random map every time. - generating a random population with families where each person has their own job and home address. - walking across the map including houses

## Roadmap There is still lots to do until we would consider the project to be in a minimum viable state. We set some Milestones to be our different versions of Prototypes, which can be found in [the Design Specification]( The second Prototype we wanted to include everything absolutely essential to deliver the core experience. After that there are still more ideas to improve upon, but (for now) that is something future us has to worry about.

## Problems we encountered Working with a new programming language always has its challenges. For context, GDScript offers some support to add type hints, which can help with understanding what variables can be used in which ways. However the support is very minimal and using the feature can also lead to [Cyclical Dependency Errors](, which were a headache to resolve.

Another interesting problem is that the navigation that Godot provides does not work as expected. To give some context, the developer can specify areas where the characters will be able to walk on the map by placing polygons on the tiles.

![The characters are only supposed to be able to walk on the light blue area.](

When Godot builds the whole map by placing the tiles it can then figure out, where a person should be able to go, and how they can get there. However, in what seems to be an optimization effort, Godot ignores some of these polygons. This led to problems, because we wanted the characters to walk through the doors, however they just phased through the walls like a ghost, which, while interesting, is not something ordinary people can do.

Working with Godot revealed that it itself is still under development and several features that might be expected in a Game Engine are simply not developed yet. This caused several problems which we had to painstakenly resolve manually.

When making the design specification for the simulator, we knew that we wanted to use Godot, however we did not have any experience with it, so the resulting design had some places where it was incompatible with the architecture of godot. This lead to us having to redo most of the specification, which took a couple of weeks, delaying the project.

## Lessons learned

- Only start doing the design specification of projects once the tools that will be used are understood well enough. - GDScript (or immature languages in general) do not work well when trying to build complex systems. - Developing a game is probably worth more than 3lp. ^^

## Further Information and useful Links: ### Godot

  1. Godot Project Page:

### Model

  1. Networksscience with focus on epidemics:

### Papers

### Other Simulations

  1. 3Blue1Brown Simulations:
  2. Gleamviz predict the future based on real world data:
  • ws2021/coronasim.txt
  • Zuletzt geändert: 2021/04/15 12:27
  • von vondowntown