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

Fixed main menu level having to load all other levels #422

Merged
merged 1 commit into from
Apr 2, 2023

Conversation

Malcolmnixon
Copy link
Collaborator

The teleport object originally used a PackedScene to let the developer specify which scene to teleport to. This was wasteful as it resulted in the main menu having to import all other scenes. This pull request replaces the PackedScene with just a file-path string to the tscn file.

…This saves the main_menu_level having to load all scenes at startup.

Minor cleanup
@Starkium
Copy link

I checked all this and while it "works", I'm not content with how hard the load stutter is. I think it'd be wise to create some asynchronous thread loading setup here instead.

@BastiaanOlij
Copy link
Member

I checked all this and while it "works", I'm not content with how hard the load stutter is. I think it'd be wise to create some asynchronous thread loading setup here instead.

It's supposed to be using asynchronous thread loading but I think that doesn't work well on Godot 4 yet as the new renderer has limited support for pushing data onto the GPU through a separate loading queue.

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find Malcolm, indeed using packed scene preloads everything so all our demos are suddenly in memory. Not an ideal situation by a long shot.

I figure this will work well on Godot 3 but have some issues in Godot 4 that need to be fixed upstream.

@Malcolmnixon
Copy link
Collaborator Author

Any "large" game cannot load all the scenes in memory at the same time. As such even though this causes stuttering when loading in 4.0, I agree the correct solution is to fix the Godot 4 asynchronous loading.

@Malcolmnixon Malcolmnixon merged commit 63f75a7 into GodotVR:master Apr 2, 2023
@Malcolmnixon Malcolmnixon deleted the teleport-scene-path branch April 2, 2023 17:01
@BastiaanOlij BastiaanOlij added this to the 4.1.0 milestone Apr 22, 2023
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.

3 participants