Skip to content
The Studium 2D Game Engine (work-in-progress)
C Other
  1. C 99.8%
  2. Other 0.2%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
glfw @ b079610
res
src
test
.gitignore
.gitmodules
BACKLOG.org
CHANGELOG.org
CMakeLists.txt
LICENSE
README.org
profile.sh

README.org

Studium Engine

Introduction

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.

Implementation

Windowing and Input

Uses GLFW 3.3 for handling windowing and basic input support. The library is statically compiled for better redistribution.

Rendering

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.

GL Loader

Uses glad for loading OpenGL extensions. Also includes the khrplatform.h header, part of the Khronos Group API.

Unit testing

Uses libcheck. The tests can be found on test/tests.c, and are normally compiled on the binary unit-tests.

Matrix and Vector operations

Uses a custom-tailored linear algebra system, based upon the book “Real Time Collision Detection”, by Christer Ericson.

Rendering-related operations

Graphics operations based on the descriptions of open.gl webpage.

Entity Management

Uses a custom-tailored entity component system.

Scripting

Use the Janet language to script the application.

Compiling

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 studium-test and unit=tests.

Documentation

TBA.

Useful resources and links

License

This software is distributed under the GNU Lesser General Public License v3.0, except for third-party software described below.

Third-party

  • stb_image.h Built by Sean T. Barrett. License is Public Domain.
  • glad.h OpenGL loader interface, created using glad. License is Public Domain.
  • khrplatform.h Khronos Group platform-specific types and definitions, fetched by glad. License is MIT.
  • GLFW Used 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 libstudium’s!
You can’t perform that action at this time.