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

Context isolation #24

Open
arthuro555 opened this issue Nov 8, 2022 · 0 comments
Open

Context isolation #24

arthuro555 opened this issue Nov 8, 2022 · 0 comments
Labels
🐛 Bug Something isn't working ✨ Feature New feature or request 📈 Improvement Further work to make an existing feature even better
Milestone

Comments

@arthuro555
Copy link
Owner

The server and client may run on the same game instance when the server is not running as a dedicated server. This is problematic, as client events can interfere with the game state that is synced with everybody, causing all kinds of issues.

The server should:

  • Run in another context (instance of the scene) than the client, so that anything done on the client does not touch the true server state
  • Not run code for rendering
  • Run the server update loop independently from the client, so that it continues running even if the game window is not visible (an issue rn due to how the GDevelop rendering event loop is made)

To do so, we'll probably want to create a web worker, where we load the game and hot-patch it with the patches from https://github.com/arthuro555/cloud-gdjs as to not use any render code. Communication can be done through normal THNK serialisation over worker message APIs.

@arthuro555 arthuro555 added this to the THNK Beta milestone Nov 8, 2022
@arthuro555 arthuro555 moved this from 🆕 New to 📋 Backlog in THNK Roadmap Nov 27, 2022
@arthuro555 arthuro555 moved this from 📋 Backlog to 🔖 About to do in THNK Roadmap Dec 4, 2022
@arthuro555 arthuro555 moved this from 🔖 About to do to 🔙📋 Backlog in THNK Roadmap Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working ✨ Feature New feature or request 📈 Improvement Further work to make an existing feature even better
Projects
Status: 🔙📋 Backlog
Development

No branches or pull requests

1 participant