2.5D Platformer — Collectables and Lives #4

Don’t die while collecting coins throughout your journey!

It’s quite typical (and basic) to see lives and some sort of collectables in platformers. Classic, if I do say so myself. And even now, beginners start by implementing these mechanics into their learning projects.

This is a requirement for my project, and given my experience, this took mere minutes to set up.

Collectables / Coins

Collectables are just small (or big) items with no collision. However, they use Trigger colliders to allow a character to pick them up without being stopped as a physical force. Once the collectable is picked up, in my project, it will increase the number of picked up collectables or coins, and then, it will destroy itself.

Lives

You only live once, or cheat death with multiple lives. As a basic platformer, the player will have 3 chances to not screw up.

So, what exactly will kill the player? For now, some OOB (Out-of-Bounds) triggers. If the player misses a jump and falls to the void, it will make contact with those triggers, remove 1 live, and respawn the player at a checkpoint.

And how does the Checkpoints work? Exactly like the Death Trigger, but this time, it sets in the controller the last checkpoint reached.

Result

This is just basic Platformer stuff 101. Anyone can easily do this.

--

--

--

Junior Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

PlayStation will invest aggressively in new studios and will take your licenses to PC and mobile…

Failed to Query for Tournament Rules Fortnite

Failed to Query for Tournament Rules Fortnite

Blog: Play, Games, and the Magic Circle

Concept of the game

Esports Industry: Opportunities, Challenges, and Growth Drivers

The first Spellfire NFT cards are already at OpenSea!

Games That Are The Must For Your Cybercafe

The Ultimate Ticket To Ride Strategy Guide — Top Tips To Win More

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pablo Gómez Platón

Pablo Gómez Platón

Junior Unity Developer

More from Medium

Adding a wave system to our prototype

Working with Unity’s 2D Tilemaps

2D Mobile: Setting Up The Player

My journey becoming a Unity game developer: Main Menu: Loading Screen with a Loading Bar