Gama provides a lightweight C library and a modern toolchain, designed to make 2D game development approachable and fun for students and developers.
A simple and clean C99 API designed for students and beginners, focusing on core concepts without overwhelming complexity.
An effective physics engine is included, with support for bodies, shapes, and collision detection to easily add dynamic interactions.
Draw shapes and UI widgets directly to the screen each frame, simplifying state management and making your code easier to reason about.
Write your game once in C and build it for native desktop (Linux, Windows) or for the Web via WebAssembly, using the exact same code.
A complete sprite system with support for sprite sheets, custom animation sequences, and a collection of easing functions for smooth motion.
Natively load common 3D model formats like `.obj` and `.gltf` and popular image formats for textures and sprites.
Gama gives you full control over the main game loop. The engine provides utilities but stays out of your way, allowing you to structure your game exactly as you see fit.
The API encourages using stack-allocated structs to leverage C's automatic memory management, reducing the cognitive load and common pitfalls of manual memory allocation.
Designed to avoid global state, Gama allows you to structure your game into different scenes, each with its own state, initialization, and cleanup logic.
Instantly run your project with the fast TCC compiler and enjoy hot-reloading on every file change for a rapid development feedback loop.
Create optimized release builds for native or web targets using the powerful Zig C compiler for maximum performance.
Gama for Windows bundles pre-configured TCC and Zig compilers. No external downloads or PATH setup needed.
Embed assets like images and models directly into your game's executable, simplifying distribution and improving load times.
#include <gama.h>
int main() {
// Initialize with window size and title
gm_init(800, 600, "My Gama Game");
gm_background(GM_DARKGRAY);
// Game loop
do {
// Draw a moving, purple rectangle
gm_draw_rectangle(
gm_anim_sin(0., 1., 1., 0.), 0, // Animate x-position
0.3, 0.2, gm_rgb(170, 119, 170)
);
} while (gm_yield()); // Handles events, clears screen, and loops
return 0;
} Gama projects compile directly to WebAssembly. Here is a small interactive sample running entirely in your browser.