Jump to content

Pilluminati

Members
  • Posts

    10
  • Joined

  • Last visited

Pilluminati's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I added some additional benchmarks and made a pull request. Pretty good results, the biggest bottleneck seems to be the query method when there's a large amount of entities.
  2. Sweet! I ran the benchmarks on my machine and got these results: Components 622,440,815 op/s » count 39,752,941 op/s » index 33,749,710 op/s » mask ContiguousStorage 18,873,964 op/s » #get 21,130,211 op/s » #set 21,387,212 op/s » #delete 21,413,487 op/s » #destroy 819,545 op/s » #resize Suites: 2 Benches: 8 Elapsed: 11,387.23 ms
  3. If the wheel is square it has to be reinvented. Jokes aside, even if they weren't fullblown game engines I highly doubt as much thought and care has been put into their ECS part of the engine from a performance standpoint. It would be more accurate to call makr a library, and I think ooflorent has done a fantastic job on keeping the library user friendly without sacrificing performance.
  4. One thing I would like to see from makr v1 in v2 would be the group functionality. Say I want to get all entities with rigid bodies except the player entities. This isn't possible without doing ugly if checks on the entities (unless I've missed something). Of course I could implement this separately, but it would be cleaner simply having it included in the EntityManager.
  5. I was talking about the has method on the entities. I agree there's no good reason for the strings .
  6. Yeah it was just an example, but good to hear about the speedup nevertheless. I suppose it doesn't matter having the extra method there for people who need it for whatever reasons.
  7. Great news! Will try it out sometime soon and perhaps contribute if I find issues/needs. Btw, this is just a thought but instead of having to do if (entity.has('componentName')) { entity.get('componentName') } wouldn't it be cleaner just doing: var component = entity.get('componentName'); //returns false if not found if(component){ //do stuff } although this is already possible since it would return undefined if nothing was found and the condition would be falsey, so it might be unnecessary making it explicit. You would avoid the extra function calls although in cases where you'd have more failing checks it could be slower I suppose.
  8. As for feedback, it would be nice to be able to get an entity by its id. world.getEntityById(id) something like that perhaps? It would be helpful for networked games instead of having to monkey patch it.
  9. Hey, discovered your project after searching for CES for javascript. I like the emphasis you put on performance since I'm making a multiplayer game. How's the development going for v2? Any idea when it will be ready since I'd like to use it for my game?
×
×
  • Create New...