The story of this game is that the player is a robot trying to escape a laboratory. They have a minute for each level. Meaning, in this game, the player will die if they can not beat the level in one minute to add an extra element to the game. In this game, the abilities are meant to be upgraded parts for the robot. You can collect these to get abilities for the level that the player can keep throughout the game. Robots are patrolling the laboratory looking out for the player to stop them.
For the power-ups, there is a bool list that determines what power-up has been collected. This was the only way I thought of doing it at the time, but I could have done it a lot better using things like case system. When the player collects the object, it spawns an effect to signify that it has been collected. Then it can add jump force or set certain things to true depending on the power-up.
There is the destroy obstacle script which allows the player to destroy walls. Then there is the shooting script, which does not work in games but allows the player to shoot. Then there is the bullet script, which adds force to the bullet and damages the enemy.
Here is the player controller. First, it sets all the variables for the player like health. Then it checks if the player is inputting in a certain direction. Based on this, it can both flip the sprite and move the player. For movement, if sets the velocity to a new movement vector. Then there is the damage and death function to kill the player when damaged.
Here are the odd scripts that help make the game work. First, we have the script that destroys the player after a minute. This is because in this game the player will die if they can not beat the level in one minute to add an extra element to the game. Next, there is the enemy script. This makes the enemy go back and forth on a platform based on the side he hits, this used to work but does not any more.
There is the script for the lava, which destroys the player if the lava is the tag hit. Then there is the load level, which loads the level based on a tag. This is used at the end where the player hits the goal. Lastly, there is a script that checks if the player is colliding with the ground.
For level one, I wanted it to be a simple walkthrough where the player goes from one end to another. This was to introduce the movement and environment. This level needed to be simple and lacked any abilities. I created the player assets and ability assets for all the levels I worked on. I animated the assets for some parts of the games.
For level two, it is the level that introduces the idea of abilities. In this game, the abilities are meant to be upgraded parts for the robot. The player picks it up, and it allows them to jump. This also introduces the jump mechanic. The level layout is the same one as the first, just with a higher goal.
Level three introduces the third ability, showing off the destroy obstacle script. Each sprite was going to have a unique look, but I did not get around to making it. the layout again is the same.
Level four is the first new level with a completely different layout. The player needs to jump across the platforms and escape the level. There is an enemy on the middle platform which at one point worked, but the package stopped being updated. It used to go back and forth patrolling the platform. There is lava the player must avoid, it does work but did not collide properly in the video.
Game Playthrough: