Show HN: Ark v0.6.0 – Go ECS with new declarative event system

github.com

3 points by mlange-42 10 hours ago

Ark is a high-performance Entity Component System (ECS) library for Go.

Ark v0.6.0 introduces a new event system built around lightweight, composable observers. These allow applications to react to ECS lifecycle changes like entity creation/removal, component updates, relation changes using declarative filters and callbacks. Observers follow the same patterns as Ark’s query system, making them easy to integrate and reason about.

Custom events are also supported. They can be emitted manually and observed with the same filtering logic, making them ideal for modeling domain-specific interactions such as input handling, and other reactive game logic.

As a new performance-related feature, filters and queries are now concurrency-safe and can be executed in parallel.

This release also includes a load of performance improvements, from faster archetype switching over optimized query and table creation to improved performance of bitmask operations. The new World.Shrink method helps reclaim unused memory in dynamic workloads.

Docs have been expanded with a full guide to the event system, examples for both built-in and custom events, and an Ebiten integration example. A cheat sheet for common operations has been added. Finally, Ark now has 100% test coverage.

Changelog: https://github.com/mlange-42/ark/blob/main/CHANGELOG.md Repo: https://github.com/mlange-42/ark

Would love feedback from anyone building games, simulations, or ECS tooling in Go.