-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
tiledquickplugin: only render visible tiles #2772
Conversation
…ing callback This allows removing some duplicated code introduced in the previous commit, and also: "This could even help enabling export of isometric maps to GameMaker 1.4 format, which needs to write out XML elements representing each tile."
Cleaned up the code such that the new approach is now used for all map orientations. The small optimization that was used for orthogonal tile layers was dropped for the sake of simplicity. It is not expected to make much of an impact.
Nice, thanks! All works great now. I just noticed that I have some leftovers in src/tiledquick/qml/main.qml. Will these changes be squashed and so I should just do a fixup commit? Or should I rebase 9f2d7b0 (and I guess force push)? |
Yeah, that was a nice cleanup in Tiled Quick and now all orientations are supported. :-) I wonder a bit about the impact on performance of adding a
Let's squash this, so please push a cleanup commit. :-) |
I figured it was the lesser of two evils, but that was because I was assuming that using an interface would require memory to be allocated... thinking about it a bit more now, passing a helper object thingy that was created on the stack should also work. |
The I think the only way to have really less overhead would be to use a template parameter, but it would mean moving the entire tile layer rendering code into the header as well as to remove the virtual dispatch for |
I've noticed that maps are now shifted half a tile upwards. Do you have any idea which part of our recent changes could be causing this?
|
So, actually only maps using that particular tileset would appear shifted like that. And it's because the tiles are 64 pixels high and have a transparent region at the bottom. In addition, our tile rendering callback is not applying the drawing offset of the tileset. I'll fix that up now. :-) |
Thank you Bjorn! Now I can start making some bigger maps! :D |
Fixes #2769