Slime's Light Level Editor


During the 1 bit Game Jam, I was hoping I could get away with just the Pico-8 map editor, but realized that I would need to store more information of each object than just their position.

Each "Actor" type has their own initializing function that would return a table with the required values/functions.  If no parameters were given, a 2d table was instead given, containing information about what keys the actor has whose values would need to be saved.  The saved values could then be sent to the initializer function to recreate the actor.

The main tool is used for moving around actors and editing their properties.

I added another tool for connecting logical components together.  Each actor that outputs a signal has a name and any actor that receives a signal will store a table of the connected actors' names. When a level loads, a new table is created holding references to all the connected actors.  I added some actors that are specifically for handling and/or/not logic, but I didn't use them as often.


There's also an actor that sets a table entry to true, which can be read from another actor to be sent as a signal. Plus, a trigger that sends a signal if the player intersects with it's rectangle.  I added wires as a cosmetic actor, just to help communicate what light sensors are connected to. The "keys" just teleport the player to a predetermined position when they intersect it. And of course the sleeping slime is just for the ending.


I also had a method of testing out levels without going through from the beginning, though for the jam, I was using a global variable to load the last edited level from the editor. For this version, I added the ability to load the player at the cursor position while the game is running.


I still used the Pico8 map editor to build the base of the levels. Though I added auto-tiling to make it faster to build walls.


Also a quick look at how the look of the game was achieved. I first rendered all of the light for the scene, then rendered the map, and then all of the actor sprites on top, sorting them so actors can appear behind or in front of each other. For each of the sprites, I left transparent pixels inside some of the sprites to let that pixel's light value show through, as if lighting the sprite. Then forced light values for specific pixels. Some sprites like grass and flowers have both a dark and light version on the same sprite, so they show up in either lighting condition.

Thanks For reading.  I've added a modified uncompressed version of the p8.png file below that you can try out, if you have pico8.   They only contain about 5/8ths of the original level data and would need changes in order to save any level data.

Warning, the editor contains some spoilers.


Controls:

  • arrow keys - switch between levels.
  • scroll wheel - switch between cursor modes. (placing and editing actors)
  • left click - place actor, select actor, or connect logical actors.
  • right click - move actors (in logic edit or actor edit modes)
  • 1 - test level, spawn player at cursor.
  • 2 - stop testing level.

Get Slime's Light

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.