Summary

Keep Breathing is a project under development made by two people, me and Per Stenbeck. During our first year studying Game Design at Future Games, we wanted a challenge. We decided to start a project that would be an online game to immerse ourselves in the Unreal Engine and online scripting.

Keep Breathing is a top down multiplayer twin stick shooter. The finished game is planned to be a “Battle Royale” kind of game, where players hunt for loot, and kill each other for oxygen. You run out of oxygen, you die. Last man standing wins the game.

Hosting and Joining

Below is the code for creating and joining a session.

Hosting

This function is triggered any time the value of the Player Array changes (whenever a player joins or leaves the session). The function then reloads UI so that the player list is updated.

The server destroys the lobby UI for every client  that is connected to the session and opens the level.

Joining

Refreshing the server list (1/2)

Refreshing the serverlist (2/2)

Joining the session that the player clicked on in the server list.

Oxygen

Oxygen is consumed over time and if the player dashes, a chunk of oxygen is used to perform a dash. When the oxygen level reaches zero, the player’s health is starting to drain. The player can pick up oxygen tanks from dead players. To fill up the oxygen level, the player holds “X” on a controller.

The OxygenLevel variable is RepNotify, meaning that this function is called any time the value is changed.

Weapons

We prototyped and played around with a lot of different weapons to make them feel fun to use and balanced. In order to efficiently prototype new weapons, we made sure that the weapon system would let us add a new weapon with ease. So, to add a new weapon we simply add it in the list of weapons enums, and in the end of the chain add the weapon logic.

This section is called when the player are pressing or releasing the right trigger.

The different weapon logic is put here.

The Shotgun

When the shotgun is fired 11 projectiles is spawned in an arc at the tip of the gun. The projectiles are spawned in a for-loop. Each projectile does a certain amount of damage, obviously making the shotgun deadlier at a closer range.

Dashing

Dashing can be useful when fleeing from an enemy, or when the player is trying to get close with a shotgun or any other close-range weapon. Although, the player should be careful, since dashing consumes a lot of oxygen at once.

The client are telling the server that it wants to dash, the location and the axis of the left thumbstick.

If the left thumbstick isn’t pushed in any direction, the player will dash forward. Otherwise the dash will be in the same direction as the thumbstick axis.