GD2D: dev log #8

I try to load big level, and found that FPS is super low. Time for optimization 🙂 I think of three things that can be slow:

  • Colliders debug draw;
  • Tilemap;
  • Non-tile entities (eg. player, enemies, objects).

Colliders debug draw

I try to disable debug draw, but it doesn’t help.

Tilemap & entities

Okay. Next I tried to disable everything except colliders debug draw.

60 FPS. So problem is in tilemap or entities.


Next I disable tilemap rendering:

58-60 FPS. The problem is definitely in tilemap. What happens if I disable only the floor?

42 FPS. I’m on the right way.

First try: visibility

I try to use visible property to hide tiles that are out of screen. But with little success. Instead of desired 60 FPS I get only 30. It is better than initial (14), but still bad.

So, even if geometry is not visible, luxe still need some time to process them.

Second try

Fine. And what if, instead of switching visibility, try dynamically adding and removing geometry to / from the batcher?

58-60 FPS. It turned out that this is the right way.


In the process of debugging 🙂


See you later!

2 thoughts on “GD2D: dev log #8

  1. For tiles, try using the QuadPackGeometry, and set geometry.static = true; this will render it from the GPU and it won’t do any CPU processing.

    • Thanks! Currently it is too late to change it, also I’m happy with current results, but I will try it sometime in the future.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.