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

Implement chunk save/load #3

Open
wants to merge 23 commits into
base: Network
Choose a base branch
from
Open

Implement chunk save/load #3

wants to merge 23 commits into from

Conversation

harrynull
Copy link
Member

Untested
Do not merge.

@DWVoid DWVoid added this to Done in Get things working Feb 12, 2019
@DWVoid DWVoid moved this from Done to In progress in Get things working Feb 12, 2019
@DWVoid
Copy link
Member

DWVoid commented Feb 12, 2019

@harrynull only one question. Does it work properly or is this just a procedural practice?

@DWVoid
Copy link
Member

DWVoid commented Feb 12, 2019

And please consider async IO API as we are dealing with protentially tens of megabytes of data per second and it is not a good idea to jam the worker thread for this

@harrynull
Copy link
Member Author

It's totally untested as the game was crashing at the time I implemented it.
As for the Async IO, I thought that the workers for read-only tasks are automatically multithreaded...

@DWVoid
Copy link
Member

DWVoid commented Feb 12, 2019

@harrynull Yes, they are multi-threaded, but the implementation does not take system calls into account, so it will block the execution thread. There is no good cross-platform solution for this, so better do it explicitly.
I did notice currently the game might crash upon startup, but I just cannot reproduce it often enough with the debugger attached so that the problem can be located. Maybe it could just be a timing issue, or it might be a problem with the network 'GetChunk' protocol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Get things working
  
In progress(This Repo)
Development

Successfully merging this pull request may close these issues.

None yet

3 participants