construct 2 mobile performance

Discussion and feedback on Construct 2

Post » Mon Mar 30, 2015 7:40 pm

Thanks guys for the nice Feedback.

So this leaves me with no choice to look out for another Software to create simple 2D Games for Platform before I continue on my bigger Project with Unity..

I am really wondering if I should go with Gamesalad or with Unreal 4 & Blueprints. But then I have Unity & Unreal with are 2 Major Game Development Programs.

Damn and I really thought I found the Game Developer Program I was looking for with Construct 2.

A bit dissapointed I must say. So the Hunt goes on.
B
2
Posts: 5
Reputation: 160

Post » Tue Mar 31, 2015 2:37 pm

The problem with making mobile games/apps with C2, is that most of the third party exporters are missing key features of C2.
(or has extremely low perfomance and a big overhead)
The only exporter that has "DECENT" perfomance on mobiles is (CocoonJS) which is now unsupported, and is still missing key features. (thats why its unsupported, by the way)

Your only hope is to wait for a miracle! - and we all hope that C3, will be just that ...
B
36
S
8
G
8
Posts: 541
Reputation: 8,429

Post » Wed Apr 01, 2015 3:36 am

I helped one of the forum members get his 5fps game that would crash on mobile. To 60fps and memory effecient on the same mobile fps under CrossWalk. Use the info however you want.

eh. I'll expland
Scirra promotes a no need to optimize and no need to micro optimize. This however is untrue. Not only should you mirco optimize, you should also be wary of C2 own Plugins. Some of C2 plugins will in fact hit your performance hard in ways you wouldn't think so. However if you take up good game design on your efforts, micro optimize, careful use of plugins, replace plugins in some cases. You can get descent running games on mobile.

1. Sort you images into types and layers.
You need to take advantage of C2 quircky texture packing to maximize the WebGL renderer. You won't notice this an issue with small games. You will on bigger ones.
- All ui images are in one sprite.
- all platform images are in one sprite.
so on etc.

2. Each Sprite Object is it's own texture pack
Right from the get go this relates to 1. Each Sprite object will pack have it's own images packed into it's own sprite sheet. So if you repeat images in 2 different sprites. Then those images will be repeated in more than 1 sprite sheet. So do number 1 is mandatory.

3. Behaviours carry performance weight.
Don't attach plugins willy nilly like theirs no tomorrow. A simple Plugin such as Pin. Has curve based performance reduction. It's strange to think that Pin which figures an XY value hits performances. but it does. A few objects with pin is fine. a few hundred objects with Pin, and then you will start to notice.

