Objective: Use Cinemachine to follow the player through the dungeon.

Open the package manager from Unity window menu and search for Cinemachine. Install the latest version of Cinemachine, which will add a new menu in Unity.

Use this menu to add a new virtual camera called CM_Follow_Cam as a child of Player, see below.


Objective: Add a sword attack on mouse left click with animation.

Sword attack with animation.

Select the animation window then select the Sprite under Player.


Objective: Add idle, run and jump sprite animations to 2D game.

Animated player movement.

Our player is organized into the Player game object and a child object called, Sprite. Select the Sprite and create an animation named Idle, placing it in the animations folder within the Sprites folder. With the Sprite child selected…


Objective: Create a player for 2D Unity game that can move and jump.

Player movement showing box collider as green frame and raycast in yellow.

Before adding the player make sure the ground tilemap or Floor has a rigidbody 2D with body type static and box collider with used by composite checked. Make sure the floor layer is set to Ground.


Objective: Create an animated tile in Unity 2D

Animated waterfalls using animated tile.

Animated tiles require 2D Tilemap Extras, which requires Enabled Preview Packages to be checked within Project Settings for Package Manager, see below.


Objective: Create a small 2D tilemap in Unity.

For layer tilemap for 2D game.

In a 2D Unity 2020.3.20f1 project, right click in hierarchy and choose 2D object > tilemap > rectangular to create a Grid. Open Grid and rename the child tilemap to Ground_Tilemap, set the order in layer to 2. Create three more tilemaps…


Objective: Create a vegetation tile pallet in Unity 2D

For this article create a Unity 2020.3.20f1 2D project. Import the 2D Mobile Adventure assets from GameDevHQ Filebase. Create a Sprites folder in the project Assets folder. To the Sprites folder create a Tilemap folder and two new subfolders, Palettes and…


Objective: Player completes level by finding container and can restart game.

The player completes the level by finding the container. Add a box collider with is trigger checked to the Scifi_Container and edit the collider so that it extends into the players plane of motion, see below.


Objective: Create Game Over UI allowing restart, when the player dies.

Game Over user interface (UI) with restart button.

The player dies when they fall off the platform, but not when jumping. The difference is the velocity of impact. The code below in the Player script occurs only if the the player is grounded, as detected using Physic.Raycast


Objective: Create a title screen, allowing the player to start or restart.

Title menu with start button to begin game.

Add a UI > Text object to the Canvas called Title_text, and add a title for the game increasing the font size and changing the color, see below.

Hal Brooks

Software engineer

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