You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, library simply use game width and height to scale to. So, if you use 1 resolution in your game, then you don't really need to do anything, but, if not... you kinda on your own, kid. If you, for example, want to support e.g 1920x1080 as 16:9 standard, 800x600 as 4:3 or even several resolutions for same aspect, e.g 1280x720, 1920x1080 then you need to manually craft list of resolutions, manually store somewhere, and manually decide what the nearest suitable resolution game can give as default.
So, i propose next:
Ditch rs.setGame() approach and use list with available resolutions, that you can fill with supported by you resolutions. Then, you load them with something like rs.setResolution(aspect, size) where aspect will correspond with aspect table, e.g {[1] = "4x3", [2] = "16x9"} and size with sub-table value with width and height. This will make selected resolution as current, and it will be used to scale to.
Also there will be tons of functions, to deal with list of resolutions, for example, to get list of all available 4:3 sizes, check if resolution is equal window/monitor size, so you could show user a message "This resolution is not match you monitor, continue anyway?" (tho, this sounds very annoying, so implementing this might sucks ass)
And, maybe very useful, include built-in timer, as games do: after changing resolution, lib will put 15 seconds timer and return old settings if options was not confirmed. But i also doubt that this will make into library, because i'm not sure how to approach this without love.update (since library now updates in love.resize)... maybe add separate function as rs.updateTimer(dt)? it sounds really ugly to put 2 update functions for something that could be done at 1...
The text was updated successfully, but these errors were encountered:
At the moment, library simply use game width and height to scale to. So, if you use 1 resolution in your game, then you don't really need to do anything, but, if not... you kinda on your own, kid. If you, for example, want to support e.g 1920x1080 as 16:9 standard, 800x600 as 4:3 or even several resolutions for same aspect, e.g 1280x720, 1920x1080 then you need to manually craft list of resolutions, manually store somewhere, and manually decide what the nearest suitable resolution game can give as default.
So, i propose next:
Ditch rs.setGame() approach and use list with available resolutions, that you can fill with supported by you resolutions. Then, you load them with something like rs.setResolution(aspect, size) where aspect will correspond with aspect table, e.g {[1] = "4x3", [2] = "16x9"} and size with sub-table value with width and height. This will make selected resolution as current, and it will be used to scale to.
Also there will be tons of functions, to deal with list of resolutions, for example, to get list of all available 4:3 sizes, check if resolution is equal window/monitor size, so you could show user a message "This resolution is not match you monitor, continue anyway?" (tho, this sounds very annoying, so implementing this might sucks ass)
And, maybe very useful, include built-in timer, as games do: after changing resolution, lib will put 15 seconds timer and return old settings if options was not confirmed. But i also doubt that this will make into library, because i'm not sure how to approach this without love.update (since library now updates in love.resize)... maybe add separate function as rs.updateTimer(dt)? it sounds really ugly to put 2 update functions for something that could be done at 1...
The text was updated successfully, but these errors were encountered: