Gama Logo

Gama Engine - Simple 2D Game Development in C

A lightweight, minimalist game engine that combines a powerful C library with a modern toolchain. Perfect for students learning C programming and developers who want a zero-dependency, educational approach to game development.

Powerful Features

Everything you need to build impressive 2D games and visualizations

⚙️

Lightweight C Library

Simple, easy-to-learn C API with clear function names designed specifically for students and beginners.

⚖️

Built-in 2D Physics Engine

Physics system with bodies, shapes, and collision detection supporting restitution, friction, and constraints.

🎯

Immediate Mode Rendering

Draw shapes directly without creating objects. Reduces pointer usage and manual memory management.

⏱️

Comprehensive Animation System

Multiple easing functions and wave animations for smooth, professional-looking motion.

🔧

Modern CLI Tool

Fast project manager written in V with zero-dependency setup using embedded TCC compiler.

🎮

Advanced Input System

Intuitive key and mouse input with predefined shortcuts for arrows, space, and mouse buttons.

🌐

Cross-Platform Development

Target Windows, Linux, and Web with consistent APIs and behavior.

🎓

Educational Focus

Designed specifically for teaching C programming with safety and simplicity in mind.

Design Principles

Built with educational excellence and practical safety at its core

🏗️

Stack More, Heap Less

Gama encourages stack allocation in functions for safer memory management, reducing common C pitfalls for beginners.

Your code owns the mainloop, allowing you to control exactly how your game runs without hidden abstractions.

⚙️

You Have Control

🔄

No Global State

Functions can serve as scenes with automatic initialization, destruction, and object management.

Draw shapes directly when needed rather than creating and managing objects, simplifying game logic.

Immediate Mode

Real-World Applications

Gama is not just for games! Perfect for education, visualization, and scientific applications

🎮

Game Development

Create 2D games with physics, animation and user input handling using simple C code.

📊

Data Visualization

Build interactive tools to visualize data and algorithms with animated elements.

🔬

Scientific Simulations

Develop physics simulations, mathematical visualizations, and educational tools.

📚

Educational Tools

Create interactive applications for teaching programming, math, and science concepts.

Clean & Readable Code

Build games with minimal, easy-to-understand C code

// Interactive physics example with Gama
#include <gama.h>

int main() {
  // Initialize with window size and title
  gm_init(800, 600, "My Game");
  gm_background(GM_BLACK);

  // Create a physics body
  gmBody player = gm_rectangle_body(1.0, 400, 300, 32, 32);

  // Game loop
  do {
    // Handle input
    if (gm_key('U')) player.velocity.y += 5.0;  // Move up
    if (gm_key('D')) player.velocity.y -= 5.0;  // Move down
    if (gm_key('L')) player.velocity.x -= 5.0;  // Move left
    if (gm_key('R')) player.velocity.x += 5.0;  // Move right

    // Draw elements
    gm_draw_body(&player, GM_BLUE);

    // Check for exit condition
    if (gm_key_pressed('s', 'x')) {
      gm_quit();
    }

  } while (gm_yield());

  return 0;
}

Powerful CLI Tool

Fast project management with zero dependencies

gama create Create a new Gama project interactively
gama dev Build and run with auto-rebuild on changes
gama build Compile your project to an executable
gama package Package your project for distribution

Ready to Start Building?

Join thousands of students learning game development with Gama's beginner-friendly approach