Xengine Documentation

Xengine is a lightweight, easy-to-learn game engine built with C# and .NET 6. Perfect for learning game development or building small to medium-sized games.

See It In Action

Xengine Gameplay

Features

3D

3D Rendering

Built-in 3D rendering with cubes, spheres, planes, and more using Raylib.

</>

Component System

Flexible component-based architecture for organizing game logic.

fx

Math Library

Complete math library with Vector2, Vector3, Quaternion, and more.

IN

Input System

Easy keyboard and mouse input handling for player controls.

T

Time Management

Delta time, fixed updates, and timer utilities built-in.

EV

Event System

Decouple game systems with a flexible event system.

Quick Example

Here's a simple example that creates a spinning cube:

using Xengine.Core;
using Xengine.Engine;
using Xengine.Math;
using Xengine.Scene;
using Xengine.Rendering;

// Create and configure the engine
var config = new ApplicationConfig
{
    WindowWidth = 1280,
    WindowHeight = 720,
    WindowTitle = "My First Game"
};

using var engine = new Engine(config);
engine.Initialize();

// Create a scene
var scene = engine.LoadScene("MainScene");

// Add a spinning cube
var cube = scene.CreateGameObject("Cube", new Vector3(0, 1, 0));
cube.AddComponent<SpinningCube>();

// Run the game
engine.Run();

// Component that spins and renders a cube
public class SpinningCube : Component
{
    private float _angle;
    
    protected override void OnUpdate()
    {
        _angle += Time.Delta * 90f; // 90 degrees per second
    }
    
    protected override void OnRender(RaylibRenderer r)
    {
        r.DrawCube(Transform.Position, Vector3.One, Color.Red);
    }
}

Core Modules

Next Steps

Ready to start?

Check out the Quick Start Guide to set up your first project, or browse the Examples to see Xengine in action.