bmdeeal / quig

quig -- simple system for creating small games with Lua
GNU General Public License v3.0
0 stars 0 forks source link

Scaling issues near edge of screen #6

Open bmdeeal opened 2 years ago

bmdeeal commented 2 years ago

Sprites drawn with a non-1x scale scale oddly and jitter around. This can be most easily seen pop-drop'n and the platformer example.

I think this is an issue with the way SDL is clipping scaled graphics, but there might be a way to fix it on our end. Needs investigation. Easiest way might just be to blit scaled graphics to a surface big enough to fit it, and then blit that surface at 1x, but that sounds slow (and maybe a bit ugly if you have a lot of large objects, but I don't know if something similar is happening under the hood with SDL).

bmdeeal commented 2 years ago

So, I've implemented the described fix. There is still a bit of positional shifting for objects going off the screen edge, and I believe it's related, so I'm leaving this open.