The 2nd tutorial in Unity is the 2D platformer. It is also made for beginners and starts with a ready-made micro game.
The 2D platformer

The 2D platformer starts off like the kart racer. First, the speed of the character is set using Max Speed. Then it's a matter of changing the character's color. Then an enemy prefab is inserted from the project window into the hierarchy window. The inserted enemy is moved, rotated and scaled. In the 2D platformer, the Assets about tiles.
The color mod
The color mod from the 2D platformer, like the kart racer, deals with the coloring and materials in the game.
You can change the sprites by choosing one of the tiles, clicking on the circle on the right in the inspector window and choosing a different tree, for example.
![]()
The trail mod
The trail mod gives the character a tail while jumping. The player is selected in the hierarchy window. In the project window you search under Assets–> UTech–> Mod-Assets–> Platformer–> Trail Prefabs–> SubtleTrail
You drag this onto the player in the hierarchy window.

Color the game world
In the hierarchy window you select the MainCamera. In the Inspector window you choose the background color and color it Background .

With the sky colored it looks like this:

Additional fields can be colored under Grid in the hierarchy window:

Colored level:

Build in animations
For animations you need the project window and look for the environment and the sprites from the assets:
![]()
The animations work like the Kart Racher. You select the object, select Add Component in the Inspector and look for "Jiggler", for example.
You add more objects by doubling them. The keyboard shortcut for this is CTRL + D. In the Inspector window you can make further settings for the animations, such as B. the strength with which something bounces or wobbles.
Custom triggers
You select GameObject–> 2D Object -> Sprite in the menu
This will be the trigger. In the Inspector window you search Sprite renderer and click on the circle next to None (Sprite). Then you're looking for TileGround.

Use the move arrows to position it. Rename it to "ConfettiTrigger".
In the Inspector window, select “Add Component” and search for Box Collider 2D to add it. Check the “Is Trigger” option. Then add the Simple Trigger via Add Component. Add the ConfettiTrigger.
Then drag the player from the hierarchy window to the TriggerBody field in the simple trigger script.

In the project window you can find under Assets–> UTech–> MG-Platformer–> ModAssets–> Platformer–> Particle Prefabs–> Confetti Celebration
Drag the Confetti Celebration from the project window onto the Confetti Trigger in the hierarchy window.

In the ConfettiTrigger under the Simple Trigger component, look for On Trigger Enter () and click on the plus sign in the lower right corner.

From the hierarchy window drag the ConfettiCelebration to None (Object).
No Function appears in the drop-down menu. There you select ParticleSystem–> Play.
Then the ConfettiTrigger has to be hidden. Therefore remove the tick in "Sprite Renderer". Click play and watch your confetti party.

Design the game world
Select Window–> 2D–> Tile Palette from the main menu

This looks like this:

You can scroll in and out with the mouse wheel. If you hold down Alt and press the left mouse button, you can move everything as required. For example, look for the sprite with the clouds.

When you have selected an element in the tilemap, you look for a corresponding point in the scene and place the element there. For example, you can create platforms and design the game world. To delete elements, use the eraser and find the element you want to delete in the scene. Only the things that are selected in the tilemap are added or deleted.

Add effects
Find the player in the hierarchy window. Then choose under ModAssets–> Platformer–> Bounce Effect Prefabs, select one and drag it onto the player.
Speed and speed pads
As in the kart tutorial, speed and speed pads are built in to accelerate or jump the character. They are simply dragged from the project window into the scene. Bounce pads allow you to jump up like a trampoline. Speedpas increase the running speed of the character. You define the corresponding parameters again in the Inspector window.

Decorate the world
Decorating the world works like a kart racer. You look for your decoration and place it in the scene.
The Billboard Mod
You can also include your own photos. You look for the Billboard Prefab from the project window and drag it into the scene. After you have imported your photo as a new asset of your choice, drag it from the project window into the "Sprite" area in the inspector window on the billboard.
Naming the game
You name the game by looking for UI Canvas in the hierarchy window, expanding the folder and entering your desired title in Main under Text. You set the font under Font Asset.
Here's the little one Bottom line with mods
(Advertising)
Originally posted on 2019-11-04 12:06:00.
