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

This game tutorial series will teach you how to create a 2D roguelike game with procedurally created tile based levels. The player will control a scavenger running through ruins and searching for food – each move costs food and causes enemies to also move.

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/Scenes/.
    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.

Game Settings

First, we’ll add some global variables – you can learn more about variables in this how-to. Navigate to Game > Game Settings and change the following settings.

Initial Variables

Click on Add Variable to add a new variable. The variable will be initialized to a defined value when the game is started.

The first variable will hold the game’s current level.

  • Variable Key
    Set to level.
  • Type
    Select Int.
  • Operator
    Select Set.
  • Float Value
    Set to 1 (Value).

Click on Add Variable again to add another variable. This variable will store the food of the player.

  • Variable Key
    Set to food.
  • Type
    Select Int.
  • Operator
    Select Set.
  • Float Value
    Set to 100 (Value).

Click on Add Variable again to add another variable. This variable defines how much damage the player does to a wall to chop through it.

  • Variable Key
    Set to wallDamage.
  • Type
    Select Int.
  • Operator
    Select Set.
  • Float Value
    Set to 1 (Value).

That’s it for the game settings.

Music

Next, we’ll set up the background music. Navigate to Game > Music and change the following settings of the Default Music.

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

That’s it for the music.

Menu Settings

Navigate to Menus > Menu Settings and change the following settings.

  • Default Screen Size
    Set to X=900, Y=900.
  • GUI Scale Mode
    Select Scale To Fit.
  • GUI Anchor
    Select Middle Center.

GUI Layers

GUI layers are used to manage displaying GUI boxes (displaying UI content) above each other. We’ll use it to let a GUI box display a dialogue above the screen fader.

Navigate to Menus > GUI Layers and change the following settings.

0: Default Layer

Select the default layer and change the following setting.

  • Screen Fader
    Enable this setting.
    The screen fader will be displayed after this GUI layer.

1: Above Screen Fader

Add a new GUI layer and change the following settings.

  • Name
    Set to Above Screen Fader.

GUI Boxes

Next, we’ll set up 2 GUI boxes – one for a HUD, one for a dialogue displaying the current day and game over message.

0: HUD

Change the following settings of the already added GUI box.

  • Name
    Set to HUD.
  • GUI Layer
    Select Default Layer.
  • Height Adjustment
    Select Auto.

The GUI box should be displayed at the lower center of the screen – this is done in the Content Box Settings.

  • Bounds (Content Box)
    Set to X=450, Y=900, W=300, H=200.
  • Anchor
    Select Lower Center.
  • Show Box
    Disable this setting.
  • Font
    Select PressStar2P-Regular.
    This font can be found in Assets/Tutorial Resources/Fonts/.
  • Font Size
    Set to 20.
  • Text Alignment
    Select Center.

1: Message

Copy the previous GUI box and change the following settings.

  • Name
    Set to Message.
  • GUI Layer
    Select Above Screen Fader.

The GUI box should be displayed in the center of the screen – this is done in the Content Box Settings.

  • Bounds (Content Box)
    Set to X=450, Y=450, W=900, H=200.
  • Anchor
    Select Middle Center.
  • Font Size
    Set to 40.

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 Main scene (found at Assets/Tutorial Resources/Scenes/).

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=-3, 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=-4, 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 generating the level.