iacobson

iacobson

ECSpanse - an Entity Component System framework for Elixir

ECSpanse

logo_small

Ecspanse is an Entity Component System (ECS) framework for Elixir.

Ecspanse is not a game engine, but a flexible foundation for managing state and building logic, with features like:

  • flexible queries with multiple filters
  • dynamic bidirectional relationships
  • versatile tagging capabilities
  • component templates
  • system event subscriptions
  • asynchronous system execution

Docs: Ecspanse — ECSpanse v0.10.1
GitHub: GitHub - iacobson/ecspanse: Entity Component System (ECS) library for Elixir, offering a suite of features including: flexible queries with multiple filters, dynamic bidirectional relationships, versatile tagging capabilities, system event subscriptions, or asynchronous system execution. · GitHub
Article: https://iacobson.medium.com/elixir-for-fun-ecspanse-2852a7993ecd
Podcast: ECS / Game Development with Elixir vs. Python, JavaScript, React with Dorian Iacobescu & Daniel Luu | SmartLogic

Most Liked Responses

stwf

stwf

OK. Finally got something I’m ready to show.

My game is an attempt at a Kriegsspiel. A 19th century wargame that emphasized realistic issues that came up in battle. Mine at least will try to take into account proper size scales, lines of supply and communication, how long orders take to arrive, and be executed, etc

I’ve got the hex map editor working and have basic movement and some commands working. Next up will be line of sight for identifying enemy units, and Scouts bringing back delayed observations of enemy units. That sort of thing. Then battle!

So it’s been fun and a good learning experience if nothing else! I’ll be happy to open up the code if there someone other than me interested in this sort of thing…


Steve

iacobson

iacobson

For whoever is interested, I’m invited to this Elixir Wizards podcast episode discussing ECS and Ecspanse: ECS / Game Development with Elixir vs. Python, JavaScript, React with Dorian Iacobescu & Daniel Luu | SmartLogic

iacobson

iacobson

Thanks. I think Ecspanse and ECSx try to solve the same “problem” but in different ways. I even mentioned ECSx as an alternative to Ecspanse in my Medium article.

Still, to try to answer your question, I think ECSx is more straightforward to get started with. You have generators and every component holds a single value. You can then query the individual components by their entity ID or as a list. But I think their guides section explains it better than I could.

On the other hand, Ecspanse has a bit more complicated approach, but I would say also offers more flexibility as the game becomes more complex. I would mention just a few of them:

You can find some more details and examples in the Medium article.

Where Next?

Popular in Announcing Top

danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 12560 134
New
Crowdhailer
Raxx is an alternative to Plug and is inspired by projects such as Rack(Ruby) and Ring(Clojure). 1.0-rc.1 is now available. To use it re...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement