APB9785
Creator of ECSx
ECSx - an Entity-Component-System framework for Elixir
ECSx
ECSx is a framework for using Entity Component System architecture to build real-time games and simulations. It is currently 100% Elixir, using :ets for managing Components, and GenServer for managing Systems under-the-hood.
Features
- Generators handle all boilerplate creation
- Type-checking for all component data
- Strict serializability of data operations
- Persistence with file system or Ecto (via ecsx_persistence_ecto)
- Integration with Phoenix LiveDashboard (via ecsx_live_dashboard)
How to Get Started
All you need to a functional game up and running:
- Install
:ecsxinto an existing Elixir app - Run
mix ecsx setup - Run
mix ecsx.gen.componentto define the various attributes which game entities may have - Run
mix ecsx.gen.systemto define the logical systems which update the game state over time - Write system logic using pure Elixir and a simple ECSx interface; e.g.
HitPoints.get(entity) - Develop your frontend using any technology you like (including LiveView)
To get you started quickly, there is a tutorial which walks you through each of the above steps, to create a game with a LiveView frontend, where you move around a battleship which automatically attacks any pirate ships which get within range
Resources
- DockYard blog post explaining ECS architecture and why it’s useful for Elixir gamedev
- ElixirConf 2023 talk with more examples and live ECSx demo
- Elixir Newbie podcast #34 where I discuss the history and key features of the project
- DockYard Elixir Roundtable podcast #21 the first public announcement of ECSx (starts at 28:00)
- Github repo
- Official documentation
- “Ship game” tutorial app repo
First Post!
AstonJ
4 posts were split to a new topic: How to create multiple consecutive commands with ECSx?
Popular in Announcing
Hey there!
I wrote a download elixir package which does exactly what its name about - an easy way to download files.
I saw solutions ...
New
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far...
New
Currently just starting out on a new mini-project - getting zig NIFs to run in elixir.
The idea here is to make the zig NIFs be “embed...
New
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project.
Unicode released CLDR ...
New
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library.
The progre...
New
Only 650 LOC, wrote for fun :slight_smile:
New
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects.
Core ideas
Type- and function specifications are const...
New
Lexical
Lexical is a next-generation language server for the Elixir programming language.
Features
Context aware code completion
As-you...
New
Hey all,
We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3!
We have successfully on-boarded the full suite of integration tests (...
New
Other popular topics
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New







