Project type: Game

Date: 20-05-2022

Status: Finished

Software used: Visual Studio

Language used: C#

Role: Developer

Team size: 2 developers

About the project

In this project I made an escape room game with another developer. The goal of the game is to find the end in all rooms.

I've worked on most of the code and the structure of the project.

In this project I worked on the parts below.

Timer Behaviour

In this project I use a clean code structure with on enter, on exit and update events. The timer behaviour script is responsible for easily creating a timer that calls a function at the specified time. I did this with an abstract function. The timer takes the frame time into account. So, if the frame rate is low, the missed timer ticks will be caught up, Therefore the gameplay is the same on every device.

Trap Generator

The trap generator is responsible for placing all traps. 5 traps are placed randomly in each room. Each trap has its own logic with where the best place in the room is to be placed. With the ITrap interface and the GetSuitableLocation function, I can find a suitable place in the room for each trap.

Turret

The turret uses a timer behaviour to fire periodically. The turret calculates the best place in the room to shoot a long distance. When placing, it also checks whether the door is blocked. Each timer tick a bullets fires. The bullet is given a direction, speed and the remaining frame time, therefore the bullet won't lag or skip tiles when frame rate is low.

Saw

The saw moves back and forth in a horizontal or vertical direction. The saw will move in the other direction when colliding with walls. Every move it is checked whether it is possible to move to the new position.

Spike

The spike is a static trap. The spike can only be placed on walls. The spike does not take account for doors. Therefore, it may be the case that the player loses a life by entering a room.