Studium is a 2D game engine written in C from scratch. The main focus is on portability and simplicity, while striving to follow good design patterns.
By “portability”, we mean that all code should be written in a way which makes it easy to compile for other systems, with minor modifications. The main focus is to make it run on Linux and Windows respectively.
By “simplicity”, we mean that all code written on this project should be organized and commented in a way which facilitates readability and understanding of the algorithms underlying the code. For that purpose, we use Unix-like indentation as one of the main tools.
Studium is focused on writing its own codebase whenever there are no self-contained alternatives. Modularization is also a must, so certain systems are contained in their specific headers. As the name suggests, this project is a study on C game development and comprehensive documentation.
Windowing and Input
Uses GLFW 3.3 for handling windowing and basic input support. The library is statically compiled for better redistribution.
Uses OpenGL 3.3 Core Profile, supposedly compatible with all hardware capable of running Direct3D 10+. This should also provide support for GLSL 1.5 language for shaders.
Uses glad for loading OpenGL extensions. Also includes the
header, part of the Khronos Group API.
Uses libcheck. The tests can be found on
test/tests.c, and are normally
compiled on the binary
Matrix and Vector operations
Uses a custom-tailored linear algebra system, based upon the book “Real Time Collision Detection”, by Christer Ericson.
Graphics operations based on the descriptions of open.gl webpage.
Uses a custom-tailored entity component system.
Use the Janet language to script the application.
This project uses CMake, therefore it has no secrets in the compilation structure:
#!/bin/bash cd /path/to/studium mkdir bin && cd bin cmake .. make
The commands above should build the dynamic library
libstudium.so, which will
be a dependency for test binaries
Useful resources and links
This software is distributed under the GNU Lesser General Public License v3.0, except for third-party software described below.
stb_image.hBuilt by Sean T. Barrett. License is Public Domain.
glad.hOpenGL loader interface, created using glad. License is Public Domain.
khrplatform.hKhronos Group platform-specific types and definitions, fetched by glad. License is MIT.
GLFWUsed for all things related to input/output, windowing, context creation. An awesome library distributed under the zlib license. Studium statically links GLFW onto its own dynamic library, but please be wary that none of this code is