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)