A lightweight F# library for game composition using entity-component-system (ECS) and actor-like messaging.
Garnet is a lightweight game composition library for F# that combines entity-component-system (ECS) and actor-like messaging features. It provides efficient data storage and event-driven systems for managing game state, helping developers build modular and performant games without the overhead of a full game engine.
F# developers building games or simulations who need a flexible, performant architecture for managing entities, components, and systems with minimal allocation overhead.
Developers choose Garnet for its simplicity, focus on performance through data-oriented design, and the unique combination of ECS and actor messaging in a lightweight F# library, allowing fine-grained control over game logic.
F# game composition library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Garnet is intentionally minimal, acting as a library rather than a framework, which allows developers to retain full control over game-specific logic without engine bloat, as emphasized in the Philosophy section.
Uses struct-based components and pooled storage to minimize allocations and garbage collection spikes, with data-oriented iteration over dense segments for fast processing, as detailed in the Components and Storage sections.
Combines ECS for shared state management and actor-like messaging for isolated, parallel processing, offering flexibility in game architecture, which is a unique feature highlighted in the Introduction and Actors sections.
Supports arbitrary event types for decoupled communication and coroutines for sequenced logic, enabling complex timing behaviors without tight coupling, as explained in the Systems and Coroutines sections.
The event system has no built-in features for multithreading, requiring manual implementation for parallel processing, which can increase development complexity, as admitted in the Multithreading subsection under Systems.
Integrating with frameworks like Unity or MonoGame often requires creating abstraction layers or handling events directly, adding setup complexity compared to drop-in engine solutions, noted in the Integration section.
As an F#-specific library, Garnet has a smaller community and fewer third-party resources, which can hinder troubleshooting and learning, with limited sample projects beyond basic unit tests.
The README mentions that features like partitioning may be replaced in the future, indicating possible breaking changes and maintenance challenges for long-term projects.