HTML5 game size limit

Get help using Construct 2

Post » Fri Mar 07, 2014 9:26 am

Message: Daedolon can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi all,

I'm working on a game of mine : https://www.scirra.com/forum/viewtopic.php?t=90855&start=0 Spooky Heroes.

I'm having some problems after adding lots of objects to the point where Chrome and Node Webkit do not work anymore. Firefox seems to randomly either crash or work.

The problem appeared after I added 2 new characters to the game and I had similar issues before when the size of the game became to big. I had to optimize all images but now, I have not much left to optimize without reviewing the whole structure of the game... I would like to avoid that.

I would like to know if there were any limits in size to HTML5 game, aiming to be used as desktop game, not online. I'm aware Node Webkit is just a simplified Chrome browser so I guess the same restrictions are in order for desktop games coming from Construct 2.

Currently, my game indicates 33.6 Mb of download size and 61.4 Mb of memory use.
I have created around 20 layouts used to preload game sprites.

Is there any way to know why the game won't launch in preview with Chrome or Node Webkit ? (any log files ?)
Are there any download limit or memory use limit for HTML5 games ?

Any answers would be really appreciated !

Thanks
B
10
S
2
Posts: 67
Reputation: 690

Post » Fri Mar 07, 2014 9:32 am

My largest game is 120mb. I believe the game Our Darker Purpose is closer to 300mb.
My games memory use largest point is 400mb.

I suspect the problem is elsewhere. Very likely you are using some seriously inefficient assets. That how is just an assertation based on the little information. I would suggest checking the tutorials on "Don't waste your memory" and just a tutorial search for "performance"
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Fri Mar 07, 2014 12:03 pm

Thanks for the reply.

I've already read all the tutorials about performances and memory and have been optimizing the game as explained.
I have many different characters and boss with their own animations. When I delete a few random of them, then the program works fine. As soon as I put more than a size limit (it seems), it just crashes.

I've uploaded the capx so if any of you could look at it and tell me what could cause the problem, that would be a great help.
Actually, I'm also thinking the problem might come from my computer so if you could just try to preview the capx with node webkit of chrome and tell me if it's working for you, that would pinpoint the problem.

http:///www.gaweb-studio.com/SH.capx

Thanks !
B
10
S
2
Posts: 67
Reputation: 690

Post » Sat Mar 08, 2014 1:54 am

My post was destroyed. I'll ask a quck question though.

are you developing your game as a CAPROJ or a CAPX?
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Sat Mar 08, 2014 3:27 am

I save as capx.

Is there a difference ?
B
10
S
2
Posts: 67
Reputation: 690

Post » Sat Mar 08, 2014 3:43 pm

A little bump, I'm still having troubles and still don't know why Node Webkit and Chrome won't work.

The strange thing is that the Construct 2 loader starts normally but instead of seeing the normal blue bar filling up, the bar is red, and when reaching 100%, nothing happens. It does this on Chrome and Node Webkit, whereas Firefox works fine with the blue bar loading.
Is there any way to display the list of assets loaded to check which one would cause the problem ?
Or is there any documentation about how Construct 2 load things (only read how the load works : loading layouts one by one but besides that, not much info)
B
10
S
2
Posts: 67
Reputation: 690

Post » Sat Mar 08, 2014 6:52 pm

Well yes there is a massive difference.

A CAPX is a zip file. When C2 saves a game C2 needs to compress the assets to the zip file. If C2 needs to get assets for preview I would also suppose C2 will need to extract and push. While although the prgram shuoldn't get stuck it is. CAPX is good for small games, sharing small projects, sharing bits of code. Once a game hits the big time with alots of assets.

A CAPROJ is all the assets inside foders and sub folders. There is no compression of all assets to a single file. This is good for larger projects.

I unpacked and saved as a CAPROJ into a folder and boom. Changes
10 seconds to load the project
10 seconds to run the game sucessfully.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Sun Mar 09, 2014 2:40 pm

I didn't know that.
I'll give some try with capproj then.

Thanks for the heads up !
B
10
S
2
Posts: 67
Reputation: 690

Post » Thu Oct 16, 2014 1:48 pm

@Daedolon Did it work? The red loading bar or percentage text is showing up on mine now too, since I updated r184 + put some extra files in there, and it behaves the exact same way. Whole game isn't more than 150mb.
B
38
S
6
G
1
Posts: 306
Reputation: 2,902

Post » Thu Oct 16, 2014 5:32 pm

Your project uses nearly 7000 separate images. That is insane. I can't comprehend why you could need such an extraordinary number of images. Do you have an object with 5000 animation frames or something?

The problem is not the overall memory use, but once you start getting close to 10,000 images, you start to get close to a hard-coded Windows limit of how many separate images you can be working with at once.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests