Hello,
So, I'm relatively experienced with Lua already, and I'm looking to make a small game to familiarize myself with this engine. I want to make a low-resolution racing game, so I found a library that would keep the resolution of the game when you resize it, so hopefully the game would run on any resolution. The library I'm using is resolution solution (https://github.com/Vovkiv/resolution_solution). I tested this library with some text and images, and it works fine, but then I tried using some love.graphics drawing functions, and then I noticed a problem. These functions don't actually draw to the target resolution, so they end up looking much more smooth than they should. I'll attach my current program that shows this issue. Basically, no matter how you resize the window, it will be rendered the same way every time. I either need a different library that keeps the resolution that also works with love.graphics, or a library that draws at the target resolution every time, so if you have any suggestions, that would be very helpful!
Help with keeping resolution
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 2
- Joined: Thu Dec 12, 2024 12:01 am
Help with keeping resolution
- Attachments
-
- resolution_solution.lua
- (23.48 KiB) Downloaded 328 times
-
- main.lua
- (1.28 KiB) Downloaded 351 times
-
- game.love
- (7.94 KiB) Downloaded 196 times
Re: Help with keeping resolution
Hello there, the creator of "Resolution Solution" is here, lol.
If I understand you correctly, you want to draw rectangles, polygons, etc scaled, not "smooth". To achieve something like this, instead of using scissors method of drawing (that used as default example), but rather canvas method https://github.com/Vovkiv/resolution_so ... ith_canvas.
You do all your drawing operations to canvas and then you scale canvas itself.
Here, patched code: If that what you mean - great!
If not, then ask more questions and I will try to respond.
Using scissors: Using canvas: Also, if you are going for pixel art (based on scaling method, low-resolution and font in source) then don't forget to use nearest filtering which is best suited for pixel art
If I understand you correctly, you want to draw rectangles, polygons, etc scaled, not "smooth". To achieve something like this, instead of using scissors method of drawing (that used as default example), but rather canvas method https://github.com/Vovkiv/resolution_so ... ith_canvas.
You do all your drawing operations to canvas and then you scale canvas itself.
Here, patched code: If that what you mean - great!
If not, then ask more questions and I will try to respond.
Using scissors: Using canvas: Also, if you are going for pixel art (based on scaling method, low-resolution and font in source) then don't forget to use nearest filtering which is best suited for pixel art
Code: Select all
love.graphics.setDefaultFilter("nearest", "nearest")
-
- Prole
- Posts: 2
- Joined: Thu Dec 12, 2024 12:01 am
Re: Help with keeping resolution
That's exactly it! Thank you so much!
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 12 guests