Coder Social home page Coder Social logo

Automatically add Systems about engo HOT 6 CLOSED

engoengine avatar engoengine commented on July 19, 2024
Automatically add Systems

from engo.

Comments (6)

matiwinnetou avatar matiwinnetou commented on July 19, 2024

I would say this is ready advanced feature if ever to do. Our ECS at work doesn't even come close to this.

There is also element of magic with this so I would be really skeptical and overall I would be careful with this feature.

from engo.

paked avatar paked commented on July 19, 2024

I really would like this. I think it removes so much user error.

from engo.

EtienneBruines avatar EtienneBruines commented on July 19, 2024

@paked do we want this for all (possibly user-defined) Systems, or just for the ones engi has? (i.e. RenderSystem, AudioSstem, ...)

from engo.

EtienneBruines avatar EtienneBruines commented on July 19, 2024

Now that we have scenes, I think we could define some kind of AddDefaultSystem?

Usage:

engi.AddDefaultSystem(&engi.RenderSystem{})

And for each Scene that gets created, that same engi.RenderSystem could get reinitialized, without having to specify "I want a RenderSystem", for every Scene.

Downside

i.e. the RenderSystem is kinda state-dependent: it needs a list of Entitys to work with, and that changes from Scene to Scene. So maybe we need to work with some kind of initializer, of type func() Systemer or something.

engi.AddDefaultSystem(func() Systemer { return &engi.RenderSystem{} })

from engo.

paked avatar paked commented on July 19, 2024

@EtienneBruines I don't think this is worth it. We are leaving ourselves open to a lot of confusion IMO.

from engo.

paked avatar paked commented on July 19, 2024

This should be closed unless you have another idea.

from engo.

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.