Comments (3)
Could maybe copy the whole world, then asynchronously work on it over time, a little bit each tick?
Not familiar with what maintain does though, just spitballing from what you said here.
from sim-ecs.
Not familiar with what maintain does
This ECS works with the optimization, that each system carries a cache containing all entities it has to work on. This makes execution very fast, since you don't have to join or match anything, the dataSet
is already available when system.run()
executes.
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
So, you still have to make sure to keep the caches in sync with whatever happens in your world, and that's where world.maintain()
comes into play. It syncs entities in the world with the systems' caches. This allows you to prepare changes to the world during one step and then sync them on the transition to the next step, which guarantees that all systems always work on the same entities per step. Having that work stretch out over several steps would mean that you unexpectedly have to wait for entities to hit your systems, instead of having them in there the next step guaranteed.
And that's also why I think that the only optimization for stretching out work would be to focus the syncing on systems which are actually in use (which is defined by the state - if you don't work with states, per default, all systems will run).
from sim-ecs.
world.maintain was removed in favor of auto-syncing changes in cache at save points
from sim-ecs.
Related Issues (20)
- Separate scheduling from World HOT 1
- centralized run criteria for systems HOT 1
- Implement hook-points HOT 2
- function-based systems HOT 1
- Implement support for Array-Components HOT 1
- Sync-Point ergonomics HOT 1
- Implement async error handling (when a system throws/rejects)
- Add Madge as post-build-step HOT 1
- Investigate Deno (again) HOT 3
- I really like this git repository ! Why is insertion very slow ? HOT 1
- Rename `findWorld()` to `getWorld()`
- Create shorthand aliases for long `with...()` methods
- Add convencience methods to Query, like `filter`, `sort`,... HOT 1
- Make components Objects-of-Arrays (like BitECS) HOT 1
- Add snapshots
- Investigate preformance regression on master HOT 1
- Update Benchmarks
- Implement HMR functionality
- It feels like benchmarks are missing the point HOT 6
- Integration with ecosystem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sim-ecs.