Code: Virus | Strategy Game

Keep updating!

Code: Virus is a turn-based strategy video game, where the player acting as a leader of a nation attempts to achieve one of several victory conditions against other human and computer-controlled opponents. The inspiration of making this game comes from COVID19 world-wide pandemic. I collaborate with Zetao Yu( MS in CS, Duke ) for developing this game. Currently, the game is under developing, and the demo is scheduled to be released in December, 2020

Detailed Project Documentation:


The game background was set to be in year BX1,  when the whole world is under panic due to the spreading of a highly infectious new virus. This new virus has too many unknowns for the world. Hence, in order to find a way to eliminate the virus, humans need to live in a "balanced" state for as long as possible to provide scientists enough time for virus study. Therefore, maintaining the country's relative "balance" is the core task for leaders in responding to the pandemic situation. In the game, the player will lead his/her country to deal with domestic societal problems caused by the pandemic, maintain economic growth, and conduct medical research on vaccines. Meanwhile, they should also make considerations on designing effective diplomatic policy, and deploy military force to assist allies and defend against enemy attacks. Maintaining a faithful international reputation, sustaining economic growth, and keeping the stability of social order can be key factors to the successful development of vaccines.


The idea of designing Code: Virus was originated from the ongoing Coronavirus pandemic in the real world starting from Dec 2019. The game has historical and momentous significance which provides players an opportunity to rewind the time and save the world, and allows them to re-think the solutions resolving the pandemic from a different perspective (the leader of a nation). Through playing the game, players are able to reflect and gain some sense of the complexity of leading a country under the devastating crisis. Moreover, players can start to think deeper in balancing gain and loss, and practicing their decision-making skills in a timely manner. 

The game itself can also work as a carrier which records and provides important historical evidence used for future studies of this tragedy.

Game Components and Functionality

Game world 

To avoid unnecessary debates on the association between the game world and the real life world, the year and nation settings in the game will all be imaginary. The map of the world will be the same as Earth while the area and the location of each country can be randomly assigned by computer. The whole Earth will be presented as a sphere in the scene that the player can click, rotate and zoom in/out to observe the details of each country on the planet. The level of map details will be limited to giant landmarks, such as mountains, rivers, forests, and cities. Further detailed information would not be shown on the sphere. 

Game setting 

The game has several predefined settings or the player can customize the initial setting by their own. When creating the game, the player is free to modify his/her nation geography, population, financial condition, military power, technology level and international status. However, each factor has a range of points, and there is a max points limitation to measure the sum of all factors’ points, which can prevent the players creating an over-powerful country. There is no min points limitation -- starting with a weak country and challenging themselves are always welcomed. The player can also change the information transparency among the nations, where high transparency indicates more information about your country would be shared to your opponents and vice versa. The number of turns can also be changed before the game starts. 

The game is turn-based. In a player's turn, several windows would pop up to display some events happening in this turn. The events come from all dimensions. They can be events triggered by the nation’s status or by the opponents’ movements, or just entirely random events. Making bad decisions can decrease your nation’s rating in some fields, while making good decisions can increase those scores. A Player can choose from the options in the windows (if provided) to make reactions, or one can interact with the map to do some operations. 

The game only has one victory condition, two public failure conditions, but multiple hidden achievements. The victory condition is called “Score Victory”. It calculates all aspects of your nation, including international reputation, military force, technology, domestic happiness, and economy, health. The player having the highest combined score after a certain number of turns is the winner. Two public failure conditions include the National Financial Crisis (Treasury goes below $0) and Severe Health Problems (Health score goes below 20%). When the failure conditions are triggered by the player, the game immediately ends indicating the player loses. If any of the computer opponents fail, some events would be triggered to indicate the fact that the country falls and any other effects it brings to the rest of the world. Alternatively, if any players trigger the conditions of the hidden achievements during the game, the game would also immediately end and a specific computer animation would be played to describe the story ending. Different endings promote different winner(s). Or, it might be the case that no winner exists for some story endings.

Art Style

The game is designed in the style of magic art, using vivid and high contrast color with hand drawn style textures. The surrealistic game design is intended to avoid making players get into a process of being nervous and stressful under the long time playing period. A good reference for our game color design is: ‘polytopia’, which is a turn-based civilization strategy game. Not like the ‘Civilization’ series in a realistic style, ‘polytopia’ uses very bright and vivid colors to build a magic-topia. For our game design, we choose ‘green’ and ‘purple’ as the basic theme colors. ‘Green’ could symbolize ’nature‘ ‘freshness’ and ‘healing’, and ‘Purple’ could symbolize ‘spirituality’ and ‘ambition’. 

Color Palette

Current stage

Since this project is supposed to be a year-long project with lots of details, design, and implementation involved, in this semester, our goal was set to be, first, finishing the researches and the design of the game, including the game background, setting, rules, arts, and figure out the accessible tools we would use. Second goal was to build the basic framework of the game mainly at backend. That is, implementing the turn-based game logic and workflow. We currently achieved that two goals by having the game story determined and some operations implemented in the game world with a designed art style. 

The previous document shows all non-technical designs we have committed. Below we list some technical functions we have implemented: 

  • Game start
  • Rotatable and highly customized Earth
  • Turn-based strategy game system
  • Pop-up daily event
  • Player data storage and transfer
  • NPC turn operations
  • Some simple UI design
  • Basic graphical design

Future steps

  1. Event system

We need to first create a wide range of events that can be used in our daily pop-up window and player operations. The events should be correlated with pandemic situations closely. Moreover, the events should be carefully designed to achieve creativity, humorousness, reasonability and balance.

In the game program, we need to implement an event system to randomly assign events to the players in each turn. The consequence of each option should be stored to each player object.

  1. In-turn Operations

Currently we have not yet implemented normal operations (as we describe before in the Game Tech Design/Operations part) for players except daily pop-up events. Since those operations are the actions players can take in each of their turns, it is the core part of our game. Hence, it has a high priority in our development list. 

  1. Win/Loss Condition

We need to create win/loss conditions and narratives relating to the pandemic. That is, some endings should have stories. The corresponding animations should also be created.

In the game program, we need to implement a win/loss condition check after every operation from each player.

  1. UI Design

Making the accessible UI is important for players to fully experience the game contents. More buttons and charts will be implemented to enrich the game data that can be viewed by players.

The style of UI should also be re-designed to comply with the art style of the game.

  1. Sound and Music

Apparently game sounds are one of our next steps.