GithubHelp home page GithubHelp logo

Comments (6)

Nukesor avatar Nukesor commented on July 28, 2024 1

I just opened a new branch and wrote the exclude logic for engine:checkRequirements: #72

Anyway this feature request isn't as easy as it looked like.
I think we need to rewrite some parts of the Entity assignment functionality inside the engine for this feature. The biggest problem I see right now is the componentRemoved functionality.
The initial assignment of Entities for Systems with exclude should already be working, but this needs some testing.

from lovetoys.

raffomania avatar raffomania commented on July 28, 2024

Interesting, how would this differ from not including "ExcludedComponent" in System:requires()?

from lovetoys.

Nukesor avatar Nukesor commented on July 28, 2024

In case you got an Entity with ['CompA', 'CompB', 'CompC']. Now there is a System which requires ['CompA', 'CompB'], but doesn't want Entities with CompC.
This is actually a good idea, but we never encountered a scenario, where we needed this.

from lovetoys.

Ander456 avatar Ander456 commented on July 28, 2024

wow, happend to see this repo, good job guys. the 'ecs' is what i want , i just want to use this framework to develop my game , ew... how can i communicate with you guys? like a gorup ?

from lovetoys.

hbiblia avatar hbiblia commented on July 28, 2024

If instead of doing an: excludes, it is better to create operators something like "!" .

! = Select all entities with one of these.

function MoveSystem:requires()
      return {"position", "!velocity"}
 end

It would also be good to change requires by filter

from lovetoys.

raffomania avatar raffomania commented on July 28, 2024

I think the most flexible solution here would be to add a new method like requiresEntity that gets passed one entity at a time, returning a boolean that indicates whether this entity is required by this system or not.

from lovetoys.

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.