Ezelia Posted September 2, 2013 Author Share Posted September 2, 2013 while I'm experimenting ECS, I think the reason of lack of such engine is simply because Entities Systems are more a concept than a Framework. looking for an ECS Engine/Framework is like looking for an POO Engine/Framework, it doesn't make sens the base of my current ECS implementation is composed of 4 little files, those files are just helpers to make job easier.I resolved all my performance issues with my "scheduler" approach, instead of having dumb loop I have a module (the scheduler) witch handles priorities and reduce iterations to only needed entities. so IMHO, you'll still have to write it from scratch because event with ECS frameworks you'll have to write all data objects (components), assign them to entities and write game logic (subsystems) ... actually you are juste writing the whole game Quote Link to comment Share on other sites More sharing options...
Larzan Posted September 2, 2013 Share Posted September 2, 2013 I don't know if i agree with your statement that it is the same as OOP, as with ECS the trick is to manage the internal references to optimize the processing speed. I have seen quite complicated implementations of that, although i don't think it'd make a difference in moderate use-cases, but i think this is the operative point in thinking of a general framework. I agree that the work will be done by implementing the actual entities and components, but i still think it makes sense to have a general library that handles the component entity system interaction in a good and fast way... Well, maybe i will just invest the time to do it myself, but as i said i am not so knowledgeable i JS optimization, so i'd prefer to let some better suited person deal with that Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 2, 2013 Author Share Posted September 2, 2013 the point is, in javascript games you have two things to optimise, the objects you handle : ECS simplifies this since eveything is entity it makes it easier to handle them with object pools ...etcthe other thing is the rendering loop, and here, everything good for classic OOP games is good here too.my approach to speedup things is that each subsystem maintain a list of entities it handles (and only those ones).when I add a component to an entity, I check witch systems should manipulate that component and attache the entity to the subsystem. so in my implementation, adding/removing component to entity is a little costy, but those operations are "rare" , rare here means I don't add/remove thosand of component in each rendering loop so I end up with extremely fast subsystems loop, and a bigger renderer loop (since it'll handle the biggest entities list). Quote Link to comment Share on other sites More sharing options...
Mike Posted September 2, 2013 Share Posted September 2, 2013 Hey I like the topic since I first started learning and using CraftyJS but ... I hit performance problems too soon. So I went and check how Entity Component Systems works and I found several implementations like: JAVA - Artemis - http://gamadu.com/artemis/ AS3 - Ash - http://www.ashframework.org/ So what i decided to do was to make JS ports ... well TS ports as both implementation got a class structure and other interesting concepts which i found a bit harder making in pure javascript... So what i made is: https://github.com/MikeMnD/AshTS https://github.com/MikeMnD/ArtemisTS Beside that I think Crafty way of doing things is not optimal and i like Ash concepts more. Also i steped back from Entity Systems because they are far too complex for my first needs, and also because what i look in HTML5 game engine at the moment is: 1. Performance2. Structure3. As much Bug free as posible... Also i like building engine/frameworks but I want to build games mainly ECS is complex and maybe is the best option for bigger and complex games but for now i think performance and features are more important for game making community than scalable and superb strucutred games... Well it's always the goals we want that define the way we do it. I'll be happy if you(Ezelia) or someone else from this topic check my code (there is compiled JS which a pretty good) and than we can discuss concepts. Great topic btw. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 3, 2013 Author Share Posted September 3, 2013 hi MikeI already tested Ash and since I'm using TS a lot I saw your port on github actually Ash is the best one I tested, I was not able to make your TS port working (maybe because I updated to TS 0.9.1 witch also broke some of my projects), but I tested another js port https://github.com/brejep/ash-js what I don't like about Ash are "nodes", they add a layer of complexity to the ECS imo, maybe I'm wrong, maybe they make things easier in some situations or maybe they make sens in AS3 but not necessary in JS.I'm polishing my ECS implementation witch is also written in TS, but I'll need some documentation and some examples ... I'll share my code when I get something presentable Quote Link to comment Share on other sites More sharing options...
4ucai Posted September 13, 2013 Share Posted September 13, 2013 there is also this http://www.playcraftlabs.com/ which uses ECS, i've tried it and it looks good but till lacks major tooling, plugins unlike phaser. Quote Link to comment Share on other sites More sharing options...
ooflorent Posted September 13, 2013 Share Posted September 13, 2013 My js13kgames entry uses an ECS.More details here: http://www.html5gamedevs.com/topic/1346-floor-thirteen-—-js13kgames-entry/?p=8922 Quote Link to comment Share on other sites More sharing options...
mavericknl Posted November 28, 2013 Share Posted November 28, 2013 hi MikeI already tested Ash and since I'm using TS a lot I saw your port on github actually Ash is the best one I tested, I was not able to make your TS port working (maybe because I updated to TS 0.9.1 witch also broke some of my projects), but I tested another js port https://github.com/brejep/ash-js what I don't like about Ash are "nodes", they add a layer of complexity to the ECS imo, maybe I'm wrong, maybe they make things easier in some situations or maybe they make sens in AS3 but not necessary in JS.I'm polishing my ECS implementation witch is also written in TS, but I'll need some documentation and some examples ... I'll share my code when I get something presentable I totally agree om you saying the nodes are basicly added complexity, do you have a github ink of your ECS system? Quote Link to comment Share on other sites More sharing options...
ooflorent Posted December 2, 2013 Share Posted December 2, 2013 Maybe you should have a look at this:http://www.html5gamedevs.com/topic/1417-makrjs-%E2%80%94-an-entity-component-system-engine/ Quote Link to comment Share on other sites More sharing options...
Ezelia Posted January 10, 2014 Author Share Posted January 10, 2014 Hello all just wanted to let you know that I open sourced my current implementation of ECS : https://github.com/Ezelia/eeethis is what I'm using for my current games.I didn't want to release it without complete doc and real examples, but this can take me a while.so I decided to release it with a minimal demo and a work in progress (very basic at this stage) documentation : https://github.com/Ezelia/eee/wikiI'll update the documentation and add other demos to demonstrate features implemented : the current demo is only here to show you how to start, sorry for some bad practices .the engine is developed in TypeScript, but is usable in pure JS (I'll post pure JS demo later).you'll notice some "unnecessary" syntax some times, but they are here to profit from TypeScript type cheking and intellisens, it'll make sens to people who like this language .I'll make a separate topic when the full doc + examples are ready. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.