Page 1 of 2

Aspect Scaling [trash]

Posted: Mon Jul 05, 2021 3:37 pm
by GVovkiv
i still thinking about my ways to manage how exactly i want to develop that library, so i will trash that thread, for now, and publish that shit in that way, with that i comfortable

Re: Yet Another Scale Lib

Posted: Mon Jul 05, 2021 9:43 pm
by togFox
screen resolutions are my number one hate. Will definitely check this out. Thanks.

Re: Yet Another Scale Lib

Posted: Wed Jul 07, 2021 3:30 pm
by Xii
Your documentation lists getBar1() and getBar2() but I don't see these defined in the code.

Re: Yet Another Scale Lib

Posted: Wed Jul 07, 2021 3:50 pm
by GVovkiv
Xii wrote: Wed Jul 07, 2021 3:30 pm Your documentation lists getBar1() and getBar2() but I don't see these defined in the code.
yeah
fixed, thanks
(maybe i should learn how to properly document code, yeah)

Re: Aspect Scaling

Posted: Sun Aug 01, 2021 8:20 pm
by GVovkiv
Rewrited that library, based on kikito's guidelines
Functional the same

Re: Aspect Scaling

Posted: Fri Nov 19, 2021 1:36 pm
by GVovkiv
1.1 update: https://gist.github.com/Vovkiv/f234b4c9 ... ce8db37be8
* Little code refactoring
* Added functions a bunch of functions, such as:
toGame, toScreen to translate coordinates from scaled state to unscaled
getGame, getWindow and other shortcuts
added little better demo to demonstrate (https://gist.github.com/Vovkiv/c1b3216a ... d571a35cc8) how that functions may be used

and, uh, after refactoring, i found some willing, to rewrite that library with new use vector, such as:
provide more out-of-box features, such as: conversation mouse coordinates on library side, not by user; more functions related to translation in-between coordinates and so on?
provide more features related to scaling and working with window at general: add several scaling methods, such as Aspect Scaling (like already here), stretching scaling, maybe some """pixel-perfect""" to provide better experience for games with pixel graphics; integrate functionality of viewtopic.php?p=242801#p242801; provide functions to make fonts scaling much easer; functions to deal with ui proper scaling; add support for much easer integration for: shaders, scrolling/camera
Does anyone interested in that?

Re: Aspect Scaling

Posted: Mon Dec 20, 2021 11:11 pm
by togFox
Found a bug online 105:

Code: Select all

love.graphics.setColor(aspect.a, aspect.g, aspect.b, aspect.a)
should be

Code: Select all

 love.graphics.setColor(aspect.r, aspect.g, aspect.b, aspect.a)

The first aspect.a should be aspect.r. This will let the borders be the correct colour.

Re: Aspect Scaling

Posted: Tue Dec 21, 2021 1:24 pm
by GVovkiv
togFox wrote: Mon Dec 20, 2021 11:11 pm Found a bug online 105:

Code: Select all

love.graphics.setColor(aspect.a, aspect.g, aspect.b, aspect.a)
should be

Code: Select all

 love.graphics.setColor(aspect.r, aspect.g, aspect.b, aspect.a)

The first aspect.a should be aspect.r. This will let the borders be the correct colour.
Oh, sorry for inconvenient
Fixed

Re: Aspect Scaling

Posted: Tue Dec 21, 2021 10:14 pm
by togFox
Thank you for providing something that works well. :)

Re: Aspect Scaling

Posted: Wed Dec 29, 2021 3:37 pm
by GVovkiv
In next week or two, there will be major update to library
Hurray...