-
Notifications
You must be signed in to change notification settings - Fork 199
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
Async improvements + Async Inn Sequence #1887
Conversation
RFC: Is there any way to combine this with the Async code we have for emscripten or do you consider them too different? |
Which async code are you referring to specifically? This one is a sort of poor mans way of turning our game loop into a resumable co-routine. |
I mean the Async code for downloading files that emscripten calls (async_handler.cpp) |
They already kind of work together since file IO works the same as animating transitions. Do we have any case where we would need to suspend and resume the game loop at a specific point for a file load? I could add an It would likely cause the game to stutter though, as everything would have to freeze in the middle of the frame until the IO finishes. As far as I'm aware, most things in the game logic don't depend on file IO to be done and are fine waiting until the end of the frame. Things that are dependent, such as:
Would be better served using another method, such as an |
No, we already suspend via "ImportantFilePending" when the game loop returns and for non-important files which don't suspend there is code which delays rendering operations on these files (e.g. when Width/height are necessary), but update code still runs as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a full review just what I saw on first glance
ea3aee1
to
33e7502
Compare
I pushed another change which creates a This will enable #1891 to be implemented using this same machinery. |
Redid the inn test cases. This is ready again |
I took out the async |
50c2ba5
to
3b640ed
Compare
* Add AsyncOp to encapsulate async operations info * Remove async globals from interpreter * Remove transition game_temp vars
"It will be 1 Gfor the night" -> "It will be 1G for the night"
Depends on #1742The PR has 2 goals:
transition
game temp varsTest Cases of #1689