Coder Social home page Coder Social logo

Comments (5)

eliasku avatar eliasku commented on May 29, 2024

Hi !

Yes, _dirtyVector is just hard-coded (for performance reason) event stream, with ENTITY_TRANSFORM_COULD_BE_DIRTY, each with entity ID data.

I want to do something like ? in annotation of Family to mark component as optional. But for now just dont include these component to Family, and check them with component storage instance getted with Wire.

So for example you have:
Family<Transform, Renderable> // ?Scissors component is optional
then you just have
Wire<Transform>
Wire<Renderable
and
Wire<Scissors>

Family guarantee that Transform and Renderable will be attached to each listed entity.
But you can check for each of them is Scissors component is also attached or not:

var scissors = _scissors.get(child);
if (scissors != null && !processScissors(entity)) {
    // entity fully clipped by scissors
    child = _node.__getNextSibling(child);
    continue;
}

from ecx.

eliasku avatar eliasku commented on May 29, 2024

@patternspandemic also remember, ecx is in progress, and maybe not the best suitable ECS-framework for first experience :)
But I realised that you have got a lot, that's nice.

from ecx.

eliasku avatar eliasku commented on May 29, 2024

I've added optional component notation:

var _entities:Family<Transform, Node, Renderable, (Scissors)>;

Scissors component are not required in example, but family declaration becomes more readable from some point...

from ecx.

OvermindDL1 avatar OvermindDL1 commented on May 29, 2024

Well I've been playing with ecx with Kha as the rendering side and it works wonderfully. :-)

from ecx.

patternspandemic avatar patternspandemic commented on May 29, 2024

I want to do something like ? in annotation of Family to mark component as optional.

This was the first thing I tried, and figured it simply wasn't implemented yet.

also remember, ecx is in progress, and maybe not the best suitable ECS-framework for first experience :)

Actually, I found the Wire capability allowed me to choose / experiment / switch between: easily getting things to work and having a more decoupled, 'pure' separation setup. AutoComp is great too, even if not being the first choice for performance. I am no where near having enough experience to worry about that :)

The optional component notation should help keep things clear, thanks.

Well I've been playing with ecx with Kha as the rendering side and it works wonderfully. :-)

I'm using Kha as well, and found Service injection an easy way to pass around a canvas for systems to render to, as well as hook together Kha's scheduler and ecx-common's SystemRunner. Whether that's a great way to do it, not sure. But it works great for me so far!

Cool stuff!

from ecx.

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.