Delix
Hey Bok! Sorry for the late response, just saw this.
I also had issues with this. I solved this issue by compositing tiles at an integral offset to a texture, then rendering that texture at the correct fractional offset with the technique.
Thanks for the reply!
I'm still struggling to get a good result with this technique on my tiles. Would you mind going into more detail on this? I assume this requires you to collect all the tiles currently visible on the screen and render them to a texture(screen sized?) at an integral offset AND an integer scale? You would need to do this per "layer" in your world in order to render transparency correctly, right?
It seems like I've made some technical decisions that are making this very difficult on me, which perhaps you don't have:
- My world is composed of multiple tilemaps, so even if I composited each tilemap to a texture like you said, I would get seams in between tilemaps. So I figure I have to do this in screen space.
- My tilemaps are made up of multiple layers which can go either behind or in front of non tilemap entities(top down game). So I'd have to do this per layer, and even then, some tiles are meant to be connected but also require being on different layers(imagine a vertical column where the base is meant to be behind the player depending on where they're standing, but the top is meant to always be in front). These would have a visible gap where they're on different layers.
- The middle layer, which is meant to be on the same plane as the player and other entities, has to be sorted based on y position, so drawing this entire layer at once(after compositing to a texture), doesn't seem possible since the tilemap and the entities moving around aren't necessarily at the same fractional offset.
Let me know if I'm missing something obvious, this just seems very difficult to do perfectly in my situation. I'm still using it on non tiled entities and just snapping the camera to pixel locations, it looks great, but I'm obviously unable to zoom in/out without issues.