VIRUSEPIDEMIC

The Game World

A Modular City

In order to allow cities of different size and appearance on each playthrough, we decided to go for a modular approach. Each module contains various types of buildings:

  • Homes:
    • Blocks - Contains many households
    • Houses - Contain one or two households
  • Workplaces:
    • Offices - Workplace for employees.
    • Stores - Every citizen visit stores regularly.
    • Gastronomy - Citizens meet friends here regularly.
    • Hospital - Provides intensive care.
Picture of a City

Building Assets by Synty Studio www.syntystudios.com and 255 Pixel Studios www.tmg1219.wixsite.com
Left: Apartment; Right: Office


Street Network

Currently the game includes two types of modules, CITY and SUBURB. Further module types could easily be added by placing vertex-objects at street corners and attaching the MODULE Script to the module object.

Ever module features a street network through which citizens will navigate the city. Each module side has three evenly spaced outgoing streets which allows the modules to automatically attach to their neighbors on game initiation, no matter the rotation. Routes for street navigations are calculated by a Dijkstra Shortest-Path implementation running on a separate thread for performance reasons.

Picture of a City

Own Composition
Building Assets by Synty Studio www.syntystudios.com and 255
Pixel Studios www.tmg1219.wixsite.com/creativeact


A Daily Schedule for Every Citizen

To simulate the city-population we created a daily schedule every citizen follows. In the morning citizens will head to work unless their household is quarantined or they’re having a fever or worse. After work, if they didn’t attend one for a couple of days, citizens will attempt to start a social meeting. A social meeting takes place either in the citizen’s home or in a gastronomical building. Friends will only join if they haven’t been meeting someone recently either (and of course only if they are not too sick or quarantined). If the citizen leaves work and does not engage in a social meeting, they will either visit a store first or head home straight away.

Simulating Citizen Movement

It is computationally not feasible to move every model of a citizen frame by frame. Hence, we decided to do so only in the city-module the player is currently observing. The movement of citizens outside this module is approximated.

To do so, we calculate the time by which the citizen will have reached the next module, then we deactivate the citizen game-object, push it on a custom created priority queue and have that queue wake it up again at the predetermined time. In case a citizen needs to wake up earlier (e.g., to join a social meeting), their game-object is removed from the queue and the queue’s heap property will be restored.