Hey all, I've encountered a weird problem when I create my own .png images. When I drag my project folder into the LÖVE icon, the image loads perfectly fine. However, when I compress everything into a zip folder and change the extension to .love, the image fails to load when I run the program. This is really weird because the LÖVE logo which I downloaded has no problem in loading, but the error only occurs when I try to load my own PNG images.
Help?
I used both Adobe Photoshop CS3 as well as MSPaint to create the PNG images, and this weird problem occurs.
I'm using Windows Vista by the way.
WEIRD PNG image problem
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
WEIRD PNG image problem
Thy father beckons.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
That is weird.. Anyway, you might open the zip and see if something is different, or if the image got corrupted, still.. weird.
Re: WEIRD PNG image problem
Post the .love which fails.
Re: WEIRD PNG image problem
alright I've attached it
By right, you're supposed to see the love logo fading in before fading out. It doesn't appear though, cos the image won't load.
By right, you're supposed to see the love logo fading in before fading out. It doesn't appear though, cos the image won't load.
- Attachments
-
- game.love
- (35.61 KiB) Downloaded 199 times
Thy father beckons.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
It worked once I changed loveBG.png into LoveBG.png (in your code).
Re: WEIRD PNG image problem
oh thanks bartbes, I didn't notice the case
Still, its kinda weird that the problem only occurs after it is compressed into a .love file.
Still, its kinda weird that the problem only occurs after it is compressed into a .love file.
Thy father beckons.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
I guess that in compressed archives Case Matters(tm). Or at least with the love.filesystem back-end (PhysicsFS).
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
Of course PhysFS is a layer on top of the filesystem, so while NTFS and FAT are case-insensitive, zip appears to be case-sensitive (just like a lot of other systems, so watch your case)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
Even on Windows, using the correct case is good practice. The system isn't case-sensitive, but sloppiness about case can only shoot you in the foot later. Especially if you or other people want to use it on other systems. About every tenth project or so on PyGame didn't run until every filename was re-cased.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: WEIRD PNG image problem
How do you dare talk about PyGame?Robin wrote:About every tenth project or so on PyGame didn't run until every filename was re-cased.
Anyway, he's right, it's not just good for cross-platformness (?), but also as a good coding practice, it's like variables, a variable called "a" is not to be referenced to using "A", even if the language supports it, it's just bad.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 15 guests