🐍 Typhon 🐍

GitHub, Documentation.

Overview: A High-Performance Component-Based Database for Game Development

Typhon Engine is a specialized database engine that combines the performance of an in-memory database with the reliability of persistent storage. It’s designed specifically for game development scenarios that require high-throughput data operations with transactional safety.

Core Features

Component-Based Architecture

Typhon uses a component-based architecture where data is organized into typed components rather than traditional tables. This approach aligns perfectly with Entity Component System (ECS) patterns commonly used in game development.

[Component(SchemaName)]
[StructLayout(LayoutKind.Sequential)]
public struct PlayerPosition
{
    public const string SchemaName = "Game.Components.PlayerPosition";
    public float X;
    public float Y;
    public float Z;
}

Powerful Transaction System

All operations are performed through transactions, providing ACID guarantees even in high-throughput scenarios:

Concurrency Control Options

Choose the concurrency model that fits your needs:

High-Performance Memory Management

The engine is built with performance as a top priority:

Indexing Support

Automatically create and maintain indexes for faster lookups:

[Component(SchemaName)]
public struct Enemy
{
    [Index(AllowMultiple = true)]  // Support multiple enemies at same position
    public float PositionX;
    
    [Index]  // Only one enemy per ID
    public int EnemyId;
}

Memory-Efficient Storage

The storage layer is designed to minimize memory overhead:

Use Cases

Typhon Engine is particularly well-suited for:

The database engine provides a robust foundation for building complex, data-driven game systems while maintaining the performance needed for smooth gameplay.

Technical Foundation

Built on modern C# with careful optimization, Typhon Engine takes advantage of:

This combination delivers both the raw performance needed for games and the developer-friendly API needed for rapid development.

Why ?

Initially I wanted to “make a database engine for MMOs, something fast, reliable and scalable” (in that order).

Something like a weird mixed between ECS and a “regular database engine”.

Fast

In the realm of the micro-second. Concessions would have to be made, but it has to be fast, otherwise there’s no really a point to it.

More suitable

Not the original intent, but quickly a very interesting angle. Adopting some of the ECS principals would make this more natural for the users.

Reliable, meaning Durable (or not…)

Atomic, transaction-based and durable operations.

Through a design decision, the user can opt-out durability on chosen components.

Scalable

While it’s still a goal, the ambitions were tuned down. A theoretical evolution would be a shard/hash based implementation, but the resulting complexity makes this no longer an objective.

History

This project went through many things: