-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Coroutines functionalities in the context of Minecraft #34
Comments
Q1 and Q2 are an interesting consideration. Android, JavaFX, and Swing are all GUI frameworks. In their contexts, thread safety is only needed when drawing onto the view. Minecraft, however, has both rendering and worlds requiring synchronization, with worlds having a server and client running in parallel. Any of them can pass for a Perhaps it'd be a better idea to add As for delays, the question here is behavior on dispatchers that don't implement Delay: the docs don't seem to state it explicitly, but the delay handler in this case is the DefaultDelay. I could only track down the execution so far after that. However, it'll eventually have to come back to the dispatcher and dispatch anyway, so the behavior will likely end up being rounding up to the nearest tick. I say implementing Delay, warning that it shouldn't be used in logs (can't do deprecation as we don't control the |
Is there a meaningful difference between server and client? The both only have a single thread for computation afaik, with client just running an integrated server |
In this case, one difference is how the dispatcher functions. I'm considering the following implementation: maintain an internal task queue for each main dispatcher, and when certain event happens like XxxTickEvents.START/END, these scheduled tasks get executed. So the difference here is where the tasks run. For example, client may run tasks that are still available outside gameplay like screen rendering. |
This is what I mean to do at first place. (Can you explain the reason to seperate
A seperate function for ticks is needed so users don't get confused by the behavior. Normal |
My impression was client-side rendering and world ticks still run on separate threads, so they are separate contexts. I might be wrong on that, but if so, running rendering code on a world thread would slow the ticks down, while vice versa would result in concurrent modification. |
Bringing this up again, for Q1 something that would make sense would be the ability attach jobs to specific objects with their own lifecycles so, i.e, you could attach a Ive had a few cases now where my |
Generalize this topic in order to welcome other coroutine related ideas. |
A |
Something that occurred to me, is there any we can write this where it wont explode with those various "Minecraft but with more threads" projects? They are, unfortunately, somewhat popular and I suspect we'll run into issues at some point with them. |
This thread is all about upcoming coroutine functionalities. Please share your thoughts regarding the following topics.
Topic 1 - Dispatchers.Main
Soon we would have
Dispatchers.Main
been implemented as a supplement to other dispatchers. A few questions I'd like to ask before diving into it.So I'm looking into kotlinx.coroutine for reference. However only UI related implementations (Android Event Loop, JavaFX, Swing) are found.
The text was updated successfully, but these errors were encountered: