matter icon indicating copy to clipboard operation
matter copied to clipboard

Add the ability to buffer commands

Open memorycode opened this issue 1 year ago • 3 comments

Proposed changes

This PR adds an optional command buffer to Matter's registry. The command buffer caches insertions, removals, spawns, and despawns until explicitly told to apply them. It is enabled by default if you use a Loop and will commit changes between systems.

The old system that prevented iterator invalidation has been replaced with this, but that is not the only motivation for a command buffer.

Related issues

TODO

Additional comments

This is a fairly breaking change even if you don't elect to use it. Educational materials will be important

memorycode avatar Jul 16 '24 03:07 memorycode

CI will pass with https://github.com/matter-ecs/matter/pull/89

memorycode avatar Jul 16 '24 17:07 memorycode

I am unsure, so I didn't mention anything in review, but it seems like we fail at tracking the correct size of the world in some places.

Can you double check this? And do we have tests for this?

LastTalon avatar Jul 26 '24 02:07 LastTalon

I am unsure, so I didn't mention anything in review, but it seems like we fail at tracking the correct size of the world in some places.

Can you double check this? And do we have tests for this?

I've checked and I believe everything is fine - I've added a test for this in deferred mode.

memorycode avatar Jul 27 '24 19:07 memorycode