How do I Save Draw Call Processing

0 favourites
  • 4 posts
From the Asset Store
You need this package if you want to program a Street Fighter or battle game.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)