Resolution Solution [library]

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
togFox
Party member
Posts: 770
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Resolution Solution [library]

Post by togFox »

I changed the 3 to a 2 and now it scales as expected. I didn't even notice that setting (I copy/ pasted without checking) so now I'll read up on what that does. 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
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Resolution Solution [library]

Post by GVovkiv »

togFox wrote: Sun Mar 19, 2023 3:33 am I changed the 3 to a 2 and now it scales as expected. I didn't even notice that setting (I copy/ pasted without checking) so now I'll read up on what that does. Thanks!
Yeah, while documentation sucks as much as possible, github page mention that all relevant documents is inside library source, so worth checking it before doing anything.
Also kinda offtopic, but:
sadly, I don't think proper documentation will be added anytime soon, since i kinda give up for low level stuff such as love or raylib and moved to godot, to see if it will suit me better. But i still will be able to answer questions about this library because i only one who could explain how this mess work.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Resolution Solution [library]

Post by GVovkiv »

v3000, 19 November 2023
https://github.com/Vovkiv/resolution_solution
Yet another big library rewrite.
This version is not compatibility with v2001, so major rewriting required.

Main idea behind this rewrite was quite simple: library was doing too much of unnecessary stuff, resulting in bloated library, tons not very useful features that I need to maintain, and I was in general not very satisfied with what library become.
Before, library was focusing too much on “black bars” concept. In fact, around 50% of all functions were only about them. So, now, library become lightweight and focused on SCALING, then anything else. Now library proposes you to implement scaling using canvas, scissors or good old black bars. You not forced to only choose one method and monkeypatch your way through. Now everything should be easy for everyone.
So.. what now?
Library moves to maintenance-only mode, so no new features or rewrites in not planned. Only bug fixes (if users will raise them, of course), version bumping and updating library to new love version, more examples in repository.

Changelog will be quite small simple because rewrite massive, so writing what changed and what doesn't, is kinda pointless. Go check new documentation for what exactly changed: https://github.com/Vovkiv/resolution_so ... tation.pdf

New:
• Added complete documentation, as PDF file, which includes examples, screenshots, explanations of some concepts, tips and tricks, and more.
(+ source .odt file)
• Added folder with examples in repository.
Changed / Fixed:
• Most functions or values were removed or reworked.
• Reworked readme in repository.
Renamed:
• All functions and variables now use snake_case.
Removed:
• Most functions or values were removed or reworked.
• Since ZeroBrane API was unmaintained for some time, it was fully removed from repository.
• I don’t provide minified version of library anymore, so it was removed from repository.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Resolution Solution [library]

Post by GVovkiv »

I kinda gave up on love2d, so that's why I don't plan to bring new features or whatever anymore, only bug fixes if anyone will be asking for them, more examples (I added gamera and HUMP camera example in repository, because at least some users were asking how to use this libraries with Resolution Solution), documentation, version bumping for new love versions, etc.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Resolution Solution [library]

Post by GVovkiv »

v3001, 3 December 2023
https://github.com/Vovkiv/resolution_solution
Bump to love 11.5, no new features or fixes, mostly changes for internals, like updated
comments, shake_case for internals in debug_info function. This even resulted in smaller
library size!

Compatible with v3000 without any additional code changes (unless you relied on
_DOCUMENTATION variable, for some reason).
New:

_DOCUMENTATION now has link to documentation pdf file that I forget to add during
v3000 update.
Changed:
•Internal variables in debug_info now used snake_case that I forget to update during v3000
update.
•Updated README, mostly better wording and links.
User avatar
togFox
Party member
Posts: 770
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Resolution Solution [library]

Post by togFox »

Will 3001 work with Love 11.4?
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: Resolution Solution [library]

Post by GVovkiv »

togFox wrote: Sun Dec 03, 2023 9:10 pm Will 3001 work with Love 11.4?
I mean, yeah
There nothing related to graphics or window functionality changed in love 11.5 that might broke library.

Also there no real point updating to v3001 since there 0 changes for end user.
Everything that changed is that I removed some unnecessary comments here and there in source code and restored _DOCUMENTATION variable (that should be used in almost 0% of situations) that have link to documentation pdf file that I forget to put during v3001 and bumped library to love 11.5 since it released at same time when I decided to finish v3001 pull request, lol
User avatar
togFox
Party member
Posts: 770
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Resolution Solution [library]

Post by togFox »

So this one confused me and perhaps still does.

This code works as expected:

Code: Select all

	res.conf({game_width = 1920, game_height = 1080, scale_mode = 1})
	res.setMode(1920, 1080, {resizable=false})
But when I set resizable to TRUE like this:

Code: Select all

	res.conf({game_width = 1920, game_height = 1080, scale_mode = 1})
	res.setMode(1920, 1080, {resizable=true})
I notice all my mouse clicks are off just a little bit when I do:

Code: Select all

function love.mousereleased(x, y, button, isTouch)
	local rx, ry = res.to_game(x, y)
All my mouse clicks are off by maybe 10 -> 50 pixels meaning interaction with the GUI doesn't work so well. The drawing is fine. It's confusing. Perhaps I'm doing the conf and setmode incorrectly? I wish to code to a 1920 x 1080 screen whilst allowing the player to resize it to whatever they like. Anyone had this problem before?

Edit: so - more confused - I don't think the library is at fault here. I must be doing something odd but can't pin it down. My GUI is faultless when resize is false and broken when resize = true. I've mapped res.to_game values back to res.to_screen and that's fine and tells me the library is okay. I shall investigate more.
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: Resolution Solution [library]

Post by GVovkiv »

Without actual code I can't do much, in demo everything works fine (the only case where this might not work is cases with rounding, e.g 0.5, so you might get +-1 pixel offset, since library don't do any rounding on itself), maybe you got math wrong somewhere?
Or you didn't apply offsets somewhere properly?
User avatar
togFox
Party member
Posts: 770
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Resolution Solution [library]

Post by togFox »

Is this the correct way to initial RS when I develop in 1920 x 1080 while allowing the user to resize to whatever they want?

Code: Select all

res.conf({game_width = 1920, game_height = 1080, scale_mode = 1})
res.setMode(1920, 1080, {resizable=true})
The demo is 800 x 600 so just checking I got this bit right. 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
Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests