Aspect Scaling [trash]

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Aspect Scaling [trash]

Post 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
Last edited by GVovkiv on Thu Dec 30, 2021 6:55 pm, edited 5 times in total.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Yet Another Scale Lib

Post by togFox »

screen resolutions are my number one hate. Will definitely check this out. Thanks.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
Xii
Party member
Posts: 137
Joined: Thu Aug 13, 2020 9:09 pm
Contact:

Re: Yet Another Scale Lib

Post by Xii »

Your documentation lists getBar1() and getBar2() but I don't see these defined in the code.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Yet Another Scale Lib

Post 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)
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Aspect Scaling

Post by GVovkiv »

Rewrited that library, based on kikito's guidelines
Functional the same
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Aspect Scaling

Post 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?
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Aspect Scaling

Post 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.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Aspect Scaling

Post 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
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Aspect Scaling

Post by togFox »

Thank you for providing something that works well. :)
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Aspect Scaling

Post by GVovkiv »

In next week or two, there will be major update to library
Hurray...
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests