"Questions that don't deserve their own thread" thread

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.
Locked
User avatar
bobismijnnaam
Prole
Posts: 18
Joined: Thu Mar 17, 2016 5:18 pm
Location: Netherlands
Contact:

Re: "Questions that don't deserve their own thread" thread

Post 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
taart
lc = love.timer -- love.chrono :-)
Ptruptrucea
Prole
Posts: 7
Joined: Wed Mar 30, 2016 10:10 am

Re: "Questions that don't deserve their own thread" thread

Post 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).
Sfe
Prole
Posts: 2
Joined: Wed Mar 30, 2016 7:34 am

Re: "Questions that don't deserve their own thread" thread

Post 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!
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: "Questions that don't deserve their own thread" thread

Post 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.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
zerocoolisgod
Prole
Posts: 28
Joined: Fri Jan 22, 2016 2:48 am

Re: "Questions that don't deserve their own thread" thread

Post by zerocoolisgod »

Why can't live write to the games directory? Is it because the standard distribution method is a zipped game directory?
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: "Questions that don't deserve their own thread" thread

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

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
slime
Solid Snayke
Posts: 3159
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Questions that don't deserve their own thread" thread

Post 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!
zerocoolisgod
Prole
Posts: 28
Joined: Fri Jan 22, 2016 2:48 am

Re: "Questions that don't deserve their own thread" thread

Post 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.
User avatar
CapitalEx
Prole
Posts: 8
Joined: Fri Jul 24, 2015 2:33 am

Re: "Questions that don't deserve their own thread" thread

Post 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 :crazy:
Last edited by CapitalEx on Tue Apr 05, 2016 12:22 am, edited 1 time in total.
~~<Ɵ/\/\_: *snake noises*
Jarodeno93
Prole
Posts: 4
Joined: Mon Apr 04, 2016 4:50 am

Re: "Questions that don't deserve their own thread" thread

Post 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?
Locked

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests