I've made a small module for people who like perfect pixels.
This module is made for games with pixel art and low resolution graphics, where improper scaling could lead to imperfect (non-square) pixels and uglyness. It does not depend on any framework or other module and it's written in pure Lua.
With this module, in a few lines of code you can get a proper scale retaining the aspect ratio. The screen is scaled as high as it can while still keeping the aspect ratio intact and then allows you to get the size of the box, the transformation needed to be done to center the box and a factor you can scale your objects with.
Here is a link to the repository. The code is licensed under the Apache 2 license and you can use it for whatever you want . I also made full documentation for it that you can access here. The documentation also includes four examples, two of which use Love2D.
[module] ScaleInator
Re: [module] ScaleInator
Description is very promising!
Any screenies for us?
Any screenies for us?
Who is online
Users browsing this forum: No registered users and 4 guests