Can't change layout without having all assets loaded in?

Discussion and feedback on Construct 2

Post » Tue Jul 26, 2016 2:54 am

So I think I've ranted about this before maybe about 5-10 times or so, but here I go again.

So I've noticed that when my game boots, far from all the assets in the game are loaded in when the loading bar reaches 100% (and why does the whole game need to be loaded in, isn't that what storing the game assets on the HDD is for?!?!). I see disk peaking at 100 % long after, and on some computers it can take several minutes before the game can proceed from the bootup loading game layout (yes two loading screens) to the actually game menu. I just had an indiecade judge reply to me being unable to play the game because of s**t like this. I'm really fed up with how Construct/Chromium/NWjs handles assets in memory. Even when 2gb is dedicated to caching assets, there's still frikkin loading times in-game, nothing can be streamed in the background without lagspikes etc. I need to know if there's any way to work around this? What can I do to make sure 100 % on the loading bar means 100 % loaded and playable? Do I need to optimize my game you say? Every layout in the game has on avarage maybe 200-300mb worth of assets in on avarage, yet they all have to be held back by the weight of the entire game. Not only has that severely limited me in what I can put into every scene, but also hampered the scope of the game. Every slight iteration takes 1min of loading in preview just to see if it worked, making new features a nightmare in practice. It's claimed that construct only loads needed assets into memory, but I've done enough tests on all browsers both in preview and export to verify that it's BULL***T! Blank layout with nothing loaded in with all audio cut from the game... 1.8 gb memory used?! WTF?!

At this rate I'll be forced to port the game to unity or something. I can't believe I've spent 2,5 years of my life on this thing only to have it break down so close to the end... I guess I should've known better when I saw the first signs of trouble few weeks into development. Construct's a prototype tool. It was never made for big projects I get that, but I just can't fathom some of the design decisions behind this engine... Keeping it simple is good for the beginners sure, but taking measures to ensure better stability, iteration times and control over assets also greatly benefits the smaller projects as well. I guess when not even the official plugins can be kept up to date and stable (greenworks, local storage looking at you), this is obviously too much to ask.

I don't mean to sound like that thankless noob that whines over why a 100 buck engine isn't perfect, but I took a chance on it, and have spent thousands of hours making a game, and touring it around the world with my own savings to have a chance at making a name for myself. That the tool I chose is the biggest reason I loose sleep every night is just extremely frustrating, and I need to vent a bit. Every issue I've had with the engine has been gradually fixed over time, but I'm afraid if this specific one isn't fixed reeeeal soon, Klang might never be launched as a C2 game.
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Tue Jul 26, 2016 5:01 pm

Since it's not the first time I hear someone complaining about big projects in C2, I'm really interested in what the Scirra Team has to say about this. I'd love to see this engine handle such projects as Klang without problems.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721

Post » Tue Jul 26, 2016 11:59 pm

This wont help with the loading times, but i read a trick somewhere someone suggested about waiting for the game to be "playable" before going to the layout.

Basically you add a check that watches the frame rate of the game. (while its loading its going to be really low), but once everything is loaded and the game starts to run smoothly, THEN you hide the fake 100% loading screen.

So its loading everything behind it, and only once its ready to play smoothly you show the player the game and begin.
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Wed Jul 27, 2016 9:31 am

justifun wrote:Basically you add a check that watches the frame rate of the game. (while its loading its going to be really low), but once everything is loaded and the game starts to run smoothly, THEN you hide the fake 100% loading screen.

But if a player who has a very old computer tries your game and can run it only at 10FPS will never see your levels, just the loading screen.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721

Post » Wed Jul 27, 2016 10:41 am

This is what I'm doing already... a fake loading screen. This is what the Indiecade judge never got past. It's also just unfathomably slow. A game iike witcher loads almost instantly on my computer, but a game that's waaay smaller proves too much for a lot of setups. Construct has loading issues, period. Local storage is also unstable.
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Wed Aug 03, 2016 12:46 pm

Could this be an engine bug? I think this topic got too little attention. @Ashley did you experience anything similar with big projects?
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721

