How do I keep a layout running while the next one is loading

Get help using Construct 2

Post » Wed Aug 03, 2016 1:36 am

Regardless of there being a minigame or not, when loading significant amounts of information into memory at once, the screen can freeze for a period of time with no feedback at all for the user, not even a loading animation. This is bad design, as it can lead the user to assume the program has crashed.

Even if for a short period of a few seconds, it can be disconcerting. For longer periods, the user may even force quit.

Anyways, IMO minigames during loading screens are the greatest thing ever. Especially for games that have relatively more instances cases of loading during any given session. For me the first time I encountered it was on the PS2 version of Okami, and it really made a positive impression on me.

@skymen - It could be wasteful of memory to keep a heavy image like that on every layout and not use it. But that really depends on your project and if you are pushing your limits. Using the techniques described, it would be better to change to an intermediate loading layout (thus unloading the previous one from memory), then load the heavy image by request, then switch to the new layout. The intermediate layout could have your loading animation or minigame.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,699
Reputation: 64,446

Post » Wed Aug 03, 2016 2:01 am

If people are that impatient then they shouldn't be playing video games.
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Wed Aug 03, 2016 6:57 pm

Well, there are a few possibilities. It really depends on the game.
A few exemples can be Dragon Ball Z Budokai Tenkaishi 3 where you could mash a button to do an action while the game was loading. Like having Goku eat loads of food, Vegeta doing pushups, or Gohan extract excalibur from the ground.
You could also have the player see a little animated loading, like the one present in the simpson game, where you would have Itchy and Scratchy hitting each other all over the screen. Or even have some hidden things that would reveal things about the game. Let's say, each time a level loaded, you had a really tiny sublevel, where you would have to move your mouse through a pattern before the loading ends so it can reach a key, some gold, or some easter egg and/or information about the game.

The real question, is not "why do you need that?" but more "why can't you have that". The goal of softwares like Construct relies on making something that was first a bit hard, becoming simple, while keeping its freedom. So for every tiny little thing that can be done using code, you should be able to do the same using Construct. Plus Construct is waaay past the state where there was still big features left to have done. The only thing that has been done through the Construct releases are mostly bugfixes, fixing compatibility issues or changing some features. So adding this kind of features, the ones that has been requested by the community is the only thing left Construct may want to add.

@oosyrag Yeah, I know, I'll try to have the object created in the loading screen at 1 opacity, like backendfreak told me and see how it went.
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 229
Reputation: 3,390

Post » Wed Aug 03, 2016 7:25 pm

You can also just put a plain tiledbackground to cover it. I'm pretty sure sprites loaded with request from URL are loaded into memory regardless of if they are rendered or not. I recall seeing that documented somewhere... can dig a little to confirm.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,699
Reputation: 64,446

Post » Thu Aug 04, 2016 4:02 pm

Well, that's not sure, because, in some cases, what is not rendered is not loaded into memory. I prefer being sure to have it rendered as my object is pretty dark and my background plain dark.
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 229
Reputation: 3,390

Post » Fri Aug 05, 2016 3:19 am

Ok, I just found out something absolutely amazing. If an object is loaded in memory once, it loads a lot faster the next times you create an instance of that object. So I put an instance of my heavy object in the splashscreen at 1 opacity. And that's not quite a problem as the default Contruct 2 loader gives feedback on what has been loaded. And after that first, longer loading (about 7 seconds, when it took 1 before), but after that , other loadings take only one to two seconds when they took 10 seconds. And that works even though the object is not global. I wonder if it only depends on the computer's specs, if the object stays loaded on RAM for a while or if something else in going on. I'd like to know
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 229
Reputation: 3,390

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests