Performance Issues with 500x500 Maps in Flame: Tiled Loading Impact on FPS?

80 Views Asked by At

I'm uncertain if Flame continuously updates all tiles or if it selectively loads only the visible ones on the screen. The concern arises from my experience with a 500x500 map, which, despite using Tiled loading, results in a significant drop in FPS to around 10. This discrepancy prompts me to question whether Flame's loading mechanism effectively manages performance and optimizes rendering for visible tiles.

I attempted to load a 500x500 map using Flame and experimented with Tiled loading. I anticipated smooth performance, expecting Flame to efficiently handle the map. However, the result was a significant drop in FPS to around 10, prompting concerns about the feasibility of using such a large map with Flame.

1

There are 1 best solutions below

0
spydon On

There is unfortunately no render culling done yet in flame_tiled (or in Flame at all) which is why you are experiencing performance issues with such a large map.

For normal Flame components one can use CameraComponent.canSee(component) to implement render culling manually, but since the map is just one big component that wouldn't work here. I don't think it would be possible to do it in flame_tiled manually without doing it inside of the library, if you are up for implementing such a feature we are of course open to PRs.

Another thing you could try is to split up your map into several TiledComponents and then only render the visible ones.