A quick overview over the project and setting up the basics of the 2D platformer game.

This game tutorial series will teach you how to create a 2D platformer game with randomly spawning enemies and items you can pick up. The player has to fight an alien invasion in london, running around and jumping while firing rockets and laying bombs (once picked up).

In this tutorial we’ll take a quick look at the project and set up some basics in the Makinom editor.

The Unity Project

By now you should’ve downloaded the project, unzipped it and opened it as a Unity project (i.e. don’t import it). You can open the project using the Unity menu: File > Open Project…

The project contains the following folders:

  • Finished
    The finished game, containing the complete Makinom project and all schematics, prefabs and the level.
  • Gizmos
    The Makinom gizmo icons.
  • Makinom
    The free version of Makinom.
    You can import the full version to replace it.
  • Tutorial Resources
    The resources the tutorial will be using, i.e. the ready to use level and prefabs that haven’t yet been set up for Makinom.
    The level is located in Assets/Tutorial Resources/.
    The prefabs are located in Assets/Tutorial Resources/Prefabs/.

Setting up Makinom

We’ll now set up some basics in the Makinom project. Open the Makinom editor (Window > Makinom) – this will create a new Makinom project at Assets/Makinom/Project.asset, in case no project has been created or opened yet.

Check if you’re working on a new project (i.e. not using the Finished Project) in Editor > About in the Project Summary. The Currently Loaded project should be Assets/Makinom/Project.asset, if not, please click on Create New Project and save it at this location.

Input Keys

First, we’ll set up the input keys to control the game. Navigate to Base/Control > Input Keys. The default controls are already set up for us, but we’ll need another input key for pausing the game, jumping, firing rockets and laying bombs.

5: Pause

  • Name
    Set to Pause.
  • Input Origin
    Select Key Code.
  • Positive Key
    Select P.

6: Jump

  • Name
    Set to Jump.
  • Input Origin
    Select Key Code.
  • Positive Key
    Select Space.

7: Fire

  • Name
    Set to Fire.
  • Input Origin
    Select Key Code.
  • Positive Key
    Select Left CTRL.

8: Bomb

  • Name
    Set to Bomb.
  • Input Origin
    Select Key Code.
  • Positive Key
    Select Left ALT.

That’s it for the input keys.

Game Controls

Now we’ll set up pausing the game. Navigate to Base/Controls > Game Controls and change the following settings.

Base Key Settings

  • Pause Key
    Select Pause.
  • Pause Time
    Enable this setting.
    This will pause the game time.
  • Freeze Pause
    Enable this setting.
    This will set Unity’s time scale to 0, stopping everything in the game (e.g. animations).

Music

Navigate to Game > Music and change the following settings of the Default Music.

  • Name
    Set to BGM.
  • Audio Clip
    Select MainTheme.
    The clip is located in Assets/Tutorial Resources/Audio/Music/.
  • Loop Clip
    Enable this setting.

GUI Boxes

We’ll use the GUI boxes later when we set up the HUDs. Navigate to Menus > GUI Boxes and change the following settings.

0: Health HUD

The Health HUD GUI box will be used to display the Health HUD later – it’ll be displayed at the player’s game object in the scene.

  • Name
    Set to Health HUD.
  • Height Adjustment
    Select Auto.

In the Content Box Settings we’ll define the bounds of the GUI box – the health HUD will be displayed at the player’s position, i.e. we’ll only really need the width and height.

  • Bounds
    Set to X=100, Y=100, W=100, H=200.
  • Anchor
    Select Middle Center.
  • Show Box
    Disable this setting.

1: Score HUD

The Score HUD GUI box will later be used to display the Score HUD in the upper center of the screen.

  • Name
    Set to Score HUD.
  • Height Adjustment
    Select Auto.

In the Content Box Settings we’ll define the bounds of the GUI box.

  • Bounds
    Set to X=640, Y=0, W=1280, H=200.
  • Anchor
    Select Upper Center.
  • Show Box
    Disable this setting.
  • Font
    Select BradBunR.
    This font can be found at Assets/Tutorial Resources/Fonts/.
  • Font Size
    Set to 80.

2: Bomb HUD

The Bomb HUD GUI box will be used to display the Bomb HUD later – it’ll be displayed in the lower left corner of the screen.

  • Name
    Set to Bomb HUD.
  • Height Adjustment
    Select Auto.

In the Content Box Settings we’ll define the bounds of the GUI box.

  • Bounds
    Set to X=0, Y=720, W=300, H=200.
  • Anchor
    Select Lower Left.
  • Show Box
    Disable this setting.

And that’s it – click on Save Settings to save the changes.

Scene Setup

Finally, we’ll add Makinom and the background music to the scene. Open the Level scene (found at Assets/Tutorial Resources/).

Adding a Game Starter

To add Makinom to the game, we’ll need a game starter. You can learn more about game starters in this how-to.

Add the game starter using the scene wizard (Windows > Scene Wizard). Click on Add Game Starter, select the Makinom project if it’s not already selected (found at Assets/Makinom/Project.asset) and click on Add Game Starter again. The scene wizard will create a new game object and attach the game starter to it.

Move the new game starter object out of the way, e.g. to X=20, Y=0, Z=0.

Adding the Music

Again, we’ll use the scene wizard to add the background music: Create Object > Music Player

Move the new music player object out of the way (e.g. X=22, Y=0, Z=0) and change the following settings in the inspector of the Music Player component.

  • Play Type
    Select Play.
  • Music
    Select BGM.

And that’s it for now – save the scene.

The next tutorial will handle the player’s movement controls.