Page 1 of 1

Is Tlfres defunct?

Posted: Thu Jan 18, 2018 7:18 pm
by randy0428
Is Tlfres defunct?

I tried using it based on https://love2d.org/wiki/TLfres and it didn’t work in my project. It just gave me a black window.

So I tried a test of the code on the above referenced page.

I made a directory called scaler.
Inside this directory I created 3 blank files, conf.luamain.lua and tlfres.lua.
In conf.lua I specified the size as 800x600 and made it resizable.
I copied the code from the tlfres.lua section of the page to the tlfres.lua file in my directory.
I copied the code from the example section of the page to the main.lua file in my directory.
When I ran the project, I got
Error: main.lua:12: attempt to index global 'tlfres' (a nil value)
. I looked and the tl in tlfres needs to be TL (capitalized), so I corrected that. I also found two other places where the tl needed to be capitalized, so I corrected those and ran the program again.
When I ran the program, I just got a plain black screen.
In the love.draw() function, I commented out the 3 lines which called functions from the tlfres.lua file and it printed a screen with the dot in the center (400x300). But as I resized the window, the dot didn’t stay in the center, it stayed at 400x300, which is the center when the window is 800x600, but not when the window is a different size.

So, what’s the deal with TLfres? Is there another way to handle the scaling for a resizable game? I’ve seen simpleScale by tomlum on github. If I can’t use TLfres is simpleScale a viable option?

Re: Is Tlfres defunct?

Posted: Sat Jan 20, 2018 3:42 pm
by MMR4tzvp
Sorry, I don't know anything about TLfres or simpleScale, but push by Ulydev seems pretty good. There is a forum topic about it too.

Re: Is Tlfres defunct?

Posted: Tue Jan 23, 2018 3:50 pm
by randy0428
Thanks, MMR4tzvp.
I took a quick look at the push page on github and it looks good. I'll look at using it sometime in the future, but I'm occupied with some other things right now.
Thanks again.

Re: Is Tlfres defunct?

Posted: Wed Sep 06, 2023 7:23 am
by Xx_GenericGameDev_xX
For me it works as expected, maybe they released a fix. The black screen could be a result of the endRendering() function, which draws black letterboxes by default. I had to call it with a table ( tlfres.endRendering({255,255,255,255} ) to get graphics.

Re: Is Tlfres defunct?

Posted: Wed Sep 06, 2023 3:42 pm
by zorg
Considering it's from before 2017, TLfres should be considered defunct.

Re: Is Tlfres defunct?

Posted: Wed Sep 06, 2023 7:54 pm
by dusoft
This is another scaling library:
https://github.com/Vovkiv/resolution_solution

Re: Is Tlfres defunct?

Posted: Wed Sep 06, 2023 8:25 pm
by GVovkiv
dusoft wrote: Wed Sep 06, 2023 7:54 pm This is another scaling library:
https://github.com/Vovkiv/resolution_solution
Ah...
I feel myself kinda flattered, when someone recommends my library to someone, lol.

Re: Is Tlfres defunct?

Posted: Thu Sep 07, 2023 7:17 am
by togFox
Resolution Solution is very much 'active' and easy to use. It's been a constant library in all my projects for sometime now.

Re: Is Tlfres defunct?

Posted: Thu Sep 07, 2023 7:23 am
by darkfrei
The lib Resolution Solution is nice and simple to use, it can be one of the best libs for this needs.