Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to buffer commands #88

Merged
merged 39 commits into from
Aug 26, 2024
Merged

Add the ability to buffer commands #88

merged 39 commits into from
Aug 26, 2024

Conversation

memorycode
Copy link
Contributor

@memorycode memorycode commented Jul 16, 2024

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 memorycode marked this pull request as draft July 16, 2024 03:25
@memorycode
Copy link
Contributor Author

CI will pass with #89

@memorycode memorycode marked this pull request as ready for review July 18, 2024 20:40
@memorycode memorycode requested a review from a team July 18, 2024 20:43
lib/Loop.luau Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Show resolved Hide resolved
lib/World.luau Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
testez-companion.toml Outdated Show resolved Hide resolved
@LastTalon LastTalon requested a review from a team July 25, 2024 19:10
lib/Loop.luau Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
@LastTalon
Copy link
Member

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?

@memorycode
Copy link
Contributor Author

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.

lib/World.luau Outdated Show resolved Hide resolved
lib/World.luau Outdated Show resolved Hide resolved
Ukendio
Ukendio previously approved these changes Aug 7, 2024
@memorycode memorycode mentioned this pull request Aug 9, 2024
@memorycode memorycode removed the request for review from LastTalon August 26, 2024 16:30
@memorycode memorycode merged commit c3a88a6 into main Aug 26, 2024
6 checks passed
@memorycode memorycode deleted the buffer-commands branch August 26, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants