I just gave it a shot with a little project using only draw.circle and draw.text, and while the debug version worked fine the release on threw me a js exception. As I'm completely oblivious to .js, web stuff, and code in general, I haven't dug deeper into the problem.
I'm just here to say thank you, tanner. This is a -massive- step towards a future full of löve.
Coming back to my previous question on getting data from JS.
There's 2 things I really need love.js to do.
First one being, passing me the resolution of the browser window, so the game can scale accordingly.
And second.
Somehow reading data from the server, so I can, for example, put in block data in a .json, which it then will read and add to the game, without having to recompile the game.
You were saying you cant do that "right now", does that mean that we'll be able to in the (hopefully soon) future?
Tjakka5 wrote:Coming back to my previous question on getting data from JS.
There's 2 things I really need love.js to do.
First one being, passing me the resolution of the browser window, so the game can scale accordingly.
And second.
Somehow reading data from the server, so I can, for example, put in block data in a .json, which it then will read and add to the game, without having to recompile the game.
You were saying you cant do that "right now", does that mean that we'll be able to in the (hopefully soon) future?
You don't need love.js to do either of those. You can change the canvas size with css and you can write arbitrary data to the emscripten filesystem from JS using the same API emscripten does in its compiled code.
unreachable code after return statement love.js:8:100113
unreachable code after return statement love.js:11:65646
unreachable code after return statement love.js:14:205640
unreachable code after return statement love.js:8:100113
bad name in getProcAddress: glIsVertexArrayOES,glIsVertexArray love.js:1:27303
Error: [string "boot.lua"]:229: Already initialized love.js:1:3399
stack traceback: love.js:1:3399
[C]: in function 'init' love.js:1:3399
[string "boot.lua"]:229: in function <[string "boot.lua"]:223> love.js:1:3399
[C]: in function 'xpcall' love.js:1:3399
Assertion failed: emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters. love.js:1:3399
Assertion failed: emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters. love.js:24:15713
uncaught exception: abort("Assertion failed: emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.") at jsStackTrace@http://localhost:8000/love.js:1:17162
stackTrace@http://localhost:8000/love.js:1:17345
abort@http://localhost:8000/love.js:24:15936
assert@http://localhost:8000/love.js:1:7547
_emscripten_set_main_loop@http://localhost:8000/love.js:1:70494
_emscripten_set_main_loop_arg@http://localhost:8000/love.js:1:281879
bl@http://localhost:8000/love.js:6:1273
callMain@http://localhost:8000/love.js:24:14301
Module.setStatus@http://localhost:8000/:61:13
run/</<@http://localhost:8000/love.js:24:15143
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information. <unknown>
I've trouble setting up the server. It gets stuck after the game file has been downloaded. It says "running" but nothing else happen (using Chrome).
Here is my installation:
I've put a lot of work into getting Love to build with emscripten using the existing Love cmake build system. Everything seems to be working now. It's still not for the faint of heart but everything is much more consolidated and straightforward than it was before.
It requires, of course, the emscripten SDK to be installed. This project won't compile with the released binaries so you will need to use the pseudo-release tagged as `sdk-incoming-64bit`. If you can get that compiled and installed then the rest of this should be a cakewalk.
Check out the `emscripten` branch of each of these. Then make a build folder inside of megasource and run `emcmake cmake -H.. -B. && emmake make`. It should spit out a debug `.js` build.