4. Some behaviours are just slow.
I will use this one as an example. I wanted a rotating background in my game. So I made a 2048 by 2048 image. The game currently ran at 60fps with the background not rotating. As soon as I added Rotate Behaviour the performance dropped to 8fps. whoaawhh :(
I switched to rotation in the EventSheet and that jumped performance to 30fps.
I then rotated in the EventSheet every other tick(ie updating the image rotation at 30fps) and the game ran at a buttery smooth 60fps. And there was no visual difference.
Lesson. Don't use Rotate Behaviour. I don't know why. I looked at the code. Doesn't seem like anything would hit performance. But eh.
oh the game was running on a 6 year old Tegra 2a Tablet. So we are talking pretty old in comparison theses days.

I had a link to a C2 game. The developer was showing a video of his main menu. Which was an orbital space system. Where clicking on an area woudl scroll the rotating systems to another set of rotating systems. The planets, moons and start acted as the button interface. This ran at 60fps on a 1core chip with 512 mb. Was buttery smooth, supported 3 level deep parallax layering.

However I will be brutally honest. Due to Scirra not having a lot of value in micro optimization. this put's far more responsibility on the C2 developers. And new C2 developers just can't cope with the heavy rigid performance design. Most just come in and start making a game. Then use C2 in the most intuitive manner possible, because it's so easy. Then find doing so causes extremely bad performance. The few who I have encouraged rigid discipline and listed tend not to have much in the way of performance issues.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Wed Apr 01, 2015 4:16 am

jayderyu wrote:I helped one of the forum members get his 5fps game that would crash on mobile. To 60fps and memory effecient on the same mobile fps under CrossWalk. Use the info however you want.

eh. I'll expland
Scirra promotes a no need to optimize and no need to micro optimize. This however is untrue. Not only should you mirco optimize, you should also be wary of C2 own Plugins. Some of C2 plugins will in fact hit your performance hard in ways you wouldn't think so. However if you take up good game design on your efforts, micro optimize, careful use of plugins, replace plugins in some cases. You can get descent running games on mobile.

1. Sort you images into types and layers.
You need to take advantage of C2 quircky texture packing to maximize the WebGL renderer. You won't notice this an issue with small games. You will on bigger ones.
- All ui images are in one sprite.
- all platform images are in one sprite.
so on etc.

2. Each Sprite Object is it's own texture pack
Right from the get go this relates to 1. Each Sprite object will pack have it's own images packed into it's own sprite sheet. So if you repeat images in 2 different sprites. Then those images will be repeated in more than 1 sprite sheet. So do number 1 is mandatory.

3. Behaviours carry performance weight.
Don't attach plugins willy nilly like theirs no tomorrow. A simple Plugin such as Pin. Has curve based performance reduction. It's strange to think that Pin which figures an XY value hits performances. but it does. A few objects with pin is fine. a few hundred objects with Pin, and then you will start to notice.

4. Some behaviours are just slow.
I will use this one as an example. I wanted a rotating background in my game. So I made a 2048 by 2048 image. The game currently ran at 60fps with the background not rotating. As soon as I added Rotate Behaviour the performance dropped to 8fps. whoaawhh :(
I switched to rotation in the EventSheet and that jumped performance to 30fps.
I then rotated in the EventSheet every other tick(ie updating the image rotation at 30fps) and the game ran at a buttery smooth 60fps. And there was no visual difference.
Lesson. Don't use Rotate Behaviour. I don't know why. I looked at the code. Doesn't seem like anything would hit performance. But eh.
oh the game was running on a 6 year old Tegra 2a Tablet. So we are talking pretty old in comparison theses days.

I had a link to a C2 game. The developer was showing a video of his main menu. Which was an orbital space system. Where clicking on an area woudl scroll the rotating systems to another set of rotating systems. The planets, moons and start acted as the button interface. This ran at 60fps on a 1core chip with 512 mb. Was buttery smooth, supported 3 level deep parallax layering.

However I will be brutally honest. Due to Scirra not having a lot of value in micro optimization. this put's far more responsibility on the C2 developers. And new C2 developers just can't cope with the heavy rigid performance design. Most just come in and start making a game. Then use C2 in the most intuitive manner possible, because it's so easy. Then find doing so causes extremely bad performance. The few who I have encouraged rigid discipline and listed tend not to have much in the way of performance issues.


+1 for whole post

anyway it would be nice if some behaviors could be optimized by Scirra too (AFAIK platformer behavior is heavy too)
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Wed Apr 01, 2015 4:47 am

@jayderyu
this should be an article not just reply, please do it.
and i don't understand number 1 : how to put all images into one sprite ?!
About rotation: do you mean not to use rotation behavior and use just "rotate" action in Event sheet every 0.0333 secs ?
Thanks a lot
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Wed Apr 01, 2015 9:49 am

@jayderyu

Thanks for the great hints! Could you please explain a bit more point 1?

I also think it would be a great article!
B
10
S
2
Posts: 69
Reputation: 1,032

Post » Wed Apr 01, 2015 10:00 am

@Egyptoon @clockworkmonster

You make only one sprite that contains all the animations for the all objects and pin it to an invisible sprite that is the object itself that handles the collision.

Example:
You have sprites: enemy1, enemy2, enemy3 -> These are only simple sprite used for collisions (they will be invisible during runtime). The interaction in game will be made with these sprites. Also, include a variable as "animationUID" to know what animation belongs to it.
sprite: enemyAnimation -> Contains the animations for enemy1, enemy2, enemy3

Events:
For each "enemy1"
Pick enemyAnimation by UID = enemy1.animationUID --> "enemyAnimation" set position to "enemy1" (image point 0)

... something like this should reduce draw calls ;)

More info: single-sprite-with-different-animations-vs-multiple-sprites_t125668
B
48
S
15
G
6
Posts: 523
Reputation: 7,148

Post » Wed Apr 01, 2015 3:12 pm

@TGeorgeMihai

Thanks a lot for the hint!! Very useful!!
B
10
S
2
Posts: 69
Reputation: 1,032

Post » Wed Apr 01, 2015 3:28 pm

Is it really necessary to use an empty sprite and "pin" the animations? I mean, You can use the collision poligon in each frame of the animation. This way you avoid using one extra sprite + the "pin" behaviour.

Shouldn´t this improve performance even more? It seems that using many "Pin" behaviours can affect performance...
B
10
S
2
Posts: 69
Reputation: 1,032

Post » Thu Apr 02, 2015 2:03 am

Don't use per animation frame colliders. Each collider on a different frame will Trigger the collision again.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Ticket Games, Yahoo [Bot] and 8 guests