Adds a new query Ecspanse.Query.fetch_tagged_component/2 that returns an entity’s component by a list of tags. Attention, it is the logic implementation duty to ensure that no more than one component is returned, or it will raise an error.
Introduces also some small breaking changes: the Timer Component and Event are now Templates. use Ecspanse.Component.Timer and use Ecspanse.Event.Timer should be replaced with use Ecspanse.Template.Component.Timer and use Ecspanse.Template.Event.Timer.
Ecspanse is a state management library. It also runs the “game loop” and offers some built-in functionality like timers.
what I mean by “it’s not a game engine” is that has no functionality for rendering, controls/input, physics, assets, GUI, etc. So you will need to combine it with some other technology if you want to build anything user-facing.
Will do… currently I am thinking of using React and Three, or Three fiber for the front end and controls, Phoenix for socket and clients communication, and ECS for managing game state.
Isn’t that just a basically just a change from inheritance to composition? I mean that’s nice, however I don’t think erlang VM can fit in this theme by design,
I haven’t had time to check it out, but looks interesting. I want to ask though, how does it differ from ECSx created by Dockyard? One of the use case for ECSx seems to be game dev as explained here.
Thank you! And yes, I did find your library and also read your Medium article.
Also, out of curiosity, have you built or tried to build a game or any kind of project with it?
I’m generally very interested in any kind of game project build with Elixir.
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:
complex queries across multiple components, entities, and relationships
Oh, great to hear that it didn’t just die in the dark corners of the internet
I originally extracted/reworked ECS as part of my work on my most off-the-rails project ever, which was an attempt to cross dwarf fortress and old-school MUDs: GitHub - Trevoke/dwarlixir: A dwarf-fortress clone / MUD / side project in Elixir - but I never finished the refactor once I had extracted it.
In the Slack community I mention in the article - the MUD coders guild - the experience is fairly common, as most folks try to build a MUD from scratch, because it’s not so much about finishing a game as about learning from building the MUD; but we did notice that extracting or making ECS libraries/frameworks is where most MUD projects go to die.
A video game studio (WindFish Studio · GitHub ) found ecstatic a few years ago and tried to build a fairly ambitious project - some kind of world-scale simulation, IIRC - but I think they eventually ran out of funding to make the game.
Very interesting. What was the plan for the UI (frontend) for dwarlixir?
I feel like this is a big minus for developing games in Elixir. Not many options for rendering and building native apps.
I’m thinking about some terminal UI like bracket-lib, or even something more advanced, such as macroquad.
I’m building my multiplayer game with Phoenix & LiveView. But I really think Elixir would be a great choice for making games like Caves of Qud or Cogmind.
Well, I am terrible at user interfaces, so I was going to make it a very simple command-line interface. And if you think that was probably going to be unplayably messy, you’re probably right