Go to file
2026-01-31 23:04:56 -08:00
.vscode Removed python, pokemon, and sustained .wav's 2026-01-31 13:40:40 -08:00
assets Add icons instead of text for input key hint bar 2026-01-31 23:04:56 -08:00
src Add icons instead of text for input key hint bar 2026-01-31 23:04:56 -08:00
.clang-format Initial commit 2026-01-30 19:54:19 -08:00
.gitignore add skelly bg 2026-01-31 03:21:21 -08:00
README.md Initial commit 2026-01-30 19:54:19 -08:00
xmake.lua Added song structs 2026-01-31 00:28:02 -08:00

Game Jam Kit

A simple framework for making small games with raylib, box2d, and LDtk.

Introduction

The framework in setup as a series of classes that manage the lifecycle of each other.

Game manages Managers and Scenes.

A Manager holds resources that are used across scenes. The resources are loaded at Game::init().

Scene manages Services and GameObjects.

Scenes also perform game logic for each level.

A Service holds resources that are used in a single scene. The resources are loaded during init and disposed when the scene is disposed.

GameObject manages Components

GameObjects also perform game logic for individual game entities.

A Component is a reusable tool for creating GameObject behavior.

Each of these pieces has lifecycle functions for init(), update(), and draw() that can be overridden when creating your own subclasses. These functions are called by the containing manager. If you do not wish for your class to be managed you shouldn't inherit from these base classes.

The managers also have larger overridable functions, init_*(), update_*(), and draw_*() that give you increased control over how the manager is used.

See engine/prefabs for prebuilt managers, services, game objects, and components.

See samples for examples on how to build a Scene.

See main.cpp for how to build a Game.

Building

This project uses xmake to build. Checkout xmake.lua for more details.

Using the xmake extension for VS Code is highly recommended.

Windows prerequisites

Install Visual Studio Community Edition, anything 2022 and over should be fine. Make sure to install the C++ packages. Install xmake.

Mac prerequisites

Install xmake:

brew install xmake

Linux prerequisites

Install xmake, cmake, opengl libs, and x11 libs:

sudo apt-get install xmake
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install libgl1-mesa-dev
sudo apt-get install xorg-dev libx11-dev libxfixes-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

Build

xmake

Run

xmake run

Switch to debug mode

xmake config --mode debug

Then run with the VS Code debugger.

Switch to release mode

xmake config --mode release

Then run with xmake run.

Clean

xmake config --clean

Setup header includes for your editor

Option 1:

Generate compile_commands for VS Code.

xmake project -k compile_commands

This has to be every time a new file is added.

Add this line to c_cpp_properties.json by running the command C/C++: Edit Configurations (JSON) from the command pallette.

"compileCommands": "${workspaceFolder}/compile_commands.json",

Option 2:

Alternatively add the include directory for each library to your include path configs. They are located here for Windows:

C:\Users\user\AppData\Local\.xmake\packages\r\raylib\5.5\xxxxx\include
C:\Users\user\AppData\Local\.xmake\packages\b\box2d\v3.1.1\xxxxx\include
C:\Users\user\AppData\Local\.xmake\packages\l\ldtkloader\1.5.3+1\xxxxx\include

and here for Linux:

~/.xmake/packages/r/raylib/5.5/xxxxx/include
~/.xmake/packages/b/box2d/v3.1.1/xxxxx/include
~/.xmake/packages/l/ldtkloader/1.5.3+1/xxxxx/include

The specific hashes are for the different platforms, targets, and modes, selecting any of them will give you what you need.