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

Send events from the render world to the main world #18491

Open
IceSentry opened this issue Mar 22, 2025 · 0 comments · May be fixed by #18517
Open

Send events from the render world to the main world #18491

IceSentry opened this issue Mar 22, 2025 · 0 comments · May be fixed by #18517
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes

Comments

@IceSentry
Copy link
Contributor

IceSentry commented Mar 22, 2025

What problem does this solve or what need does it fill?

In some situations, we need to communicate data back to the main world from the render world. This is a non trivial thing to do because of the async nature of the main and render world split. The solution is to use channels, but it's not easy to manage for less advanced users.

The gpu readback feature shows that passing data between these worlds is possible but it's a purpose built abstraction.

What solution would you like?

One possible solution would be to have some kind of RenderEventWriter/RenderEventReader plugin that creates a channel between both worlds and sends any render event to the main world by polling the channel in the main world.

What alternative(s) have you considered?

Tell users to write their own channel.

Additional context

We often get comments that the render world is hard to work with because it's hard to communicate data back to the main world. In some cases it comes from a misunderstanding of how the render world is intended to be used, but there are various valid reasons to want to pass some data back to the main world.

@IceSentry IceSentry added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled A-Rendering Drawing game state to the screen D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes and removed S-Needs-Triage This issue needs to be labelled labels Mar 22, 2025
@ecoskey ecoskey linked a pull request Mar 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant