How to preload resources and show a progress bar?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By cpodgell

Hi there, I’m quite new to godot.

One thing I’ve noticed is that if I have a large PNGs in animated sprites, when they are first loaded it gives a huge amount of lag.

I obviously need to pre-load them/buffer them somehow, but I’d obviously like to do that before the level is created.

So I need a loading screen. How can I know when all the resources are loaded to allow the level to begin?

I’m not sure how I should do this and cannot find an answer anywhere.

:bust_in_silhouette: Reply From: Zylann

You might want to load the scene in background while showing a loading scene. I never experimented that myself, but there is an article about it in the docs, explaining how to use ResourceInteractiveLoader along with threads: Background loading — Godot Engine (3.0) documentation in English

Yea I read that document. I didn’t understand it and researched more. Even tried implementing it and get a bunch of errors. If I can’t udnerstand what I’m doing I can’t fix it haha

Not a lot of information on it, which is very surprising to me.

cpodgell | 2019-01-11 16:07