Is Tlfres defunct?
Posted: Thu Jan 18, 2018 7:18 pm
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
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?
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
. 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.Error: main.lua:12: attempt to index global 'tlfres' (a nil value)
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?