Skip to content

HeyaIe/SMB_Clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMB_Clone

A Unity project meant to replicate Super Mario Bros. World 1-1 (Unity 2020.3.2f1)

Project Overview

This project was meant to be a learning experience for the Unity game engine. It involves Agile methodology and team collaboration.

My Role

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.

What I Learned

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).

Index

Scene Transitions

Scene transitions are switched by using a SceneLoader prefab. It switches with a fade-in/out animation as scenes are opened/closed.

Movement

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.

Timer & Score

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.

Coinblocks

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.

Automatic Movement

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.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published