TLfres - resolution freedom

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Davidobot
Party member
Posts: 1212
Joined: Sat Mar 31, 2012 5:18 am
Location: Cambridge, UK
Contact:

Re: TLfres - resolution freedom

Post by Davidobot »

Can this be used with a camera lib? I tried it and it screwed up my entire game. :|
My projects: Raycaster, love.js v11.3 port
itch page: link
My website: link
My library: LovelyMoon
Teraku
Prole
Posts: 27
Joined: Mon Jun 24, 2013 10:01 am
Location: The Netherlands

Re: TLfres - resolution freedom

Post by Teraku »

Sorry for bumping this, but I'm having a bit of a problem. I originally programmed my game to work at a resolution of 1280x720, but I would like to be able to have the game play in 1024x768 instead. However, I just get a black screen when using this.

I don't really understand how you're supposed to use TLfres.setScreen() with arguments. Could anyone give me an example?
User avatar
Taehl
Dreaming in associative arrays
Posts: 1024
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: TLfres - resolution freedom

Post by Taehl »

This library is very old and not compatible with modern versions of Love2D. I'm going to port it once I can figure out the correct aspect ratio math instead of my old kludge.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
knorke
Prole
Posts: 47
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

Re: TLfres - resolution freedom

Post by knorke »

(old thread but it seems to be the newest?)
So I dug up an old löve project on an old harddisk. It was in 800x600 resolution and I had never bothered to deal with the boring maths of screen resolutions and ratios. I found https://love2d.org/wiki/TLfres , did as written in the instruction and it worked.
Thanks!

Small note:
TLfres does not set the BlendMode. My game was drawing over the letterboxes because the last used blendmode in love.draw() had been "add".
(If you draw a circle with centerpoint at x=0 then half the circle will be offscreen. Or in case of using TLfres: on top the letterbox)
Fix:

Code: Select all

love.graphics.setBlendMode("alpha")
TLfres.endRendering({0.1,0,0.1})
togFox
Party member
Posts: 112
Joined: Sat Jan 30, 2021 9:46 am

Re: TLfres - resolution freedom

Post by togFox »

I get a black screen but would love to see this working.

Edit: IDK why but it started working when I defined a letterbox colour (instead of relying on default). Makes no sense.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests