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.
Love.js - A Direct Emscripten Port
- Homosexual
- Prole
- Posts: 1
- Joined: Sat Feb 20, 2016 9:49 pm
Re: Love.js - A Direct Emscripten Port
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?
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?
Re: Love.js - A Direct Emscripten Port
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.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?
https://kripken.github.io/emscripten-si ... rview.html
https://kripken.github.io/emscripten-si ... m-API.html
Re: Love.js - A Direct Emscripten Port
Ah, thank you very much, I was already thinking of all kinds of complex ways to get data into love, totally forgot about the filesystem.
Re: Love.js - A Direct Emscripten Port
Hey, trying to build a game using the performance release doesn't seem to work for me.
It does work using the debug and compatability folder.
Here's a log:
It does work using the debug and compatability folder.
Here's a log:
Code: Select all
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>
Re: Love.js - A Direct Emscripten Port
It's hard to know what the issue might be without being able to see your code. The release builds don't give very helpful error messages.
Re: Love.js - A Direct Emscripten Port
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:
Pack.bat:
Packages get created. I put them into the "release-compatibility" directory to test them.
Any obvious mistakes? Thanks in advance.
Here is my installation:
Pack.bat:
Code: Select all
@echo off
%~dp0/python/python %~dp0/emscripten/tools/file_packager.py game.data --preload %~dp0/game@/ --js-output=game.js
Any obvious mistakes? Thanks in advance.
Re: Love.js - A Direct Emscripten Port
Not sure. Can you use the debug directory and then post what you get in your browser console?
Re: Love.js - A Direct Emscripten Port
edit
alright, my mistake (case sensitivity issue in code).
thanks anyway.
alright, my mistake (case sensitivity issue in code).
thanks anyway.
Re: Love.js - A Direct Emscripten Port
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.
Clone my fork of Megasource.
https://bitbucket.org/TannerRogalsky/megasource
And then clone my fork of Love into `libs/love` as per the megasource instructions.
https://bitbucket.org/TannerRogalsky/love
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.
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.
Clone my fork of Megasource.
https://bitbucket.org/TannerRogalsky/megasource
And then clone my fork of Love into `libs/love` as per the megasource instructions.
https://bitbucket.org/TannerRogalsky/love
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.
Who is online
Users browsing this forum: No registered users and 1 guest