Code Monkey home page Code Monkey logo

Comments (3)

OvermindDL1 avatar OvermindDL1 commented on May 18, 2024

For note, my 'Aspects' only defined where they looked in the Aspect cache. If someone in my system creates an Aspect.match<HealthComponent, DamageComponent>, Aspect.optional>() it just returns a single pointer into the aspect cache, the cache itself was a recursive map of maps with keys of component atoms/ids and values of the matched ones with sub-matches with other components requested. You 'should' create any Aspects as early as possible as the first time a certain matchspec is defined it will iterate over all entities to see which go in, but from then on that cache is kept up to date among all aspects that match on the same matchspec.

The old system I based the style off of (Artemis, don't bother looking at it, this was the only good part about its system) used each Aspect as its own cache and they just registered event handlers to hear when components were added/removed, which caused more indirect function calls compared to mine.

Plus duplicated data

from specs.

OvermindDL1 avatar OvermindDL1 commented on May 18, 2024

I just looked in the Tables library a bit more (I still have so much more to learn about rust syntax, I have the ideas, but just the syntax... >.>), looks like it would work very well as a backing store while also using Aspects, they are not competing concepts but rather seem to attack two different issues in their own efficient ways. Perhaps they should both be integrated.

from specs.

kvark avatar kvark commented on May 18, 2024

Fixed by #29

from specs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.