Standardize control flow between engine subsystems #1500
Labels
code quality
Does not alter behavior, but beauty of our code
improvement
Enhancement of an existing component
lang: c++
Done in C++ code
We could improve the way individual subsystems in the engine (presenter, renderer, gamestate, networking, ...) talk to each other by using a standardized method for all communications. For this to work, we would need to define how data should be sent, fetched or manipulated during transfer and find a flexible solution that is reusable for all subsystems.
The main benefit of this would be less maintanance (since we don't need to figure out a new solution for every subsystems) and better code readability. It should also improve thread safety as the subsystems usually run in their own threads and communication between them form a critical path. We also want to minimize interdependencies between subsystems as much as possible.
#1492 and #1497 already address parts of this issue by handling communication in dedicated objects and using a one-way control flow.
We can use other implementations as a reference, e.g. https://developer.android.com/kotlin/flow
The text was updated successfully, but these errors were encountered: