TLfres - resolution freedom
Re: TLfres - resolution freedom
Can this be used with a camera lib? I tried it and it screwed up my entire game.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: TLfres - resolution freedom
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?
I don't really understand how you're supposed to use TLfres.setScreen() with arguments. Could anyone give me an example?
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: TLfres - resolution freedom
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+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: TLfres - resolution freedom
(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:
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})
Re: TLfres - resolution freedom
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.
Edit: IDK why but it started working when I defined a letterbox colour (instead of relying on default). Makes no sense.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
Re: TLfres - resolution freedom
I noticed some strange behaviour:
When using fullscreen, sometimes after a few minutes my game randomly gets rendered in the original desktop resolution instead of the TLfres resolution of 800x600. When that happens, everything gets rendered in the upper left corner of the screen and at smaller scale. Strangely, a love.particleSystem that I use as background animation still gets drawn correctly in the middle of the screen.
Sadly my game's code is a total mess, maybe I can provide a cleaner example at some time. Until then does anyone have an idea what might cause this? This is on windows 10.
When using fullscreen, sometimes after a few minutes my game randomly gets rendered in the original desktop resolution instead of the TLfres resolution of 800x600. When that happens, everything gets rendered in the upper left corner of the screen and at smaller scale. Strangely, a love.particleSystem that I use as background animation still gets drawn correctly in the middle of the screen.
Sadly my game's code is a total mess, maybe I can provide a cleaner example at some time. Until then does anyone have an idea what might cause this? This is on windows 10.
Re: TLfres - resolution freedom
as not be a DenverCoder9, I'll reply to myself
my game had two places where stuff was drawn like this:
that caused the translate/scale to get messed up. Replaced like this:
So it was a mistake in my code. Maybe a thing to learn here is that when using this, one has to be careful with graphics states/modes. (also see previous post on BlendMode)
my game had two places where stuff was drawn like this:
Code: Select all
love.graphics.translate(v.b:getX(), v.b:getY())
love.graphics.polygon("line", v.s:getPoints())
love.graphics.origin()
Code: Select all
love.graphics.translate(v.b:getX(), v.b:getY())
love.graphics.polygon("line", v.b:getWorldPoints(v.s:getPoints()))
Who is online
Users browsing this forum: No registered users and 215 guests