Performance is the key. Laggy or power consuming apps and games annoy the player and eventually lead to bad reviews. Here I’ll explain the “Do’s and Don’ts” for the performance while using Construct 2 and CocoonIO as wrapper.
Canvas+ offers by far the best performance for mobile games built with Construct 2. However there are some restrictions coming along with Canvas+. You can learn more here.
[creativ_button url=”http://docs.cocoon.io/article/canvas-engine/” icon=”book” label=”Cocoon – Canvas+” colour=”blue” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]
Use a loader layout
Create and use a loader layout in Construct 2. This will reduce the gap of a black screen on the start of the game.
Use functions for code you need more than once. This avoids redundancy of your code and makes it much easier to debug or adjust your code.
Keep the memory usage low
Every added image increases the memory usage of the later game. The usage is calculated by width*height
For more performance tips, please see here.
[creativ_button url=”https://www.scirra.com/manual/134/performance-tips” icon=”” label=”Scirra – Performance Tips” colour=”orange” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]
Do not use text objects while using Canvas+. This will cause extremely high CPU usage a mobile phone or tablet. Even an empty project with just one text objects causes 80-90 % CPU usage. So use SpriteFont or better SpriteFont+ objects instead.
Big images (in resolution)
Do not use big images for your game! If your object is 80×80 px big in Construct, then use a image with 150 – 200% (120×120 – 160×160 px). So it still looks good even on tablets.
Avoid large area of transparency
Avoid using images with too much transparency. This will need a lot of power for rendering it. Also use png files for your game elements and jpeg for your background images.
Unsupported Plugins / Behaviors
Do not use unsupported plugins & behaviors. This will lead to a black screen and your game will not work. You’ll find a list of all supported stuff here.
[creativ_button url=”https://shatter-box.com/knowledge-base/supported-c2-objects-plugins/” icon=”ok” label=”Canvas+ – Supported and Unsupported stuff” colour=”green” colour_custom=”” size=”medium” edge=”rounded” target=”_blank”]
Avoid video banner ads
Those ad type causes frame drops of 15-20 FPS while showing a video banner add. However those ad types have the the CPC (Costs per Clicks), so it’s up to you in the end if you want performance or money 😛
Do not use the “Every Tick” condition. Mostly it’s far enough to use “Every 0.1 seconds” or something in this way.