Love2D WebPlayer (WebGL)
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: Love2D WebPlayer (WebGL)
Kongregate API for Love2D ? viewtopic.php?f=4&t=10641
love-android - gamejams
Re: Love2D WebPlayer (WebGL)
Guys, did you check out MarketJS? I've been playing around with my Ludumdare Game and the WebPlayer and so far, besides a font issue, everything works just as it should! Was thinking of "pimpin" up my LD game once finished and submitting it there!
Ghoulsblade: will you continue to work on the WebPlayer? It's one piece of awesomeness!
Ghoulsblade: will you continue to work on the WebPlayer? It's one piece of awesomeness!
Re: Love2D WebPlayer (WebGL)
I think for better platform support we need also Canvas 2D fallback. WebGl is nice but limited to desktops.
Ghoulsblade mentioned he will not implement Canvas 2D, but i just like to mention it here that we don't forget this .
Ghoulsblade mentioned he will not implement Canvas 2D, but i just like to mention it here that we don't forget this .
Re: Love2D WebPlayer (WebGL)
Since I know almost no javascript, can someone tell me where's the problem? The .love file works... Sorry but I don't have time noe
http://firepx.altervista.org/giochi/LoveWebApi/Play/
http://firepx.altervista.org/giochi/Lov ... y/main.lua
http://firepx.altervista.org/giochi/Lov ... /notes.lua
http://firepx.altervista.org/giochi/Lov ... /piano.png
http://firepx.altervista.org/giochi/Lov ... verlay.png
http://firepx.altervista.org/giochi/LoveWebApi/Play/
http://firepx.altervista.org/giochi/Lov ... y/main.lua
http://firepx.altervista.org/giochi/Lov ... /notes.lua
http://firepx.altervista.org/giochi/Lov ... /piano.png
http://firepx.altervista.org/giochi/Lov ... verlay.png
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: Love2D WebPlayer (WebGL)
continue work : occasionally, but it's not a priority for me, more of a "if i need something for myself, i'll implement it" situation.
I was hoping to get the community involved in working on the code, i'll extend and help with contributions, but i've done my part and i won't polish it beyond what i need for my own projects.
What's most likely to be improved in the near future is the default font, love 0.8 api adjustments, and physics.
I already started a binding for a web version of box2d, but it's still a lot to do and something doesn't work right with the few bits that are there.
Canvas2D : please make a separate thread to discuss this, we've had it flare up in here a few times and it's annoying since i really have 0 interest in it, sorry. (see also note in first post)
I was hoping to get the community involved in working on the code, i'll extend and help with contributions, but i've done my part and i won't polish it beyond what i need for my own projects.
What's most likely to be improved in the near future is the default font, love 0.8 api adjustments, and physics.
I already started a binding for a web version of box2d, but it's still a lot to do and something doesn't work right with the few bits that are there.
Canvas2D : please make a separate thread to discuss this, we've had it flare up in here a few times and it's annoying since i really have 0 interest in it, sorry. (see also note in first post)
Last edited by ghoulsblade on Mon Aug 27, 2012 12:00 pm, edited 1 time in total.
love-android - gamejams
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: Love2D WebPlayer (WebGL)
nixola :
according to the error message something in note.lua, probably
otherwise you'll need to litter the code with print("spot01") and similar instructions to pin it down since the original .lua line numbers aren't available after conversion to javascript.
also the way you use modules might not work in webplayer, since it tries to convert lua to javascript, and that doesn't work with all language constructs.
i'd recommend using
and doing something like
in there.
no time : according to ludumdare rules, porting is allowed even after the 48/72 hours, so you can just finish the game for native love first, and then later port it to web if you like.
according to the error message something in note.lua, probably
Code: Select all
local args = {...}
otherwise you'll need to litter the code with print("spot01") and similar instructions to pin it down since the original .lua line numbers aren't available after conversion to javascript.
also the way you use modules might not work in webplayer, since it tries to convert lua to javascript, and that doesn't work with all language constructs.
Code: Select all
square = love.filesystem.load 'notes.lua' 'square'
Code: Select all
love.filesystem.load("mylib.lua")()
Code: Select all
mylib = {}
function mylib.bla () print("bla") end
no time : according to ludumdare rules, porting is allowed even after the 48/72 hours, so you can just finish the game for native love first, and then later port it to web if you like.
love-android - gamejams
Re: Love2D WebPlayer (WebGL)
Thanks Ghoulsblade, that was one of the problems... Another one lies in this line:
error during main.lua : Error: attempt to index field 'setSample' in a nil value : Error: attempt to index field 'setSample' in a nil value at lua_tableget
It runs fine on the PC, so I think the problem is Love Web player's audio module, should I pre-render the sounds (how? I can't save them with LOVE >.<) and upload them?
Code: Select all
notes.soundDatas[i]:setSample(s, sin)
It runs fine on the PC, so I think the problem is Love Web player's audio module, should I pre-render the sounds (how? I can't save them with LOVE >.<) and upload them?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: Love2D WebPlayer (WebGL)
sounds don't need preload. but formats other than .wav .ogg and .mp3 will cause problems.
the error message says that somehow "notes.soundDatas" is nil.
this could be being different than in pc-love, or the entry having failed to load.
i'd suggest doing a print("setSample for i=",i) before the line and enabling the console in your browser to see the last output.
also when loading the sounds and setting notes.soundDatas to a value, check the value for being nil and print if not.
the error message says that somehow "notes.soundDatas" is nil.
this could be being different than in pc-love, or the entry having failed to load.
i'd suggest doing a print("setSample for i=",i) before the line and enabling the console in your browser to see the last output.
also when loading the sounds and setting notes.soundDatas to a value, check the value for being nil and print if not.
love-android - gamejams
Re: Love2D WebPlayer (WebGL)
@ ghoulsblade: I'm interested in doing some work on the WebPlayer, since I really see the potential in using Love for web games! Made a github account, going to fork the project and see what I can add/fix!
Re: Love2D WebPlayer (WebGL)
The code
generates this output:
EDIT: I asked to Flashgames.it's admins (it's a famous italian site for flash games) if they'll accept using LÖVE Webplayer, obviously telling them that I've got no rights and that I was only asking some informations, is it ok or I should tell them that you don't want?
Code: Select all
notes.soundDatas[i] = love.sound.newSoundData( 22050, 44100, 16, 1)
for s = 0, 22049 do
print(type(notes.soundDatas), type(notes.soundDatas[i]), i)
--etc.
Code: Select all
NotImplemented:love.sound.newSoundData main.js:61
table nil 1
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Who is online
Users browsing this forum: No registered users and 9 guests