The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

The title says it all. When I do a test play when I put in an image with either a vertical width or a width of 10000px, it takes a lot of time to start up. I changed that image from PNG to WebP but the result did not change. How can we solve this kind of problem?

Images:
https://drive.google.com/file/d/1ro54t38xZClmWI9Kdb-PxOs-uEMMLuDh/view?usp=share_link
https://drive.google.com/file/d/1jKa6zPOPXVKsLlPgWrcF5UK_2Vfv9kO2/view?usp=share_link
https://drive.google.com/file/d/1veUkJpTTDOtAZJ-LWN8M8GpXNYFjeK5P/view?usp=share_link

Godot version 3.5.2
in Engine by (12 points)

1 Answer

0 votes

When you "include" the image in the screen, it needs to be loaded from disk which can take a lot of time (especially with images that big).
What you could do is instead just have the resource path to your image. When the screen needs to be shown, you can start loading in the image in a separate thread and only add it to the screen when it's loaded.
Alternatively you can try to anticipate when the screen will be required and start loading the image beforehand (again the key is to do it on a separate thread).

by (1,957 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.