Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up rendering of tilemaps #42

Open
Karkus476 opened this issue Dec 3, 2015 · 3 comments
Open

Speed up rendering of tilemaps #42

Karkus476 opened this issue Dec 3, 2015 · 3 comments

Comments

@Karkus476
Copy link
Member

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

@Karkus476
Copy link
Member Author

@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?

@Karkus476
Copy link
Member Author

We should benchmark some things, to see what is most expensive.

@Grumbel
Copy link
Member

Grumbel commented Dec 18, 2015

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.

@Karkus476 Karkus476 modified the milestone: 1.0.0 - ST 0.5.0 Dec 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants