Box Smasher logo

Making Levels

Currently there is no built-in level editor, making the process of creating levels a bit complicated as you will need to create and edit the level in a text editor. However there are some hidden debug features that make the process a bit smoother.

Level format

Currently levels are stored as Lua files in the levels/ folder in the source tree.

For coordinates, point represent the topleft corner unless otherwise is stated.

Setting up the game for level editing

There are some hidden debug keybinds that are useful for level editing. To enable debug features in the game, see the Debug page.

In addition to this there is also F3+R which restarts a level instantly. On each level restart, the game will reload the level from file, allowing you to hot-reload the current level you are editing without restarting the game. There is now also the F3+T keybind which will automatically restart a level in one second intervals. Make sure that your text editor does not have autosave enabled, as malformed Lua code in a level file will crash the game.

ozxa units

You’re likely going to see existing levels measuring things in multiples of 40. This has been coined the ozxa unit, named after the game’s author, and is useful for layouting and designing levels according to a grid.

One ozxa unit is 40 unscaled pixels, and the internal resolution of 1280x720 fits 32x18 ozxa units. This is what the debug grid uses, and the coordinate visualiser will tell you what the currently highlighted cell is in ozxa units.