-
-
Notifications
You must be signed in to change notification settings - Fork 304
Creating a new stage (v1.7)
Written by @Joris
You can start creating a new stage in two different ways: either creating a completely new stage using the Level Template, or by copying and modifying an existing stage.
All level scenes are In Unity, to edit or make a new level, go to Assets/Scenes/Level
and open the level you want, or make a new level (you can just copy a level as a base).
The LevelTemplate is a template scene containing an MvL stage with a basic layout, which can be a good starting point for custom stages. To create a new stage based on the template, click File > New Scene and select the LevelTemplate scene in the dialog box that appears.
The available set of tiles can be found in Window > 2D > Tile Palette. There are two small dropdowns where you can then select a tile palette and the tilemap to modify. The "Grid" GameObject typically has two available tilemaps: Tilemap-Ground
and Tilemap-Semisolid
. Select your tileset, use the brush and tile away!
To edit a stage's length, select the "GameManager in the Hierarchy tab (left side), then look for "Level Width Tile" in the Inspector tab (right side) and adjust it to whatever you want. Stages should always be an even number of tiles wide, making the stage an odd width causes camera issues.
Make sure that the "Level Height Tile" is high enough for gameplay elements such as bricks to work properly. Typically, you want the level height to cover all interactable / breakable tiles, to ensure that the stage will properly be reset. The level boundaries are represented by a gray box that appears in the Scene view.
You can also disable the looping mechanic from the same GameManager object through the "Looping Level" checkbox.
To allow the camera to scroll upwards, increase the "Camera Height Y" variable in the GameManager. There are similar camera variables for the minimum and maximum horizontal scroll positions, typically used for stages that do not loop (such as Pipes from the original game).
Changing the player's spawnpoint simply has you edit the XYZ values of the "Spawnpoint" variable in the GameManager.
You can disable the Mega Mushroom and Propeller Mushroom using the "Spawn Big Powerups" and "Spawn Vertical Powerups" checkboxes.
- Checking Spawn Big Powerups will allow Mega Mushrooms to spawn. It should be disabled on maps with as few as one areas where a player with a Mega Mushroom can get stuck. It is enabled on most vanilla stages, excluding Fortress, Pipes, Jungle, and Volcano.
- Checking Spawn Vertical Powerups will allow Propeller Mushrooms to spawn. It should be disabled on maps with no areas where a Propeller Mushroom would be useful, usually because of low ceilings. It is enabled on every vanilla stage besides Fortress.
I recommend not touching anything else, unless you know what you’re doing.
Once you are done with your stage, keep the stage open and click on the top File > Build Settings and then click "Add Open Scenes". You can now close the tab.
You now need to add the stage into the "level dropdown" list in the Assets/Scenes/MainMenu
scene's “MainMenuManager”. Scroll down on the Inspector tab to the "Maps" dropdown list, press on the [+] at the bottom, and name the latest element added (your level, name it however you want).
Once you added the stage to the dropdown, there will be a new spot for a "camera positioner" object. This is for the stage preview that appears when selecting a stage, this feature is handled through a physical small recreation of the stage in the MainMenu scene. Create that small recreation (usually through using the Tile Picker's eyedropper tool to select and copy a large area of tiles at once), and add a new empty GameObject to the scene. Position this empty GameObject at where you want the camera to be for this stage's preview, and set that as the "camera positioner" object in the map dropdown.
A video tutorial for adding a stage preview available here, made by @miyavmeow.