Keyboard driven 2D level editor https://sr.ht/~kikoodx/kble/
Go to file
KikooDX eec14bc99c Input system more DRY, add Tab (`\t`) support. 2021-02-26 01:03:41 +01:00
src Input system more DRY, add Tab (`\t`) support. 2021-02-26 01:03:41 +01:00
.build.yml Add build manifest. 2021-02-25 10:16:43 +01:00
.gitignore Two ways level loading/saving works perfectly! Very nice :D 2021-02-24 15:22:59 +01:00
LICENSE Level uses memory allocation + LICENSE file 2021-01-26 13:10:16 +01:00
README.md Allow user to configure keybindings. 2021-02-25 23:31:23 +01:00
build.zig Added docstrings to structure functions. 2021-01-26 14:46:32 +01:00
kbleformat.md Add versioning byte. Remove bloat goal from README.md 2021-02-24 18:14:38 +01:00
level.kble Input system more DRY, add Tab (`\t`) support. 2021-02-26 01:03:41 +01:00
sample.kble Add versioning byte. Remove bloat goal from README.md 2021-02-24 18:14:38 +01:00

README.md

KBLE, a KeyBoard driven Level Editor

A work in progress level editor with extensive keyboard support. Designed for tile based 2D platformers. This is a work in progress program in unusable state.

Short term design decisions

Subject to change.

  • Efficiency, simplicity and clarity are key goals.
  • Fully keyboard driven modal editing. Mouse support is secondary.
  • GUI software made in Zig with raylib.
  • Configurable (editing src/conf.zig).

Installation

Runtime requirements: raylib.

Precompiled binaries

builds.sr.ht status https://builds.sr.ht/~kikoodx/kble

Manual compilation

Build requirements: Zig master branch, raylib. For Arch users, zig-dev-bin and zig-git are available in the AUR.

$ # Clone this repository
$ git clone https://git.sr.ht/~kikoodx/kble && cd kble
$ zig build
$ zig-cache/bin/kble

Press escape to close the program.

Command line argument

Not available on Windows. Accept a path to KBLE file to open. If the file doesn't exist, the given path will be used for saving. Defaults to level.kble if no argument given.

$ kble #level.kble
$ kble sample.kble
$ kble $HOME/projects/kble/sample.kble

Configuration.

In src/conf.zig, edit values from BEGIN USER CONFIG. The configuration is applied at compile time. You have the possibility to:

  • Disable mouse support.
  • Swap mouse buttons.
  • Change and add colors.
  • Edit keybindings.

Default keybindings

Repetition/parameter:

  • 09: behavior similar to Vi.

Movement:

  • h: left
  • j: down
  • k: up
  • l: right
  • y: up-left
  • u: up-right
  • b: down-left
  • n: down-right

Verbs:

  • <space>: clear selection
  • d: delete selection
  • r: replace selection with parameter
  • +: increase scale (zoom)
  • -: decrease scale (dezoom)
  • =: reset scale

File (read/write):

  • e: read (load) level
  • w: write (save) level
    See kbleformat.md for technical informations.

Modes:

  • <return>: normal mode, default
  • i: free selection mode
  • v: rectangle selection mode
  • c: camera mode [not implemented]

Mouse control

Right click and left click are the same, except right click reset selection before taking effect.

  • Click: free selection.
  • Shift + Click: rectangle selection.
  • Click while selecting: end selection.

License

Copyright (c) 2021 KikooDX

This project is under the MIT license. See LICENSE for more details.