Game freezes instead of showing loading progress

Get help using Construct 2

Post » Mon Jun 17, 2013 3:51 pm

My project has 4 layouts:
[1: Choose language]
[2: Choose character]
[3: Game]
[4: End screen]

I've read the loading documentation, which says: "The rest of the project loads while showing the loader layout."

Am I right that everything should be loaded before the first layout is shown if "Use loader layout" is set to "No"?

Now, when I choose the character in layout 2, everything freezes (animations stop) for a few sec, then layout 3 is shown. I only get a loader at the start of the project but it seems to be loading the first layout only.

Or I don't get the loading concept or somethings wrong.clouddesign2013-06-17 15:52:32
B
4
Posts: 9
Reputation: 220

Post » Mon Jun 17, 2013 4:39 pm

Everything is downloaded (to the hard drive) during the loading screen - either a custom loader or the default one.

However, the actual artwork hasn't yet been loaded into system memory - this only happens when the object appears in a layout for the first time. So what's happening is you're loading a ton of artwork and animations into memory in your third layout, which takes a few seconds to happen, depending on the speed the PC it's running on.

To avoid this sudden lag, I suggest loading some in-game artwork during your first two layouts. Just put some of the objects off to the side where they can't be seen. Maybe split it up into thirds, or whatever is necessary to avoid the lag in the actual game layout.

Or make a fake loading screen to load everything into memory - create a single layout with all your artwork and something to hide it all, and make a fake progress bar to show the user that something is happening. When that progress bar's timer has elapsed, then move onto the game screen.

So your game would look something like:
0: Download screen
1: Choose language
2: Choose character
3: Fake memory loading screen
4: Game
5: End screen

Think about a game like Call of Duty: first you install/download it, then you load it up and go through some menus. But before you can get to the actual gameplay it has to load all of those assets into system memory. If it tried to load all the assets on-the-fly without at least a base of assets pre-loaded, performance would be terribly slow.GeometriX2013-06-17 16:40:35
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Tue Jun 18, 2013 1:07 pm

I've put the biggest sprites in the first layout, yet the game still freezes for the same amount of time (5 sec or so, project download is 20MB) after clicking a character.

I don't think a fake loading screen is possible because all animations / sprites freeze, or should I just put a basic "loading..." text?
B
4
Posts: 9
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests