Go to file
Captain4LK 9dd7bfb7b9 Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +02:00
data Add linkes to licenses in data/README.md 2020-07-30 10:41:19 +02:00
examples Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +02:00
external Remove glad dependency 2020-07-25 20:37:29 +02:00
include/SLK Rework font system 2020-07-28 20:09:59 +02:00
lib Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +02:00
screenshots Add credit to all used assets 2020-07-29 16:12:12 +02:00
src Add missing license notes in header files. 2020-07-28 20:16:06 +02:00
LICENSE.md Improve SLK_sprite_rgb(.c) 2020-04-28 16:18:44 +02:00
README.md Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +02:00

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

  1. Get a compiler: I use gcc but clang works too.

  2. 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

  3. Clone this repository: git clone https://codeberg.org/Captain4LK/SoftLK-lib.git

  4. Compile SoftLK:

    You can either use the provided makefile (on freebsd please use gmake):

    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 crs libSLK.a *.o #Then link them together
    
  5. 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
  • FreeBSD 12.1, amd64

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:

performance example

efleder example