load sound that have been zipped [solved]

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
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

load sound that have been zipped [solved]

Post by Joe Black »

I want to load a sound that is in a directory in the game directory :
game/main.lua
game/arrow1.ogg
game/sound/arrow2.ogg

if I do

Code: Select all

love ../game 
it works

if I do

Code: Select all

zip game.love *
love game.love
it fails :
the first sound that is at the root is loaded
the second one put a message sound/arrow.ogg doesn't exist

how can I write the path to arrow2 ?
Attachments
soundfile.love
(11.35 KiB) Downloaded 45 times
Last edited by Joe Black on Tue Mar 03, 2015 10:27 pm, edited 1 time in total.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: load sound that have been zipped

Post by Kingdaro »

The file is zipped incorrectly. Try this instead:

Code: Select all

zip -r game.love .
love game.love
The '-r' flag makes the zip command recurse through directories and keep the paths intact, as opposed to * which literally just takes it all and throws it in without preserving anything. The '.' of course specifies the current directory.
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

Re: load sound that have been zipped [solved]

Post by Joe Black »

Oh yes, very thanks for the rapidity and the accuracy of your answer. Indeed it's completly logical I must had seen my mistake. Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests