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

Started wire entity memory sync class #2979

Closed
wants to merge 11 commits into from

Conversation

thegrb93
Copy link
Contributor

Will also require stringstream class

lua/wire/wirenet.lua Outdated Show resolved Hide resolved
lua/wire/wirenet.lua Outdated Show resolved Hide resolved
lua/wire/wirenet.lua Outdated Show resolved Hide resolved
@Denneisk
Copy link
Member

Denneisk commented Feb 7, 2024

Is this meant to be a replacement for NetworkVars?

@thegrb93
Copy link
Contributor Author

thegrb93 commented Feb 7, 2024

Is this meant to be a replacement for NetworkVars?

No, it's for entities that sync their 'memory' variable to client

@thegrb93
Copy link
Contributor Author

thegrb93 commented Feb 7, 2024

The only problem I foresee with my current approach is that it doesn't preserve write order or writing over a memory address multiple times, which I imagine may cause bugs in some entities. Maybe need to remove those optimizations.

@thegrb93
Copy link
Contributor Author

thegrb93 commented Feb 7, 2024

Or maybe make a WireLib.MemoryTrackerPreserveOrder version of WireLib.MemoryTracker

lua/wire/wirenet.lua Outdated Show resolved Hide resolved
Copy link

This pull request has been marked as stale as there haven't been any changes in the past month. It will be closed in 15 days.

@github-actions github-actions bot added the Stale label Mar 29, 2024
@github-actions github-actions bot removed the Stale label Apr 16, 2024
Copy link

This pull request has been marked as stale as there haven't been any changes in the past month. It will be closed in 15 days.

@github-actions github-actions bot added the Stale label May 17, 2024
@thegrb93
Copy link
Contributor Author

Not really happy with this. I think I should've done a queue per entity instead of globbing all the entity data together. Also I don't have the energy to do the memory playback management for each entity that syncs its memory.

@thegrb93 thegrb93 closed this May 28, 2024
@thegrb93 thegrb93 deleted the net-rework branch May 28, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants