Puzzle Game performance on Mobile.

Get help using Construct 2

Post » Thu Jan 16, 2014 9:02 pm

I have a puzzle game based off the template in C2.

Blocks fall from the sky and stack up, you break them and new ones fall.

Super simple idea.

I loaded the game onto an iPhone 4s, a samsung galaxy S III and a Nexus 5.

The iPhone and Galaxy s III ran pretty poorly, with ~5 FPS to 25. The nexus 5 was fine at 60.

Some info about the game, I will try and post a zip somewhere...

I have a good number of physics objects in there, 64x64px blocks, that have physics enabled. Somewhere around 40-50 at one time. This is the issue hands down. No question.

I have tried reducing the physics iterations, this leads to math/physics problems on certain devices, blocks overlapping, just being generally ugly. Nothing stacks nicely it just becomes a jumble mess.

I tried reducing the number of objects from ~40-50 to about 20-30, that only improved slightly, but still getting sub 10 FPS while things are in motion.


I am looking for suggestions on this.

I'm open to the following.
1) Scraping the entire physics concept, moving to a less CPU intensive mechanic.
2) Tweaking perf in different ways
3) Trying other tools besides CocoonJS.

If you want to replicate this. Take the default physics puzzle game, and do a grid of 7x8.
*******
*******
*******
*******
*******
*******
*******
Each time you touch a block and it is destroyed, make a new one at that X and Y-1000 or something. Basically, each block you smash, it makes one off screen to fall in place. Deploy this using CocoonJS to an older phone and see how it goes...
B
31
S
10
G
7
Posts: 416
Reputation: 7,264

Post » Thu Aug 28, 2014 6:17 pm

My only idea is that you could do some collision dissabling via a loop that checks if they are near to eachother.. Have you tried that?

Im having a similar problem, this solution only worked a bit. So im looking for optimization tips too!
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Thu Aug 28, 2014 7:46 pm

Physiscs is and will be very CPU intensive..
Have you tried all 3 physics-engines? (you can set the engine in your project-properties)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Aug 30, 2014 1:07 pm

CocoonJS Native physics dosnt work anymore.. Not through CocoonJS compiler, anyway.

Box2D is slow, both of them.
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Tue Sep 16, 2014 5:20 pm

So is the basic answer you just can't do it? I've optimized it over and over. I even REMOVED the physics part. I do it all by hand now with just math and moving blocks. It doesn't look as good but it works.
B
31
S
10
G
7
Posts: 416
Reputation: 7,264


Return to How do I....?

Who is online

Users browsing this forum: batto and 27 guests