C++ games and interactive media framework that makes creating cross-platform applications easier and faster https://shampoo.ooo
Go to file
frank fff9e13562 custom log function; change Game and Node from struct to class 2021-06-24 17:40:30 -04:00
demo custom log function; change Game and Node from struct to class 2021-06-24 17:40:30 -04:00
lib reverse wipe; more precision converting floats in box to sdl_rect 2020-08-31 16:36:56 -04:00
src custom log function; change Game and Node from struct to class 2021-06-24 17:40:30 -04:00
.gitignore folder structure 2019-04-29 19:27:13 -04:00
BPmono.ttf - framerate indicator sprite added to Game class 2020-07-19 15:43:47 -04:00
README fix user config merge; clear screen to black; reset to single box on sprite unload 2021-05-07 21:19:23 -04:00

README

++~~~~~~~~~~~~~~~~~~~~~~~++
::                       ::
::  SFW (SDL Framework)  ::
::                       ::
++~~~~~~~~~~~~~~~~~~~~~~~++

SFW is a C++ framework that facilitates the creation of SDL projects. It
provides generic game objects that can be used, extended or overwritten. Games
written using this framework can be exported to PC, Mac, Linux, Web GL,
Raspberry Pi, and Android.

It is in an early untested state. It comes with a simple program that
demonstrates how to use it for a project that can switch between SDL and OpenGL
contexts.

Requirements
````````````
The SFW source includes some external libraries in lib/, but there are other
libraries that must also be present in order to compile a project which uses the
framework

* libSDL2 (developed against v2.0.14)
* libSDL2-image
* libSDL2-ttf
* libSDL2-mixer
* OpenGL/GLES/GLES2
* compiler that supports C++17

Installing Requirements
```````````````````````
libSDL2, libSDL2-image, libSDL2-ttf, and libSDL2-mixer must be available to
link with your project, so you can try your package manager's libSDL2 dev
packages or build from source. The included sdl2-config utility program can be
used to generate flags for linking to SDL2 when it is installed outside of
your platform's usual library location.

libSDL2:

- Download from http://libsdl.org/download-2.0.php
- Run ./configure --prefix=[YOUR LIBRARIES PATH] (I'm using ~/local/sdl)
- Run make && make install

libSDL2-image, libSDL2-ttf, libSDL2-mixer:

- Download from:
  - https://www.libsdl.org/projects/SDL_image/
  - https://www.libsdl.org/projects/SDL_ttf/
  - https://www.libsdl.org/projects/SDL_mixer/
- Run ./configure --prefix=[YOUR LIB PATH] --with-sdl-prefix=[YOUR SDL PATH]
- In my case, prefix and SDL prefix are both ~/local/sdl

OpenGL/GLES/GLES2:

- Install GL/GLES according to your platform and link to it during compilation.
  GLEW is included in the lib/ folder of this framework and should find GL on
  your platform if it is installed.

Demo
````
The `demo/` folder contains a simple cube demo. The main purpose of the demo is
to demonstrate switching between 3D and 2D contexts. In order to compile the
demo, you will have to edit the paths in the Makefile to point to the locations
of the necessary libraries on your system.

License
```````
This software is dedicated to the public domain.  See
http://creativecommons.org/publicdomain/zero/1.0/ for details.

Author
``````
420 [AT] shampoo.ooo