I invested a little time knocking up a (very crude) level editor. I wasn’t going to share it since it is so crude. But I’m a sucker for criticism ;)
You can find it here: www.wilfscorner.co.uk/gedit/
With this code I’ve ditched the idea of having a separate collision mask. For now.
Using my own example of a 16×16 tree casting a shadow across a 32×32 tile graphic and the player sprite therefore potentially colliding with the shadow when the tree is the only physical obstruction – I have opted to either draw the graphics as 4 separate tiles or simply ditch the support for such an elaborate feature.
If you highlight one of my simple tiles and click “set as floor” you can quickly get a feel for how you level will look.
Then click to select a tile to paint with, ensure that the mode is set as Brush and click away. I don’t currently support dragging the mouse around the level with the button down.
For each tile you can set two parameters just now. CanPass and Damage.
Finally when you’ve finished click the “generate level data” button to output the JSON structure to the textarea bottom right.
There are no game entities just now just obstructions. That comes next.
Interested in feedback and suggestions.