data | ||
examples | ||
external | ||
include/SLK | ||
lib | ||
screenshots | ||
src | ||
LICENSE.md | ||
README.md |
SoftLK Engine
A software accelerated engine using OpenGL to bring the graphics to the screen. It's made for low resolutions (eg. 256x240), but should handle higher resolutions, too.
Features
- Layers: Draw to multiple independent layers
- RGB drawing: Draw in 32bit rgba colorspace
- Pal drawing: Draw in palletized 8bit colorspace and change the palette on the fly, without needing to redraw
- Image loading: Load and save sprites from and to multiple file formats
- OpenGL 2.1: It's old. It's antiquated. I mean, who needs shaders anyway?
License
SoftLK is free Software (as in freedom) and is released under the 3-clause BSD license, see LICENSE.md for details. Most of the examples are released under the same license, unless noted otherwise of course.
Getting started
-
Get a compiler: I use gcc but clang works too.
-
Install the SDL2 development files:
On Debian/Ubuntu:
sudo apt install libsdl2-dev
(Note: I haven't used a Debian/Ubuntu based distro in a while)On Void-Linux:
sudo xbps-install SDL2-devel
-
Clone this repository:
git clone https://codeberg.org/Captain4LK/SoftLK-lib.git
-
Compile SoftLK:
You can either use the provided makefile:
cd SoftLK-lib/lib make backend_sdl2_gl
Or compile it yourself:
cd SoftLK-lib/lib gcc -O3 -c ../src/*.c ../src/backend/backend_sdl2_gl.c -lm -lSDL2 -lGL #Compile to object files first ar cr libSLK.a *.o #Then link them together
-
If everything went right you are now ready to start using SoftLK. Now you can either look at some of the examples, look at the Getting started wikipage or figure things out yourself by looking at the source.
Plattforms
SoftLK has been tested and is working on the following plattforms/os:
- Void GNU/Linux, amd64 (glibc/musl-libc)
SoftLK should work on any plattform that has a C compiler, SDL2 and OpenGL 2.1, the plattforms listed here are just the ones I frequently test SoftLK on.
Library Credits
Here I shall list all external libraries used by SoftLK: