WEIRD PNG image problem

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
CryoNox
Prole
Posts: 18
Joined: Sun Jun 28, 2009 2:25 pm
Location: Singapore

WEIRD PNG image problem

Post by CryoNox »

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.
Thy father beckons.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by bartbes »

That is weird.. Anyway, you might open the zip and see if something is different, or if the image got corrupted, still.. weird.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: WEIRD PNG image problem

Post by rude »

Post the .love which fails.
User avatar
CryoNox
Prole
Posts: 18
Joined: Sun Jun 28, 2009 2:25 pm
Location: Singapore

Re: WEIRD PNG image problem

Post by CryoNox »

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.
Attachments
game.love
(35.61 KiB) Downloaded 190 times
Thy father beckons.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by bartbes »

It worked once I changed loveBG.png into LoveBG.png (in your code).
User avatar
CryoNox
Prole
Posts: 18
Joined: Sun Jun 28, 2009 2:25 pm
Location: Singapore

Re: WEIRD PNG image problem

Post by CryoNox »

oh thanks bartbes, I didn't notice the case :D

Still, its kinda weird that the problem only occurs after it is compressed into a .love file.
Thy father beckons.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by Robin »

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by bartbes »

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)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by Robin »

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: WEIRD PNG image problem

Post by bartbes »

Robin wrote:About every tenth project or so on PyGame didn't run until every filename was re-cased.
How do you dare talk about PyGame? :P

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 79 guests