How do I Save Draw Call Processing

Get help using Construct 2

Post » Fri Dec 16, 2016 10:27 am

When reading https://www.scirra.com/manual/134/performance-tips and other performance enhancing posts, it's hard to pinpoint exactly why my game is lagging due to draw calls. I only have 3 tilemaps being draw at once, each of which having relatively large tiles in comparison to the screen. The amount of tiles drawn at once never exceeds 100, and hardly exceeds 50.

I'm trying to find why the draw calls could be affecting performance with such an impact, as the profiler puts that at the top with 50%. This might actually be wrong though. I believe the actual problem is the amount of unorganized for loops running in the project.

It's also possible that the performance issues are specific to the computer I'm using, as the specs aren't that great, and I experience lag in almost any game made within the past 10 years, if not rendered with DX11.

Anyways, if anyone has any more information on when calls to draw are done, that would be nice. If need be I'll create a link to the CAPX here, but you can click the gif below to go to the game's page that includes the CAPX.
ImageImage
B
49
S
15
G
2
Posts: 268
Reputation: 6,617

Post » Fri Dec 16, 2016 10:53 am

How the Construct 2 WebGL renderer works

Also, there is obviously more than "3 tileframes being drawn at once". You have all the HUD sprites, the character sprites, the application of webGL effects, and the usage of the Canvas plugin for who knows what further operations (could not open the capx because of third part addons).

Make sure you aren't indeed looping too much stuff in the canvas each frame, which sounds like a first lead to go after.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,295
Reputation: 70,795

Post » Fri Dec 16, 2016 11:55 am

@Kyatric, Ah, okay, thanks for sharing this, I couldn't find it through searches for some reason. Very helpful. I did forget to include the HUD timesets in my description, but this is all I really needed to know, thanks!

I'd assume my only performance issue is the backgrounds, due to memory usage. Thanks!

Also probably the HUD tilemap now that I think of it.
ImageImage
B
49
S
15
G
2
Posts: 268
Reputation: 6,617

Post » Wed Dec 21, 2016 1:28 am

For anyone coming to this post looking for a good answer, my optimization tips for you if you're working on a project like mine is:

Posterize EVERY detailed background/object in the scene. I only pre-posterize my backgrounds, which saves a lot of memory, by significantly shrinking the size of each visual object.

https://www.scirra.com/blog/ashley/14/h ... cells-work
USE RENDER CELLS. The two towers in the game's prototyping map are quite large, and impact performance. Pairing TileMaps with Render Cells for the map's layout is the best idea. The towers, for example, are sprites. They will only be drawn when the players are close to them if I enable Render Cells on the layers.
ImageImage
B
49
S
15
G
2
Posts: 268
Reputation: 6,617


Return to How do I....?

Who is online

Users browsing this forum: JackTYGA and 20 guests