[javascript]Luv.js

Discuss any ports of LÖVE to different platforms.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: [javascript]Luv.js

Post by Davidobot »

Another question: can you loop music?
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

Yes, you should be able to play music in a loop. Assuming that you have the music ogg file loaded in a variable called music, you can do:

Code: Select all

music.play({loop: true});
If you are not doing anything weird with the music (like playing it simultaneously with different offsets/volumes) you should be able to later stop the music with:

Code: Select all

music.stop();
If you are doing something more complex with sound instances you will have to stop each instance independently. If you don't know what a sound instance is, you can probably disregard this paragraph.

Full disclosure: While the API exists and the tests pass, I still have not tested them completely - I have not used them in a game/demo yet. loop is one of the options I have not tested yet. It should work, but if it doesn't please let me know. Pretty please with a cherry on top.
When I write def I mean function.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: [javascript]Luv.js

Post by Davidobot »

PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

Nice ^^
When I write def I mean function.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: [javascript]Luv.js

Post by Davidobot »

This should be moved to the "Ports" section of the forum.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: [javascript]Luv.js

Post by T-Bone »

Davidobot wrote:This should be moved to the "Ports" section of the forum.
Is it really a port though? I see luv.js more like a standalone, albeit very LÖVE-inspired, javascirpt game framework. But perhaps the difference doesn't matter much. If HÖVE counts as a port, so should luv.js I guess (since they both use different languages with a LÖVE-like API),
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

I don't consider Luv.js a port at all, but If people want to move the post here, I'm ok with it (it is actually easier to find here :P)
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests