Unity Editor Tools – Maze Generation

Intro

For our first title Sky Labyrinth, way back in August 2015 we planned for a minimum of 30 mazes (aka levels) for initial release. We’re sticking to that number (technically surpassing, if you count the 7 tutorial mazes). In order to significantly cut down on time spent manually designing levels and placing objects, we created a series of editor tools to help us out.

MazeGen

We gotta start somewhere, right? Let’s start by creating a new maze!

Our MazeGen tool has parameters to modify:

  • X / Y size independently
  • Difficulty scale
  • “Goal” object placement and size
  • Number of powerups

We can randomize where the pickups are placed, and toggle the “lethality” of the entire maze on/off (for the tutorial levels, and also debugging/playtesting purposes). Re-running the “Generate Maze” will create an pseduo-random new maze, if the first run produced a layout the designer didn’t like.

Editing Mazes – Level Design

Once the designer has a maze layout they like, they’ll probably wanna tweak some things (that’s what designers always want to do right? Tweak, tweak, tweak!)

Tile Editor – used for creating/destroying maze paths, or setting trampolines or goals

 

Subtile Editor – used for instantiating/rotating pickups, powerups, enemies

 

Wall Editor – used to place WallSaws and break wall sections

 

Pillar Editor – used to cycle pillar graphics (will be a LOT more useful w/new WIP art style)

 

Maze Accents – Accents a maze’s borders with cool things

Planned Features

Prop Editor – Simple tool to pseudo-randomly place props around the mazes (similar to AccentEditor) and cycle their graphics individually (similar to PillarEditor)

Smart Maze Placement – Instead of having to position by hand, generating a new maze auto-places it below the previously last maze. Designers will still adjust by hand, since we like having certain mazes further apart from each other to give more fall time.

GetChild() MazeGen optimization – A lot of MazeGen’s methods currently use FindChild() to traverse the hierarchy and instantiate various maze parts, which can become a very expensive operation since it searches an entire hierarchy root’s tree. We initially used FindChild() because the order and hierarchy of our maze wasn’t finalized, due to constantly changing needs and design iterations. Now that it’s pretty set it stone we can use GetChild() and hierarchy indices – I’m hoping we’ll see at least a 1-2 second faster maze generation time for a 10×10 maze with this.

Credits

Primary development of these editor tools was done by our programmer Tyler Hiemke; unfortunately as of October, Tyler was unable to continue working on SkyLab due to conflicts with his professional life. Up until October Deniz had done some bug fixing, ported 2 of the scripts to runtime versions (WallEditor for 2 new powerups, parts of MazeGen for object pooling), and is now continuing development of the tool set. Big shout out to Tyler, SkyLab would not be where it is today (and where it will be soon!) without his contributions.

Thanks for reading!

3 thoughts on “Unity Editor Tools – Maze Generation

  1. I am really loving the theme/design of your weblog.
    Do you ever run into any web browser compatibility issues?
    A few of my blog readers have complained about my website not operating correctly in Explorer but looks great in Safari.
    Do you have any tips to help fix this issue?

    1. Thank you! We appreciate your kind words. Ours looks pretty consistent across all desktop browsers, might get a bit hairy on mobile though.

      Tip: keep it as simple as possible, the more frills there are the more likely it is to look funny on certain browsers or devices.

Leave a Reply

Your email address will not be published. Required fields are marked *