125 lines
3.3 KiB

A simple project oriented single screen tilebased level editor.
SLE read and write KBLE level files.
KBLE format specifications:
Runtime dependencies: raylib
Build dependencies: meson, raylib
$ git clone && cd sle
$ meson setup builddir && cd builddir
$ meson compile
The following will install the resulting `sle` binary on your system.
# meson install
$ <SLE binary path> -tileset <tileset> -level <KBLE level to open>
$ sle -tileset assets/tileset.png -level sample.kble
usage: sle -tileset path -level path [options]
Two windows should appear. A main window, with the level you are
currently editing, and a secondary one, containing the tileset you
This software is controlled using a mice.
Main window - Editing Area
Left click: draw with selected tile
Right click: erase (tile 0)
Middle click: pick a tile
Secondary window - Tile Picker
Left click on the tile you want to select.
Exit and save
Close/kill the main window. The secondary window will close automaticly
and your modifications to the level file will be writen to disk.
Mandatory flags
All these options take a path to a file as argument.
-tileset : tileset image
-level : KBLE file
Optional flags
These flags are boolean toggles. They take no option.
-verbose : print debug informations to the standard output
-create : create an empty level instead of reading from the -level path
These flags take integers as argument.
-level-width : used by -create
-level-height : used by -create
These flags take colors as argument.
Color format : #RRGGBB or RRGGBB
Example aliases
By using the flags, it's very easy to create specific configurations.
Following are various aliases. They assume than sle is in your PATH.
# PICO-8-like configuration
alias sle-p8='sle -tile-width 8 -tile-height 8 -level-width 16 \
-level-height 16 -editor-width 128 -editor-height 128 \
-editor-off-x 0 -editor-off-y 0'
# fx-CG50 configuration
alias sle-cg='sle -tile-width 16 -tile-height 16 -level-width 25 \
-level-height 14 -editor-width 396 -editor-height 224 \
-editor-off-x -2 -editor-off-y 0'
# fx-9860G configuration
alias sle-fx='sle -tile-width 8 -tile-height 8 -level-width 16 \
-level-height 8 -editor-width 128 -editor-height 64 \
-editor-off-x 0 -editor-off-y 0 -editor-bg-color #b0b0b0 \
-picker-bg-color #b0b0b0'
Edit include/conf.h to change default configuration. Read the comments!
Don't forget to recompile after you made your modifications.
The following features are enabled with the -verbose flag.
Pressing middle mouse button in the editor will print the value of the
tile pointed to STDIN.
Copyright (C) 2021 KikooDX <>
This software is under the GPL-3.0-or-later license.
See COPYING for more informations.