Skip to content

[Unity] Super Mario Bros, with trickier enemies. Project used to learn Unity.

Notifications You must be signed in to change notification settings

kzryzstof/super-mario

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The repository contains a version of Super Mario made in Unity.

The goal of this repository is for me to learn Unity while tweaking the first video game I ever played.

A lot of the algorithms are coming from the following tutorials:

Sebastian Lague's Creating a 2D platformer series (EN)

TUTO UNITY FR's Créer un jeu en 2D facilement avec Unity series (FR)

Player

Jump

I used Sebastian's raycast approach to detect obstacles.

Cooldown

When jumping, I realized there was a problem if Mario was hitting walls. Mario would get extra jump mid-air.

I have implemented a basic cooldown system. As soon as the player jumps and gets off the ground, the JumpCooldown class activates the cooldown. As soon as the player 'hits' ground, it counts the number of frames during which the player is not allowed to jump.

Jump cooldown

Enemies

I was curious to know how the game would feel if the enemies were a bit more smarter and actually would try to get you.

Goombas

Death

Goombas can be killed if the player touches them from above.

Goombas death

Strategies

Goombas have different strategies to attack the player.

By default, they will not move until the player reaches a certain distance. And when the player gets too close, Goombas will pursue the player until the enemy catches the player or the player is too far away.

To throw the player off a bit, Goombas can do jump scares if the player is really close.

Goombas basic attack

Goombas have the ability to jump over an obstacle if it prevents them from pursuing the player.

Goombas avoids obstacle

Platforms

Moving platform

About

[Unity] Super Mario Bros, with trickier enemies. Project used to learn Unity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published