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

[Experimental, WIP] In-game scene editor #7261

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

4ian
Copy link
Owner

@4ian 4ian commented Dec 30, 2024

  • Add an "EmbeddedGameFrame" that displays a preview. This preview is in "game edition" mode, which for now does nothing apart from pausing the game and rendering the initial state of objects.
    • This is a working preview so it can actually be played using the debugger.
    • This works as a single iframe that is never moved at the background of the editor. Not moving it is important so that it stays loaded.
  • When the scene tab is changed in the editor, the editor is asking the "preview" to change scene (all previews, but only the "in game edition" previews follow the request).
    • Other previews can be run as usual.

TODO:

  • Reset/reload the embedded game frame if the game hot reloading failed.
  • Create a context for switching the scene and attaching the game frame?
  • Add an option to go back to the old editor (make this "editor" an opt-in choice)
  • Probably anything related to actual edition in another PR.

Some things could already be backported in smaller PRs:

  • Reworked debugger client/server to add a "status" to know if the game is paused or not. This fixes a bug where the Debugger tab would show something as run when it is paused.
  • Refactored prepareExporter method outside of a class.
  • async/await-ified hot reloading function.
  • async/await-ified launchPreview function in editor.
  • allow RuntimeScene render() method to run objects/layer pre-render methods.

@4ian 4ian changed the title [Experimental, WIP] Scene editor [Experimental, WIP] In-game scene editor Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant