Loading Screen (Static Picture)

Brief description: I will show you how to make a loading screen for change scene,
because if your game have huge/many resource to load in that scene,
the scene will black screen several seconds before material appear because of loading resource

Requirements: -

Step by step​

1. go to Component_SceneBehavior
1668951329705.png

like this, and you will see code like this
1668951381533.png

2.scroll down to line 107 or prepareLoadingScreen
1668951950236.png


3. add this code to line 118
Code:
else
            # Static Picture
            bitmap = new gs.Bitmap("Graphics/Pictures/other/loading_screen")
            @loadingBackgroundSprite.bitmap = bitmap
            @loadingBackgroundSprite.srcRect = new gs.Rect(0, 0, 1920, 1080) # Picture Resolution
1668951973867.png


at the line 120
"Graphics/Pictures/other/loading_screen" loading_screen is a picture that you want it to be a loading screen for me use this picture
loading_screen.png


at the line 122
@loadingBackgroundSprite.srcRect = new gs.Rect(0, 0, 1920, 1080)
1920 and 1080 recommend to be a picture resolution but you can try another width and height

4.go to line 129 or clearLoadingScreen
1668951910717.png


5. insert this code between line 132 and 133
Code:
else
                @loadingBackgroundSprite.bitmap.dispose()
1668952070072.png


NOTE: for this step is unnecessary because if not have this code it still work, But I add this for avoid memory leak

6. hit save button and go test ( it's work! )


Lastly​

I try to make loading screen with .webm or .gif too but it not work, I hope in future I can do that

Original thread: https://forums.rpgmakerweb.com/threads/loading-screen-static-picture.152791/