Slow Rush Studios logo,
    depicting an apprehensive-looking snail rushing forward

Slow Rush Studios

◂  Touching Screens
News index

A Custom Level Editor

Contents

If you want a tile-based level-editor, there are at least three good options to choose from.

But if you're making a custom falling sand engine and want to edit pixel-by-pixel? Nothing! So I made my own.

(also... pssst... something's coming next week!)

Big Announcement Next Week!!

I can't tell you what it is here but I hope you're gonna be just as excited as I am now.

Follow on Twitter 'X', on Blue Sky or Discord join the Discord if you want to be the first to know.

Blocky Tile Levels

A long time ago, I integrated the LDTK level editor:

Editing with LDTK: placing 8-by-8 pixel 'tiles' of different types of atoms (smoke and stone pictured) in order to make a level.
The other markings (circles, red squares, etc) are where enemies, barrels, ladders, etc will appear in-game.

I thought that'd be great, because it's sorta what Broforce does...

But who would have thought: context matters! Broforce's destruction happens tile-by-tile.

My game operates at the pixel level. And having such blocky levels looked amateurish. How could I fix that?

Image-based Level

Well, how do you make a per-pixel level editor? Turns out, I already had one:

Editing with MS Paint, the original level editor: just draw an image, and have the game load the image and make each pixel turn into a specific atom.
Here every grey pixel is stone and black pixels are empty air.

Except! Ha! That would have been sensible - I didn't do that. 1

Instead I made a falling sand level-editor extension for Aseprite:

Editing with Aseprite: you can pick the color to draw by clicking the name of the atom using the palette on the right.

I made that shebang work, and then...

I realized I didn't have a way to place enemies or hazards or anything other than terrain, liquids or gas.

In-game Level Editing

That was all the excuse I needed to go whole-hog on making my own level editor in-game. 2

Editing using my new in-game level editor: a super basic image editor with straight line drawing, flood fill, undo/redo, etc...
Except, it also allows placing and moving entities like enemy spawns and barrels.

Under the hood, the editor creates the same image files as I had before, but also saves the entity (enemies, barrels, etc) data in a separate text file.

One unusual choice I intentionally made is to have the level editor render "over the top" of the running level to make it easy to find & fix issues:

I can reload the level with the level editor open, fix that the poison leaking from the top right, and reload the level to confirm the fix.
And then exit level-editing mode just in time to shoot that pesky goblin enemy in the face!

Right now the editor is still fairly basic: it more or less is "LDTK but pixel-based". 3

Longer term I would like to allow players to create & share their own levels too - but that also depends on...

Handmade vs Generated Levels

A few of you have asked whether the game will have "procedurally generated" levels.

And honestly, I would love to dive down that rabbit hole. It's just not the most pressing issue to tackle right now.

But even when (or if) I implement that, there will still be some hand-crafted (bits of) levels anyway, so this tech should be useful regardless. 4

Anyway, see you next week for that exciting announcement!

Level Editor web build‎

Oh shoot, almost forgot. You can play with the level editor yourself here. I haven't made it super user-friendly yet, but here's the gist of it:

And sorry, despite last week's update on rudimentary mobile support, I must warn you that if you try to use this on a touchscreen-only device then you're on a one-way trip to struggletown.

But! All the existing levels have been painstakingly converted to not be blocky, so if you are on a mobile device then you can try playing these wonderfully curvy levels.

Press F1 for help, including to see keyboard/mouse controls. By playing you agree to our Privacy Policy and Terms of Service.

1

I mean, I make no secret of using Linux for development rather than Windows so I'm sure some of you saw that coming.

(Yep, I booted up a Windows PC just to make that MS Paint recording for you. Because I love you all, that's why. No, no, don't get all sappy about it now - save that for next week!)

2

I did briefly consider having a way to draw specific colored pixels on a separate image (or another layer) to place entities, but figured that would just get annoying.

Plus, there's no way to make entities bigger or smaller if they're single pixels, and drawing boxes for resizable entities sounded like it was getting crazy; meanwhile this custom level editor lets me place resizable ladders easily!

4

Although... my track record for figuring out when work is going to be "useful in future" is pretty frickin terrible, so maybe I'll regret writing that in 6 months time.

3

I mean, it does actually have some more features I haven't shown - for example, I can override colors of specific atoms using it as well.

Maybe you'll see some of that in action next week? #teaser #pro-marketer-right-here

◂  Touching Screens
News index