A Unity project meant to replicate Super Mario Bros. World 1-1 (Unity 2020.3.2f1)
This project was meant to be a learning experience for the Unity game engine. It involves Agile methodology and team collaboration.
I was tasked to develop a game, and complete a series of user stories. Amongst the examples below, I had to implement enemy behaviors, create animations via transform/spritesheet.
One of the bigger challenges I faced was implementing the automatic sequence that followed after the contact with the flagpole. I initially tried to switch the character's rigidbody state to kinematic to ignore the forces and collisions acting against the object. However, I felt that applying linear interpolation seemed smoother.
In addition to gaining experience on the Unity game engine, I have also learned to apply the integral concepts of OOP. Furthermore, I gained some experience on utilizing Git version control in a team environment(creating working branches & merging branches).
Scene transitions are switched by using a SceneLoader prefab. It switches with a fade-in/out animation as scenes are opened/closed.
Movement uses a Rigidbody2D component and velocity positioning. It's controlled through the arrow and A/D keys.
Jumping also uses velocity positioning, but vertically. It is mapped with the 'SPACE' key.
To prevent the character from double jumping, an isGrounded boolean is defined by using the OverlapCircle() method that checks if the character's feet position overlaps the ground layermask.
UI for score, coins, lives, and timer are displayed with the help of a GameManager prefab. As the GameManager updates its' stats, so will the UI.
The statistics are only recorded per attempt through the use of the DontDestroyOnLoad() method. The prefab is also being controlled by using the singleton design pattern.
Upon collision with the character, only animate the block when the character's collider max 'y' position is lower than the coin block's 'y' position.
Coins are instantiated through the use of a coin prefab and as a rigidbody. Force is added on the coin in the 'y' axis and destroyed over time.
An automatic control of movement is implemented as soon as the character comes into contact with the flagpole.
- The controls are disabled with the use of a boolean
- Linear interpolation is utilized to tranform the character's position to the base of the flagpole.
- Followed by changing the character's velocity toward the castle's entrance.