2021-01-24 19:22:48 +01:00
|
|
|
# KBLE, a KeyBoard driven Level Editor
|
|
|
|
A work in progress level editor with extensive keyboard support.
|
|
|
|
Designed for tile based 2D platformers.
|
2021-01-27 15:41:23 +01:00
|
|
|
This is a work in progress program in unusable state.
|
2021-01-24 19:22:48 +01:00
|
|
|
|
|
|
|
# Short term design decisions
|
|
|
|
Subject to change.
|
2021-02-02 14:49:50 +01:00
|
|
|
* Efficiency, simplicity and clarity are key goals.
|
2021-01-24 19:22:48 +01:00
|
|
|
* Fully keyboard driven modal editing. Mouse support is secondary.
|
2021-02-24 17:58:38 +01:00
|
|
|
* GUI software made in [Zig](https://ziglang.org/) with
|
2021-01-27 15:41:23 +01:00
|
|
|
[raylib](https://www.raylib.com/).
|
2021-02-25 22:53:02 +01:00
|
|
|
* Configurable (editing `src/conf.zig`).
|
2021-01-24 19:22:48 +01:00
|
|
|
|
2021-02-25 10:07:00 +01:00
|
|
|
# Installation
|
|
|
|
Runtime requirements: [raylib](https://www.raylib.com).
|
|
|
|
|
|
|
|
## Precompiled binaries
|
|
|
|
[![builds.sr.ht status](https://builds.sr.ht/~kikoodx/kble.svg)](https://builds.sr.ht/~kikoodx/kble?)
|
|
|
|
https://builds.sr.ht/~kikoodx/kble
|
|
|
|
|
|
|
|
## Manual compilation
|
2021-01-27 15:41:23 +01:00
|
|
|
Build requirements: [Zig](https://ziglang.org/download/) master branch,
|
2021-02-26 13:12:29 +01:00
|
|
|
[raylib](https://www.raylib.com). For Arch users, I made
|
|
|
|
[`kble-git`](https://aur.archlinux.org/packages/kble-git/) available in the AUR.
|
2021-01-27 15:41:23 +01:00
|
|
|
```sh
|
|
|
|
$ # Clone this repository
|
|
|
|
$ git clone https://git.sr.ht/~kikoodx/kble && cd kble
|
2021-02-24 23:11:06 +01:00
|
|
|
$ zig build
|
|
|
|
$ zig-cache/bin/kble
|
2021-01-27 15:41:23 +01:00
|
|
|
```
|
|
|
|
Press escape to close the program.
|
|
|
|
|
2021-02-24 23:11:06 +01:00
|
|
|
# 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.
|
|
|
|
```sh
|
|
|
|
$ kble #level.kble
|
|
|
|
$ kble sample.kble
|
|
|
|
$ kble $HOME/projects/kble/sample.kble
|
|
|
|
```
|
|
|
|
|
2021-02-25 23:31:23 +01:00
|
|
|
# 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.
|
2021-02-28 01:45:18 +01:00
|
|
|
* Disable backups.
|
|
|
|
* Change default grid size.
|
|
|
|
* Change default scaling level.
|
|
|
|
* Disable adaptive window size.
|
2021-02-25 23:31:23 +01:00
|
|
|
* Change and add colors.
|
|
|
|
* Edit keybindings.
|
|
|
|
|
2021-01-29 18:32:38 +01:00
|
|
|
# Default keybindings
|
2021-02-25 17:13:12 +01:00
|
|
|
Repetition/parameter:
|
|
|
|
* `0` → `9`: behavior similar to Vi.
|
|
|
|
|
2021-02-02 14:21:12 +01:00
|
|
|
Movement:
|
2021-01-29 18:32:38 +01:00
|
|
|
* `h`: left
|
|
|
|
* `j`: down
|
|
|
|
* `k`: up
|
|
|
|
* `l`: right
|
|
|
|
* `y`: up-left
|
|
|
|
* `u`: up-right
|
|
|
|
* `b`: down-left
|
|
|
|
* `n`: down-right
|
|
|
|
|
2021-02-02 14:21:12 +01:00
|
|
|
Verbs:
|
|
|
|
* `<space>`: clear selection
|
2021-01-29 18:32:38 +01:00
|
|
|
* `d`: delete selection
|
2021-02-25 17:13:12 +01:00
|
|
|
* `r`: replace selection with parameter
|
2021-01-29 18:32:38 +01:00
|
|
|
* `+`: increase scale (zoom)
|
|
|
|
* `-`: decrease scale (dezoom)
|
|
|
|
* `=`: reset scale
|
|
|
|
|
2021-02-24 15:48:32 +01:00
|
|
|
File (read/write):
|
2021-02-24 23:11:06 +01:00
|
|
|
* `e`: read (load) level
|
|
|
|
* `w`: write (save) level
|
2021-02-24 15:48:32 +01:00
|
|
|
*See `kbleformat.md` for technical informations.*
|
|
|
|
|
2021-03-13 00:40:31 +01:00
|
|
|
Parameter buffer (change default value of verb calls):
|
|
|
|
* `p`: set parameter buffer to current parameter (defaults to 1)
|
|
|
|
* `P`: set the tile ID the keyboard cursor is on as parameter buffer
|
|
|
|
|
2021-02-02 14:21:12 +01:00
|
|
|
Modes:
|
|
|
|
* `<return>`: normal mode, default
|
|
|
|
* `i`: free selection mode
|
2021-02-02 14:49:50 +01:00
|
|
|
* `v`: rectangle selection mode
|
2021-02-26 13:12:29 +01:00
|
|
|
* `I`: free unselection mode
|
|
|
|
* `V`: rectangle unselection mode
|
2021-02-02 14:21:12 +01:00
|
|
|
* `c`: camera mode [not implemented]
|
|
|
|
|
2021-02-26 13:12:29 +01:00
|
|
|
# Default mouse control
|
|
|
|
* Right click: free selection.
|
|
|
|
* Shift + left click: rectangle selection.
|
|
|
|
* Right click: libre unselection.
|
|
|
|
* Shift + right click: rectangle unselection.
|
|
|
|
* Left or right click while un·selecting: end selection.
|
2021-02-01 00:40:43 +01:00
|
|
|
|
2021-02-27 00:46:28 +01:00
|
|
|
# Backups
|
|
|
|
Safety backups are made when:
|
|
|
|
* Reading operation is started (`backup_read.kble`)
|
|
|
|
* The program exit (`backup_exit.kble`)
|
|
|
|
|
2021-01-24 19:22:48 +01:00
|
|
|
# License
|
2021-01-29 12:32:38 +01:00
|
|
|
Copyright (c) 2021 KikooDX
|
2021-01-24 19:22:48 +01:00
|
|
|
|
|
|
|
This project is under the MIT license.
|
|
|
|
See LICENSE for more details.
|