qmetrics.net

Flecs

Fast entity component system for C and C++

Flecs screenshot

Lightweight entity component system for games and simulations with C99 and C++17 APIs. Supports hierarchies, prefabs, relationships, queries, and multithreaded scheduling.

Overview

Flecs is a fast, lightweight entity component system for building games and simulations that may involve very large numbers of entities. It exposes a portable zero-dependency C99 API and a type-safe C++17 API that avoids STL containers in its core design.

An ECS organizes work around entities as unique object identifiers, components as data types attached to entities, and systems as functions that run over entities matching queries. Flecs emphasizes entity relationships, native hierarchies, and prefabs, plus a query language with joins and inheritance. Storage uses cache-friendly archetype and structure-of-arrays layouts aimed at high per-frame throughput.

Developers can write free functions with queries or register systems that run automatically on schedules. A lockless scheduler can spread game logic across CPU cores. Addons cover systems, prefabs, scripting, a query language, remote API access, reflection with JSON serialization, runtime components, and statistics for profiling.

Flecs builds quickly, runs in the browser with emscripten without code changes, and documents Flecs Hub modules for input, transforms, physics, graphics, and rendering integrations. Community language bindings exist for C#, Rust, Zig, Lua, Clojure, and Java.

Key features

  • C99 and C++17 APIs
  • Entity relationships support
  • Hierarchies and prefabs
  • Query language with joins
  • Multithreaded lockless scheduler
  • JSON reflection serializer
  • Flecs Explorer web UI
  • Archetype SoA storage

Use cases

  • Game engines and simulations
  • Large-scale entity gameplay logic
  • Browser games via emscripten
  • Scene graphs with hierarchies
  • ECS prototypes in C or C++

Tags

Similar software

Bevy Engine

Rust game engine with ECS architecture

Bevy Engine is a data-driven Rust game engine for 2D and 3D work. It emphasizes modularity, parallel execution, and fast iteration while the project remains under active development.

★ 50k⟳ yesterdayApache-2.0
Open Source Alternative to:Unity

Phaser

HTML5 2D game framework with Canvas and WebGL

Phaser is a JavaScript and TypeScript framework for browser games on desktop and mobile, with scene APIs, physics, animations, and loaders. Games can target embed platforms or wrap for native stores via third-party tooling

★ 40.8k⟳ 3 months agoMIT

raylib

Minimal C library for games and graphical programs

raylib is a C99 graphics and game programming library with no mandatory external dependencies. It suits prototypes, tools, education, and embedded targets across desktop, mobile, and web.

★ 35.8k⟳ todayZlib
Frameworks & PlatformsDesktop/CLI app

Matter.js

JavaScript two-dimensional rigid body physics engine

Matter.js simulates 2D rigid-body physics for browser games and interactive pages. It runs in modern browsers and Node.js with canvas rendering and touch-friendly controls.

★ 18.7k⟳ 1 month agoMIT
Frameworks & PlatformsDesktop/CLI app

wgpu

Cross-platform safe Rust graphics API

wgpu implements the WebGPU-style API in Rust for native and WebAssembly targets. It backs Firefox, Servo, and Deno WebGPU integration and maps to Vulkan, Metal, D3D12, and GLES.

★ 18.7k⟳ todayApache-2.0
Frameworks & PlatformsDesktop/CLI app

GLFW

Cross-platform windowing library for OpenGL and Vulkan

GLFW is a C library that creates windows, graphics contexts, and surfaces while handling input and events. It targets OpenGL, OpenGL ES, and Vulkan on desktop and Unix-like systems.

★ 15.5k⟳ 3 months agoZlib
Frameworks & PlatformsDesktop/CLI app