Project Details

Type: Team Project
Engine: Unreal Engine 4.18.3
Platform: PC
Team size: 4
Duration: 3 Days (Global Game Jam)

Desctiption

Global Game Jam 2018 this years theme was transmission we decided on transmission of a zombie virus. The goal of the game is to infect as many people as you can.

Intro


In this game you play as the zombie`s you start of with a small group of zombie`s and try to convert as many people as you can.
There are 3 classes for the humans

  • Citezens(Easy)
  • Police(Medium)
  • Soldiers(Hard)

The humans have health and an infection values the humans can die before they turn. Its up to the player how many zombies he sends in send in to many you kill the humans and your horde doesnt gorw. sent in to few and your zombies die.

My Work


Summary

When we had a general idea locked down we pretty split the work and I started working on the camera and the controls. None of us had experience in building RTS controls and started working on just moving the camera around, zoom, rotating and panning. After the camera movement, I started working on selecting units. For actually moving the characters I worked together with the person who made the AI for the humans and zombies after all that I made the zombie spawners. While I was working on the camera movements someone else worked on the characters.

Controls

Camera movement

For the camera movement, I wanted to add the function when the cursor is at the edge of the screen it moves in that direction. To do that I got the viewport size and broke that into a 2d Vector (x,y) and divide the mouse x location with the viewport X if the output is larger than 0.9 or smaller than 0.1 moves + or – in the x-axis the same for the y-axis which gives me a 10 % border around the screen where the mouse controls the input for the camera.

Camera Rotation

The player can change its view on the map by changing the angle. When the player presses the button to change the view opens a gate and get the values of the mouse position and adds it to a new rotator. The disable cam nav boolean is so you don’t accidentally change the position as you are changing the rotation.

Unit Selection

I don’t know if this is the correct way of doing it the way I made this work. However, I made it work by spawning in a cube on mouse click and then rescale it by mouse movement. First, make a valid check if the selection box is already spawned if not spawn it and move to Re-Draw Area function taking in the mouse location.

spawners
For the humans, I made a spawner that spawns a random amount of humans with an adjustable max spawns each spawner can be set to a difficulty this determines which human to spawn. Each spawner makes a list of what units it spawned if they are turned or killed they are removed from the spawn list if the list is empty it changes the material of spawner to indicate everyone is turned or killed in that outpost.