Page 2 of 2

Re: My images won't load..

Posted: Sun Jul 11, 2010 9:54 am
by Will
nevon wrote:
Will wrote:I had the exact same problem. I was trying to use an image for a background; it was 800 x 600. I changed it to 512 x 512 and it displayed. This poses a problem for me though. Since the window for Love runs at a default 800 x 600 resolution, how am I supposed to add a background if the framework doesn't support images that are 800 x 600?
Just create your image like you want it, and then add transparent padding to make it 1024x1024.
What's transparent padding? Like a buffer around the image? Sorry, I am new at this.
nevon wrote:
Will wrote:Is there a way to make the resolution of the default window smaller? Maybe something like 768 x 768, perhaps? I'm new to Love and new to Lua as well. Help would be greatly appreciated.
There is. 768 isn't a power of two though.
Ah, yes. 1024. Sorry it's 5 am in the morning here and I never was good at math. :) Thank you for the link!

vrld wrote:
Will wrote:Is there a way to make the resolution of the default window smaller? Maybe something like 768 x 768, perhaps? I'm new to Love and new to Lua as well.
Yes, there is:

http://love2d.org/wiki/Config_Files
http://love2d.org/wiki/love.graphics.setMode
Thank you as well!

Re: My images won't load..

Posted: Sun Jul 11, 2010 10:36 am
by nevon
Will wrote:
nevon wrote:
Will wrote:I had the exact same problem. I was trying to use an image for a background; it was 800 x 600. I changed it to 512 x 512 and it displayed. This poses a problem for me though. Since the window for Love runs at a default 800 x 600 resolution, how am I supposed to add a background if the framework doesn't support images that are 800 x 600?
Just create your image like you want it, and then add transparent padding to make it 1024x1024.
What's transparent padding? Like a buffer around the image? Sorry, I am new at this.
Anything that's outside of your window won't be shown to the user. So if your image is 1024x1024px large, and your window 800x600 (and the image drawn at 0,0), only the first 800x600 pixels of the image will be shown. I'll show you an example:

Image

The total width and height of the image is 1024x1024, but only the first 800x600 is shown. So if you make a background that is 800x600, just add 224 transparent pixels to the right, and 424 transparent pixels on the bottom.

Re: My images won't load..

Posted: Sun Jul 11, 2010 10:42 am
by Will
nevon wrote:The total width and height of the image is 1024x1024, but only the first 800x600 is shown. So if you make a background that is 800x600, just add 224 transparent pixels to the right, and 424 transparent pixels on the bottom.
Ah, got it now. Thank you very much for the help I really appreciate it.