A simple project oriented single screen tilebased level editor, in the KBLE family
Go to file
KikooDX ab7fa16727 fix: remove duplicate 'src/main.c' instance in meson.build 2021-05-23 12:50:03 +02:00
assets Level drawing and new arguments + README update 2021-03-23 19:06:05 +01:00
include feature: window resizing (#1) 2021-04-17 17:22:41 +02:00
src replace cmake with meson & use C99 instead of C89 2021-05-04 22:32:37 +02:00
.clang-format Level creation flag & cleanup and improved README 2021-03-27 14:02:08 +01:00
.gitignore replace cmake with meson & use C99 instead of C89 2021-05-04 22:32:37 +02:00
COPYING KBLE C rewrite initiated. 2021-03-18 17:38:39 +01:00
README replace cmake with meson & use C99 instead of C89 2021-05-04 22:32:37 +02:00
meson.build fix: remove duplicate 'src/main.c' instance in meson.build 2021-05-23 12:50:03 +02:00
sample.kble Tile first config option (-tile-first) 2021-03-27 19:15:08 +01:00

README

SLE
===
A simple project oriented single screen tilebased level editor.

SLE read and write KBLE level files.
KBLE format specifications:
=> https://git.sr.ht/~kikoodx/kble/tree/dev/item/kbleformat.md

COMPILATION
===========
Runtime dependencies: raylib
Build dependencies: meson, raylib

$ git clone https://git.sr.ht/~kikoodx/sle && cd sle
$ meson setup builddir && cd builddir
$ meson compile

The following will install the resulting `sle` binary on your system.
# meson install

RUN
===
$ <SLE binary path> -tileset <tileset> -level <KBLE level to open>
Example:
$ sle -tileset assets/tileset.png -level sample.kble

SYNOPSIS
========
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
provided.

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.

FLAGS
=====

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.
-tile-width
-tile-height
-level-width : used by -create
-level-height : used by -create
-tile-first
-editor-scale
-editor-width
-editor-height
-editor-target-fps
-editor-scale
-editor-off-x
-editor-off-y
-picker-target-fps
-picker-padding

These flags take colors as argument.
Color format : #RRGGBB or RRGGBB
-editor-bg-color
-picker-bg-color

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'

DEFAULT CONFIGURATION
=====================
Edit include/conf.h to change default configuration. Read the comments!
Don't forget to recompile after you made your modifications.

DEBUG FEATURES
==============
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.

LICENSE
=======
Copyright (C) 2021 KikooDX <kikoodx@paranoici.org>
This software is under the GPL-3.0-or-later license.
See COPYING for more informations.