-
Notifications
You must be signed in to change notification settings - Fork 17
3. Creating your first level
Do open any of the levels in the framework so see how they are composed, I highly suggest to keep the prebuilt levels to use them as reference.


Open up the room and then open the inspector tab next to the resource tree and you should see this

Here you can set up the name of the room, the width/height of it. Do not touch the views as the game creates them automatically when the room loads.

This layer must remain locked as it is used to place gameplay related objects such as the HUD and Transition objects.
This is the layer you have to use to place objects, the level control object must be placed in this layer.
This layers is where you have to place up the tiles your level will use, there's 4 different layers to use which I'll explain now:
- Tileset
- Tileset_Decor
- Tileset_Platform_Foreground
- Tileset_Platform_Background
Tileset is used for the floor, walls and ceilings. If you want to add semisolid platforms, do make use of Tileset_Platform_Background and add the finishing touches on the Tileset_Platform_Foreground layer.
Tileset_Decor is used for the decorations. Such as bushes, hills, etc.
Backgrounds go in this layer, they are composed like this on the sprite editor

If you want a specific layer to scroll, in the creation code of obj_levelcontrol add the following code:
bg_scroll[<frame>] = <speed>;
If you want the background to be animated, open the variables of obj_levelcontrol in the room editor and set bg_is_animated to true. Make sure the background has multiple similar frames if you decide to use this option.
Two extra layers can be applied to the room, refer to the info found in the following objects to see how to set them up:
- obj_tilelayermanager
- obj_tilelayermanager_front
IMPORTANT: Layers must be at depth -6 and -7 respectively
If your level has one or more sections, you must make use of the objects inside the Warps object.
Here's a brief explanation of how warps work:

First, place up a warp object on the pipe as shown in the image above. Once you set it up, double-click it to edit and then click on Variables.
Once you have the Variables window open, set up the destination room, exit direction (0, 90, 180 or 270) and warp ID.
And last, in the destination room do the following:

Place a warp node, double-click it to edit and then click on Variables. Do set up the ID you set on the entrance in the myid variable to make Mario appear on the node with the same ID when the room starts.
Make sure to not use the same ID in the same room.
If you set mini to true in the warp object, said pipe can be used only when having the mini mushroom powerup.
If you want screen scrolling pipes, set up room in the destination variable (This method works too with doors).
This system also works for other type of warps (such as doors or beanstalks).
Setting branch warps are similar to normal warps, these will check for a condition before warping the player to another destination.
This is where the mode variable enters. The mode will check for 3 things: Coins, Time Left or A-Coins.

The coins variable must not be modified as it'll be updated for every coin you collect on the room.
The mode variable must be altered to check for Coins, Time Left or A-Coins. (0 is Coins, 1 is Time Left and 2 is A-Coins)
Modify the target variables and the destination variables to set up the different room destinations and the object will act as a normal pipe.
Setting music on GME9 is really easy, all you need is to place up a .ogg file inside the datafiles folder.
First, find and open the datafiles folder and you will find a folder and a .ini file inside

Second, open the 'music' folder and paste there the .ogg file you want to use

Then go back to the previous folder and open up the .ini file and you will see this

For example, if your music is named lava.ogg do a section as is inside the .ini file
[Lava] song_name = "music/lava.ogg" loop_s = 0 loop_e = 10.00
loop_s and loop_e are used to set the loop points of the music, keep in mind you have to use the seconds/hundredths format for it.
Once you are done setting up the music, go into the obj_levelcontrol object, open up the 'Variables' and click the cogwheel next to inisection

You will see this window pop up at the right

Click 'Add', write a new option between "" called Lava and then you should be able to use the music you just added.