Post » Wed Aug 03, 2016 2:00 pm

Try to replicate the issue.
Make a dummy project and fill it with objects using the method you used.


Post it if you find something, so that others can confirm.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Wed Aug 03, 2016 2:28 pm

@newt I would if I had the time. There can be so many things affecting this, that I would have to put some real effort into the dummy project. I know that rants like this is unhelpful because I don't post concrete evidence, but it's simply because I'm stretched for time, and I won't share Klang's source at this point. It's too complete for it to be shared publicly.
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Wed Aug 03, 2016 2:30 pm

yes scirra answer ? because a lot of us have this issue
(my game right now have a force close issue on android) in preview i have no issue no error no problem but in mobile it get force close when player playing it for awhile
DON'T say its a 100$ engine because unity is free !
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Wed Aug 03, 2016 3:43 pm

I was on holiday when this was first posted, sorry for missing it.

Tinimations wrote:So I've noticed that when my game boots, far from all the assets in the game are loaded in when the loading bar reaches 100% (and why does the whole game need to be loaded in, isn't that what storing the game assets on the HDD is for?!?!).

In a HTML5 game, the loading bar corresponds to download progress. None of the assets are actually loaded decompressed in to memory at that point. So of course, not all assets are loaded by the 100% mark - that's the point of the layout-by-layout loading system: nothing is loaded, until you go to a layout, at which point only that layout's assets are decompressed in to memory. In NW.js I guess I'm not actually sure what it has to do; if you are using package.nw (i.e. zipped assets) then it will be extracting from the zip, but if you pre-extract the zip it should just figure out there's a resource on disk so it doesn't need to do anything. I guess it might load the asset (compressed) in to RAM so it can be quickly decompressed later, which might be unsuitable for a very large game (although it would help speed up layout loading times). So, are you using package.nw and have you tried pre-extracting it?

Every slight iteration takes 1min of loading in preview just to see if it worked, making new features a nightmare in practice.

It's normal that large projects take a long time to build. I've heard Chrome itself can take several hours to build. Perhaps we could investigate features to do a more minimal rebuild though.

Blank layout with nothing loaded in with all audio cut from the game... 1.8 gb memory used?! WTF?!

Memory is complicated. If you have say 4 GB of RAM free, and the system has 1.8 GB of files in RAM it might need later, it may well decide to leave them there. RAM is there to be used.

It also depends on your project settings, e.g. if you have set audio to be preloaded, you've told Construct 2 to decompress all audio content to RAM on startup.

I guess I should've known better when I saw the first signs of trouble few weeks into development.

The sooner you can report issues, the more time we have to do something about them. I think it is unreasonable to expect us or any other developers to make deep changes to the engine in a few weeks. We can look in to issues, but we need time to do that.

Construct's a prototype tool. It was never made for big projects I get that

We do design the engine to scale to large projects, but it sounds like you've made one of the biggest projects ever in Construct 2. I definitely intend for Construct 2 to be able to handle such large games, but we might need to make a few tweaks to make it work better

I guess when not even the official plugins can be kept up to date and stable (greenworks, local storage looking at you), this is obviously too much to ask.

This doesn't appear to be related to the main point of this thread, but I'm not aware of any outstanding bug reports for local storage, AFAIK it works fine for the vast majority of users. Also Greenworks has been clearly marked as an experimental plugin for some time, but as it happens, we just released two updates for it this week.

newt wrote:Try to replicate the issue.
Make a dummy project and fill it with objects using the method you used.


I would if I had the time

Sorry, but this is by far the best way for anyone to make progress on this. As it stands, this post is the equivalent of "my car's broken, please fix it!" - "can you bring your car to the garage?" - "no!"
Sure the mechanic can try and fix it by telephone or something, but you wouldn't expect that to get very far.

I don't normally do this, but if you want to send your full project to [email protected], I'll (obviously keep it secret and) look in to any memory-related issues, but if you can reproduce it just by stuffing loads of dummy content in to a new project, that's better.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Next

Return to Construct 2 General

Who is online

Users browsing this forum: AekiroStudio and 8 guests