Ee Xuan En, Arvin
Maze Escapers
Game Engine: Unity 5
Platform: PC

Scripting Language: UnityScript
Maze Escapers is my second school project to learn about 3D game development. It is a 3D local multiplayer game made with a partner. The game is made in 2 months. Maze Escapers require players to cooperate as they fight through enemies and solve puzzles to escape into safety. The controls of the game allow both the keyboard and controllers. I am mainly the programmer for the game.
Scope of Work:
-
Puzzle design and its functionality
-
Door animation and its functionality.
-
Enemy spawning system.
-
Camera setting up.
-
Shotgun firing functionality.
-
In-game UI
In-game screens:




Programming

Pseudo code for Light Puzzle
//Generate Sequence Script
//At start-up, find all 6 cylinders of the puzzle with the light, put them in arrays and set the color of the light to black (which "offs" the light).
//Rearrange the sequence with SequenceGenerator() function and set other variables.
//Wait for player interaction with the box.
//Once the player touches the box, it checks for the tag, whether it has collided recently and its lockdown mode (will explain later).
//It triggers the LightUpSequence() function which reset variables to allow the sequence to restart including making Triggered true.
//In the Update function, it waits for Triggered to be true to lights up the first sequence.
//Using delayTime set by the difficulty of the puzzles in the editor reduces the time and changes to the next sequence when it reaches 0 till it reaches the end of the sequence. The light is "off" again in each change of sequence.
//Allows the player to solve the puzzle.

//The SequenceGenerator() function
//for each element in the sequence (which are integers)
//store the integer by using random from current element to end of the array.
//store the first element in a temp variable
//switch the elements with each other
//return the generatedArray which is the sequence
//In LightUp script,
//when the player collides with button, it checks whether it is the correct sequence.
//if it is correct, it lights up green and switches to next sequence.
//if it is wrong, it starts the lockdown which lights up all red until the lockdown time ends.
//the sequence is then reset with LightUpSequence() function and start playing the sequence again.

Pseudo code for Shotgun firing mode
//When the player press the fire button.
//check for the current firing mode selected by the player.
//play the Fire() function for default single projectile firing
//or else play the Blast() function for shotgun firing
//In Blast() function,
//for the number of pellets the shotgun is supposed to fire as set in the editor.
//instantiate a new pellet and generate a random rotation of x and y within a specified range.
//make the pellet rotate to the rotation and add speed to it
//destroy the object based on the range of the shotgun specified in the editor
//using ray cast hit, check if it had hit an enemy.
//reduce that enemies health based on the shotgun damage
//if the enemy health reaches 0,
//remove it from scene.
//add an explosion prefab and increase the score of the player.
You can download the game here. (Note : This is a google share link. Please log in onto google account.)