Open Karkus476 opened 8 years ago
@Grumbel I believe you mentioned some alternative way of rendering the Tilemaps, but I can't remember. Is there a better way to do it using PyQt?
We should benchmark some things, to see what is most expensive.
Currently Flexlay just uses classic Painter algorithm, aka just redraw everything whenever you feel like it. This is not fast, especially when it comes to zooming, scrolling and stuff and only incremental redraws would be needed.
Luckily Qt already comes with a nice little scene graphic class called QGraphicsScene, not only is that much more optimized then the current rendering code, it's also much more flexible. Enabling OpenGL for QGraphicsScene is like three lines of code.
The downside is that changing the current rendering code over to QGraphicsScene requires a little reworking on how things are handled when it comes to drawing, as all the draw() method need to go and changed into something that updates the scene graph instead.
Any shortcuts, or faster ways to render the tilemaps and objects, particularly when zoomed out. Currently, it is slow on my laptop when zoomed out, and sometimes even when zoomed in