Skip to content

CC 3.5.1 - Scene Swap Performance is slow #11503

Open
@Ronsku

Description

@Ronsku

Use Case

Related to this ticket: #10935

I use multiple scenes per game to keep everything organized. Just as an example, let's say you are playing a 2D overview game and walk into a door, you run a quick animation that opens the door (covering the whole screen with something) and swap scene mid animation where screen is covered by the animation. This animation could be ran on a persistent node above both scenes. This would make it possible to create a smooth transition from one scene to another.

Problem Description

Now, depending on the device you are running on the next scenes instantiation could take 100ms or 1000ms you cannot run it mid animation, instead you have to separate the animation into something

Run a "open animation" that covers the screen
Wait for scene swap (100ms 1000ms or how long it takes)
Then run a "close animation" to remove the overlay that covers the screen to reveal the new scene.
Sometimes I've used fade to black 500ms animation, then stay at black until scene has swapped and fade back to from the black overlay in the new scene. Problem here is that I want the swap to be fast and smooth, 500ms fade to black, 500ms fade back to invisible overlay. But since it might take a long time to instantiate the next scene player might be stuck in a black screen for a few seconds wondering "what is going on..?"

Proposed Solution

This is why it would be amazing to just be able to "await preLaunch()" a scene that does all the heavy lifting and basically instantiates the scene for you in memory and when you then "launchScene()" it would be instant. The same way you would just toggle "node.active = true". And my workaround with placing a scene as persistent node solves this in an ugly way.

How it works

No response

Alternatives Considered

Make sure preloadScene() not only downloads the assets but also prepares the scene to be launched within a few milliseconds.

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Feature RequestNeeds TriageNeeds to be assigned by the teamOptimizationEnhancement in performance, usability, stability etc

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions