Page 60 of 91
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Mar 30, 2016 12:58 pm
by bobismijnnaam
MadByte wrote:Ptruptrucea wrote:Is there some method to the play function that loops the video?
Can't you just do something like
Code: Select all
if not video:isPlaying() then
if video:tell() > 0 then video:rewind() end
video:play()
end
I never used the video functionality, so this is just an untested idea. Also I don't know if you need to rewind the video after it ends or if this happens automatically so I added the extra loop to make sure it does.
Fun fact: 0.10.1 has a bug in isPlaying() causing it to sometimes not return whether or not the video is actually playing. This is fixed in the next release though (there's also a thread about it on this forum).
Edit:
viewtopic.php?f=4&t=82017
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Mar 30, 2016 5:02 pm
by Ptruptrucea
As far as I understand it, the bug was caused by an extra audio frame. Doesn't matter to me, since there's no audio in my video.
Now, a second question - How do I stop the thing from playing? I found only a "pause" command, I need the entire video to be purged when I press a button (which also changes the state).
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Mar 30, 2016 5:18 pm
by Sfe
MadByte wrote:Sfe wrote:...
Works as expected for me.
Double check that you don't use an older version of LÖVE accidentally.
Try using "l" instead of 1 or use love.getVersion() and print it.
Actually, switching the 1 to an 'l' did the trick. Looks like it was just a version difference I suppose. Thanks!
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Mar 30, 2016 5:20 pm
by Nixola
If "l" works, you're using 0.9.2 or earlier. You should update to 0.10.1, there's almost no reason to stay behind.
Re: "Questions that don't deserve their own thread" thread
Posted: Sun Apr 03, 2016 8:09 pm
by zerocoolisgod
Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
Re: "Questions that don't deserve their own thread" thread
Posted: Sun Apr 03, 2016 8:20 pm
by s-ol
zerocoolisgod wrote:Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
It's a "wont" not a "cant". Its a limitation so that users/players have some peace of mind when running löve games and so programmers dont have to handle all the different platforms and savegame logic themselves.
Re: "Questions that don't deserve their own thread" thread
Posted: Sun Apr 03, 2016 8:22 pm
by slime
s-ol wrote:zerocoolisgod wrote:Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
It's a "wont" not a "cant". Its a limitation so that users/players have some peace of mind when running löve games and so programmers dont have to handle all the different platforms and savegame logic themselves.
It's also a "can't". The game directory is zipped in most cases when the game is run on other machines. Plus, in many cases the game won't even have write permission from the OS to the folder containing the zip file!
Re: "Questions that don't deserve their own thread" thread
Posted: Sun Apr 03, 2016 8:39 pm
by zerocoolisgod
That all makes sense. I just like the idea of save games and configs being in the game directory. Even something like a block data file like a virtual disc or something, and only being able to write to it. But you'd still need write permissions for that so idk. It's a minor gripe, but I understand wanting to protect players from jerks writing malware into love games.
Re: "Questions that don't deserve their own thread" thread
Posted: Mon Apr 04, 2016 2:08 am
by CapitalEx
I can't seem to get love.filesystem.createDirectory to work with a .love file on android. Do I need to pack my app into a .apk file first?
EDIT
Nevermind, didn't see t.externalstorage had to be set to true
Re: "Questions that don't deserve their own thread" thread
Posted: Mon Apr 04, 2016 5:25 am
by Jarodeno93
I've been playing a game that uses love2d and it was running fine until recently. Now the game can only run when my laptop is plugged into my tv through an hdmi cable. Without it double clicking on the .exe/trying to run it results in nothing happening. Any idea on what could cause this and how to fix this?