Construct Time #3: Loading screens

4

Tagged

Features on these Courses

Stats

2,952 visits, 4,101 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 24 Feb, 2020.

Today I come back with a new Construct Time: a loading screen !

First of all, the file is publicly available on my Patreon: patreon.com/posts/34192987

Making a simple loading screen in Construct 3 is very easy, and that's thanks to the great new image loading actions Construct 3 added.

How it works

All you need is one Global variable, and one built-in Function.

Here, we make use of the fact that built in functions are available everywhere in the project, even without including the event sheet.

When you call a built in function from outside it's event sheet, you can only access the global scope and the function's scope. Trying anything that reaches outside of the scope of the function in the local scope of the event sheet (like setting local variables etc) will not work.

We make use of that to have code that will only run on the LoaderLayout right next to code that can be executed from anywhere.

Everything else is very simple to understand: the Go To Layout function sets the global variable that keeps in mind the layout to load, and then sets the current Layout to the LoaderLayout.

All the LoaderLayout does is load the images from the target layout and show the progress on a progressbar, and when it's done, goes to the target layout.

  • 5 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • thanks!

    Do you think this Loading is async?

    Because I didn't notice stutter/jank when loading and unloading during gameplay.

  • Hello,

    Am I right in assuming that there can be no images in the LoaderLayout itself? The progress bar is also not displayed in the loader layout but in the button in the layout. Is that correct? Or how exactly does the call function work?

    • You seem to be confusing loaderlayout with in game loading screens, which is what my tutorial is about.

      Loader Layouts are a Construct 3 feature for showing something while the game is still loading in the background. My tutorial is about making custom loading screen inbetween levels while the game is running. Both, while similar, are used in different contexts. For more info about Loader Layouts, good practices and their limitations, please read the official tutorial about them:

      construct.net/en/tutorials/loader-layouts-custom-loading-9