Level editor progress update


Hey everyone! I've made significant progress on the BrickBreaker Level Editor I've been working on, and I wanted to share how things are coming along.

The Current Structure

The Level Editor now has most of its core functionality in place! It's built using Unity's UI Toolkit, which has been excellent for creating a responsive and clean interface. Here's what I've implemented so far:

Level management tools:

The editor lets you organize the levels of the game. 

It is possible to create new levels, or delete unwanted ones or edit the existing ones. The levels once created are saved as scriptable objects.

When deleted, they are physically removed from the project.

A level contains a list of cells, where a Cell is a placeholder for that rectangular object we see as a brick, containing information about the type of brick (colour, number of hits, etc.)  allocated in it and optionally a power-up.

Brick type toolbar

The editor offers a toolbar where it is possible to select the type of brick to add in a certain location of the grid.

The brick types listed in the toolbar are dynamically read from the project. This way, if I wanted to add a new brick type in the future, the editor would immediately see the new arrival and make it available.

Power-Up Toolbar

The editor offers a toolbar where it is possible to select the power-up to assign to any cell in the level.

The Power-Ups too are dynamically read from the project and immediately updated if a new power-up is created.

Level Layout Grid

It is a grid (by default 14x14) but it will be capable of allocating also different sizes (I haven't tested that yet).

On each cell of this grid we can add a brick and a power-up just with a few clicks of the mouse.

Level editor for the game BrickBreaker, written with Unity UIToolkit.

Level editor for the game BrickBreaker, written with Unity UIToolkit.

Editing the grid is very simple. Just select either the brick type or the power-up and click on the grid. The cell will be highlighted with the selected colour and/or the power-up icon will appear. Or, if you want to clear a cell, just click on the Unset buttons and click on the cell to clear.

There are a lot of improvements that could be made on the editor, but I think it works well for my purpose, at the moment. If needed I will improve it.

If you are interested in the source code, you can find it on my github repository

Next steps

Now, with this editor, creating levels for the game will be very quick and easy, so I can jump into creating the levels in-game, and all the rest.
First thing will be reading the information stored in the level instance of scriptable object and transform it into a real playable level.

Stay tuned.

Leave a comment

Log in with itch.io to leave a comment.