Ejecta Iphone WebGL / CacoonJS memory limit

Discussion and feedback on Construct 2

Post » Thu Jul 03, 2014 7:59 pm

Ldk wrote:Ok.

Then i would like official confirmation from @Ashley or one of the devs stating that Construct 2 cannot export a game of a specific size (must be specified) and run properly on Mac OSX, IOS, Android and PC.


I meant no disrespect, of course. Just remember that it's all just my limited experience, Silverforce for example has done a wonderful job optimizing his bigger games for mobile.

I think it's hard to nail down a specific number, because so many things depend on the end user. Your best bet is to test your game from the beginning on all devices you plan on releasing.

Good luck!
Image
B
96
S
36
G
17
Posts: 351
Reputation: 15,903

Post » Thu Jul 03, 2014 8:05 pm

If i sounded rude i do apologize. I meant no disrespect. I am extremely stressed. My game was working 100% on IOS at 60fps and Mac. Until something changed about 1 month ago. From there on out i get 40fps and the game has a noticeable stutter. I thought well once i reach a point where the game is done i can do optimization. But i did that. And i no longer believe the issue is with my game but mostly due to the third party dependencies.

Personally my greatest frustration is the fact that there are no in-house exporters and that we are left with its a third party problem for a resolution.
Look. Construct 2 is a great product. It taught me a lot. But right now i need to make some money as i dont have a salary.

My game plan was to make money from my game of which i have spent 8 - 18 hours a day. Testing. Creating. Recreating.
And then without warning performance drops and the game can no longer be sold.

I would still like an official response as to what the limit is. Also if there are any roadmaps for inhouse exporters.
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Thu Jul 03, 2014 8:48 pm

@Ldk Are you using the latest version of C2? & have you tried exporting to HTML5 to build with CJS?
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Thu Jul 03, 2014 9:03 pm

I am currently using version 173.
I have not tried HTML5 with CJS no.

I tried XDK which throws errors while opening the export stating the .js files are so bugged and have so many errors that it refuses to debug because it would return to much errors.

Export to CJS works but performance is horrible.
Export to Ejecta Works but performance is horrible.
Export to Nodewebkit works but performance is horrible.

I will try the HTML5 to CJS but i seriously doubt it will work considering 4 other wrappers failed.
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Fri Jul 04, 2014 2:57 am

@Ldk

It's very frustrating but currently C2 and large games for mobiles do not mix, that's just the simple truth.

Even if you optimize everything and use Crosswalk so it handles asset loading well, you are still bound by a 50MB APK limit, 13MB of which is taken up by the Crosswalk Chromium engine.

It's something that has to be taken into account at the start of a game development process, during development at every change or turn, etc. Anytime you add a new feature or major addition of code, you need to test on your specific devices to ensure what you added did not break something. When you work on PC, its very easy to just keep throwing more and more at it, PCs are beastly, they will run pretty much the worse unoptimized game there is. But Macs with its crap integrated intel graphics don't cut the mustard and need more care.

If you run your current game on PC, in debug, tell me whats your CPU utilization on your PC (and list its spec), I can right away know whether your game is going to be smooth on mobiles or not, based on my experience.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Jul 04, 2014 8:27 am

Hi.

Game size after export is 46MB.
Memory use in game is 429MB
In C2 estimated Memory use is 509MB

CPU util in debug is 14%
DrawCalls 1.8%
Engine 4.5%

Specs
Nvidia 670GTX
16GB RAM
Windows 7 SP1 64Bit
Quad Core I5 processor
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Fri Jul 04, 2014 11:32 am

Ldk wrote:Hi.

Game size after export is 46MB.
Memory use in game is 429MB
In C2 estimated Memory use is 509MB

CPU util in debug is 14%
DrawCalls 1.8%
Engine 4.5%

Specs
Nvidia 670GTX
16GB RAM
Windows 7 SP1 64Bit
Quad Core I5 processor


14% CPU use from an i5 is fine for mobiles. It's exactly what I get for Star Nomad during combat. Runs very well even on pretty weak stuff. So whatever is the problem, its NOT on the logic side of things.

500MB is not going to happen for iOS, no way, no how. Its also extremely on the edge for a lot of Android devices. If they even run your game at all, once they go to the homescreen and it suspends, they cannot resume due to overloaded memory, your game will crash & restart.

At this point I suggest you really reduce the resolution of your images, theres absolutely zero need for them to be high res. What looks awful pixellated on your PC screen looks perfectly acceptable on a small device of 4-7 inches.

Cram everything down into power of 2 sizes, 128 x 128, 256 x 256, 512, 1024, etc. Do not have images that are a bit larger than power of 2 size, its a total waste of memory.

For example, a 557 x 600 image uses 4MB in memory. But a 512 x 512 uses 1MB only. Likewise, if you have any image thats even a tiny bit larger than 1024, its 16MB in memory for that single image.

ps. I made the same mistake as you with my first big game (mine was 460MB in memory on Android hehe), make it first then optimize later... completely stupid way to do games, especially for mobiles. I learnt the hard way.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Jul 04, 2014 1:29 pm

It doesn't sound like this is anything to do with Construct 2. 500mb memory usage is still pretty extreme for mobile devices. You are probably running in to hardware limitations that you will encounter with any engine or framework, even a hand-written native app. I'm not sure where you got the idea that 500mb ought to work, but I'd recommend aiming for <100mb memory usage to be able to run on a wide array of mobile devices, and ideally <200mb to run just on mid- to higher-range mobile devices.

Apart from that I'd recommend not using CocoonJS, since it doesn't have memory management and will try to hold the entire game in memory at once (which will be higher than C2's estimated memory usage, which assumes a browser that does not do that). Both Ejecta and Crosswalk have working memory management.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Fri Jul 04, 2014 2:15 pm

Definitely agree with @Ashley on this.

Even with Android and its stronger hardware with more ram, a phone for the average user has 20-50 processes running in the background consuming memory. You do not want to force it to run a game >200MB, random crashes during gameplay occurs and even crashing on startup for a lot of devices.

Us devs always test with "clean" devices, very little bloatware. But users in the real world? No, their phone is full of crap.

Definitely go with Crosswalk and re-fix your game to make it compatible or faster with XDK/Crosswalk, your game is simply too big for CocoonJS, even once you reduce your art resolution, it will probably still be ~300MB with everything loaded.

In regards to the slow performance with WebGL effects, a lot of them are performance destroyer for mobiles. Just do not use it, a few effects you can use as they don't impact performance much. I made a post recently with some testing data on different effects.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Jul 04, 2014 3:27 pm

@Ldk
I spent about 3/4 months with Maor(on the site) to go from a fine desktop game to mobile. It was a lot of back and forth. And the first element that needed to be worked on was the fact that the memory usage was pretty much killer on the systems.

I suggest lowering your graphical quality by half as just a start. There are many other performance enhancers after that. Use mono audio can cut audio in half. So unless your game needs stero audio, just mono it.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Rastacity and 2 guests