You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is hugely performant for very fast updates and anything that can be expressed in 2D
"data passing" - observables, passed via postMessage-style events I called "channels". Render thread only receives updates to observables they subscribe to, not all of them. Components that listen to these should unsubscribe from the channel after they unmount.
this is less memory efficient but it's far easier to use
ObservableDict allows you to observe both a specific key or the entire dict itself.
Problem
This above is kinda clunky and primitive, since what we really want is an "entity system" that can:
have references to each other (game cell -> pop for instance)
easily send updates to the render thread
work with the game loop
use as little memory as possible
Proposal
Entities have an ID and a type.
Entities have an ObservableDict called data whose values can be anything JSON serializable, or special types which we define, one of which is a Reference object to another Entity (more will probably be added later)
Open questions
Should entities have references, or should a "manager" class hold the references?
Is the above proposal too memory inefficient?
should attributes be defined as observables that belong to an entity, which is simply an ID number in a lookup table? (this is called an entity-attribute system). This might be more flexible, and better allow for references.
Background
Problem
Proposal
data
whose values can be anything JSON serializable, or special types which we define, one of which is a Reference object to another Entity (more will probably be added later)Open questions
Related
The text was updated successfully, but these errors were encountered: