Zipping love games and Mouse joints

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.
Post Reply
User avatar
MHD
Prole
Posts: 18
Joined: Fri Nov 14, 2008 11:45 pm
Location: Denmark

Zipping love games and Mouse joints

Post by MHD »

I have made a cool prototype of a physics sandbox and now I want to make a zipped game file, proble is that I can't make love recognize the file.
I am using 7zip and zipping using ordinary zipping algorithms (.zip).

How do you zip games?

Also for the aforementioned physics sandbox, I would like a mouse pickup function, but I can't seem to figgure out the mouse joint's properties.
I r awsum at looah ^^
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Zipping love games and Mouse joints

Post by rude »

Put main.lua at the root of the .zip-file, not in a directory.
User avatar
MHD
Prole
Posts: 18
Joined: Fri Nov 14, 2008 11:45 pm
Location: Denmark

Re: Zipping love games and Mouse joints

Post by MHD »

Ah, thanks ^^
I r awsum at looah ^^
u9_
Citizen
Posts: 54
Joined: Thu Oct 23, 2008 7:12 am

Re: Zipping love games and Mouse joints

Post by u9_ »

I see i am not the only one having this problem. May I come with a suggestion:

When love starts, it looks for the main.lua file, should it not find it in the root directory, it looks in the first child directory of the zip file to see if there is a main.lua file, and continues to the next child directory until it finds main.lua?

The reason I suggest this is because quite a few people (and i thank them all for having this habit) zip the entire folder when they zip their project, not just the content. So that when you unzip "to this location" as it were, you don't get a billion files scattered where you didn't actually plan to have them. Whether archives should be contained within their own folder within the archive or not is an ancient battle, and i'm not here to say which is right... I'm just suggesting love be able to support both approaches :)
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Zipping love games and Mouse joints

Post by Kaze »

u9_ wrote:I see i am not the only one having this problem. May I come with a suggestion:

When love starts, it looks for the main.lua file, should it not find it in the root directory, it looks in the first child directory of the zip file to see if there is a main.lua file, and continues to the next child directory until it finds main.lua?

The reason I suggest this is because quite a few people (and i thank them all for having this habit) zip the entire folder when they zip their project, not just the content. So that when you unzip "to this location" as it were, you don't get a billion files scattered where you didn't actually plan to have them. Whether archives should be contained within their own folder within the archive or not is an ancient battle, and i'm not here to say which is right... I'm just suggesting love be able to support both approaches :)
That's just a silly idea. It's not hard to zip the contents of a folder (I use a batch file because I'm super-lazy, though).
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Zipping love games and Mouse joints

Post by Green_Hell »

Kaze wrote:That's just a silly idea. It's not hard to zip the contents of a folder (I use a batch file because I'm super-lazy, though).
I must agree with you.
>>I love LÖVE.<<
User avatar
farvardin
Party member
Posts: 167
Joined: Sat Jun 28, 2008 6:46 pm

Re: Zipping love games and Mouse joints

Post by farvardin »

I find it's a good idea u9_

It's a good habit to put zip content into a subfolder.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Zipping love games and Mouse joints

Post by rude »

LÖVE would use the subfolder-way as the only way, but sadly, that's not how PhysicsFS works. You can't set the root to something inside the zip. I would also at all cost like to avoid prefixing everything manually.
u9_
Citizen
Posts: 54
Joined: Thu Oct 23, 2008 7:12 am

Re: Zipping love games and Mouse joints

Post by u9_ »

rude, what do you mean, "avoid prefixing everything manually?"

I am surprised some of you think this was a silly idea. I would think flexibility is a good thing :) There have already been examples where this would have helped, i.e. the folder zipped, instead of the content of the folder. But it is not that important though. No worries ;)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Zipping love games and Mouse joints

Post by rude »

I mean that when the user calls love.graphics.newImage("dog.png"), it's converted to love.graphics.newImage("gamename/dog.png") before being sent to PhysFS.

But now that I think about it, it would only require an extra check in a single function, at least in the next version. Hmm, I'll think about it.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 155 guests