A minimal demo App for the Fireblade Entity-Component-System. This App demonstrates handling of Entities and Components and provides a live Performance Test for the framework.
Both demos declare their components with the @Component macro from the FirebladeECSMacros product
and use the FirebladeECS 1.4 API (entity.set(_:), entity.get(_:), families, entity state machines).
The particles demo also clones entities and saves and restores the whole world as a JSON snapshot.
These instructions will get you a copy of the project up and running on your local machine.
- Swift Package Manager (SPM)
- Swift 6.1+, e.g. via Xcode 16.4+
- Simple DirectMedia Layer 2 (SDL2)
- Download and install i.e. via Homebrew
brew install sdl2on macOS orapt-get install libsdl2-devon Debian/Ubuntu
- Download and install i.e. via Homebrew
- Clone the repository
- Either open
Package.swiftwith Xcode and run one of the executable schemes
-or- - From Terminal run
make runAsteroidsormake runParticlesto run either demo. - Run the tests with
make test.
| Particles | |
|---|---|
ESC |
quit |
c / r |
randomize all colors / reset all positions |
s, +, -, space |
stop, increase, reduce or reset movement speed |
e / d |
create / destroy 1 entity |
8 / 9 |
batch create / destroy 10k entities |
x |
clone 1k entities |
k / l |
save / restore a JSON snapshot of all entities |
| Asteroids | |
|---|---|
← → or A D |
rotate the spaceship |
↑ or W |
accelerate |
SPACE |
shoot |
ESC |
quit |
- Christian Treffs - Initial work
- Igor Kravchenko - Asteroids demo
This project is licensed under the MIT License - see the LICENSE file for details

