Page 22 of 23
Re: Love.js - A Direct Emscripten Port
Posted: Tue Nov 09, 2021 9:31 pm
by abhimonk
Davidobot wrote: ↑Mon Nov 08, 2021 9:19 pm
abhimonk wrote: ↑Sun Nov 07, 2021 3:45 pm
Hello all!
I've been using love.js to port a game to the web and it's worked great 99% of the time, but a few of my players are getting the following error on firefox:
DOMException: The current transaction exceeded its quota
limitations." at love.js line 9, character 324520
Does this have to do with the game's size? I think it's only ~10mb or so. If I go through the code in love.js, the error occurs on the line where love.js calls 'FS.syncFS'.
I can't reproduce this error myself, but some of my players are getting this error on the armorgames version of my love.js game. Any tips? Is there a way around this error? Would shrinking my assets help?
Maybe increase the memory allocated to the game with the -m flag?
Thanks for the response. I'll give that a try and see how it goes!
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 10:33 am
by ivan
Hello, I have another update to the love.js standalone player.
I pulled the latest source code from Davidobot's repository and updated the standalone player.
https://github.com/2dengine/love.js
https://love2d.org/forums/viewtopic.php?f=12&t=92395
In particular I did cleanup and improvements to the front-end.
I highly recommend merging "game.js", "player.js" and "index.html". The rest of the files are unchanged.
It's all under the same license as the previous love.js versions.
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 12:03 pm
by BrotSagtMist
Nice work everybody, works pretty straight forward.
The loading screen fooled me for a minute until i realized i have to turn js on...
Maybe that should be a tad smarter than just a spinning wheel.
Does anyone have a performance comparison for this? How much slower will a game run from a browser instead of real Löve?
I only get like 15 fps for a simple game but i think this is my browsers fault.
Further i have the annoying bug that my space key is not recognized, but only this one key. Anyone else have that?
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 12:45 pm
by ivan
BrotSagtMist wrote: ↑Wed Dec 08, 2021 12:03 pm
The loading screen fooled me for a minute until i realized i have to turn js on...
Maybe that should be a tad smarter than just a spinning wheel.
You need to have JS enabled with a fairly modern browser.
I tried to keep it as simple as possible since you can't really design a loading screen that works for every type of .love game out there.
BrotSagtMist wrote: ↑Wed Dec 08, 2021 12:03 pm
Does anyone have a performance comparison for this? How much slower will a game run from a browser instead of real Löve?
I only get like 15 fps for a simple game but i think this is my browsers fault.
The performance is pretty good on my aging laptop.
It's much slower if you don't have hardware acceleration enabled in the browser.
BrotSagtMist wrote: ↑Wed Dec 08, 2021 12:03 pm
Further i have the annoying bug that my space key is not recognized, but only this one key. Anyone else have that?
I will look into this.
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 1:24 pm
by BrotSagtMist
Nothing against simple, but if all feedback is missing how can one see if there is an error on loading the game?
The space problem happens on text input, i just quickly tested a text input box. Now ive also noticed that keydown reports false positive on shift key. Not useful to nag on every detail i guess.
Is there a buglist? Might be useful for when one plans to make an online game in Löve to have a list of what features differ or do not work. eg i also noticed hex notation numbers make it crash.
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 1:43 pm
by Stifu
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 2:33 pm
by BrotSagtMist
Ah look, its already listed as #18.
Not what i had in mind tho. A bugtracker is rather unsorted.
I meant more like a checklist of stuff to consider you can glance on before you write any code, a short summary of the bugtracker you could say. So you can plan ahead and not end up with a finished game for löve that wont run in love.js
I think that would be useful.
I now have to remove this 60 hex numbers in my theme file...
Re: Love.js - A Direct Emscripten Port
Posted: Wed Dec 08, 2021 2:51 pm
by ivan
BrotSagtMist wrote: ↑Wed Dec 08, 2021 1:24 pm
Nothing against simple, but if all feedback is missing how can one see if there is an error on loading the game?
In the standalone player version all error messages are logged to the browser's console.
I think showing an error messages to the player is not very useful unless it's something very general like "no game".
Also, you can always modify the player.js file to better suit your needs.
So you can plan ahead and not end up with a finished game for löve that wont run in love.js
There is a list of known issues listed in davidobot's repository page.
Re: Love.js - A Direct Emscripten Port
Posted: Sun Dec 12, 2021 10:37 am
by ivan
Davidobot, we need a little bit of help here.
First off, the demos on the GitHub page do not work in non-compatiblity mode. Looks like you need to add the the cross origin fix to davidobot.net
Also, I have some trouble with the memory management with the latest version of the source code:
Code: Select all
love.js:9 pthread_sigmask() is not supported: this is a no-op.
_pthread_sigmask @ love.js:9
$func8115 @ love.wasm:0x331baf
$func7568 @ love.wasm:0x2ce9e5
$func8114 @ love.wasm:0x331b1b
dynCall @ love.js:9
onmessage @ love.worker.js:1
Any tips on what could be causing this warning?
Thank you so much for your work on this project!
Re: Love.js - A Direct Emscripten Port
Posted: Mon Dec 13, 2021 8:11 pm
by Davidobot
ivan wrote: ↑Sun Dec 12, 2021 10:37 am
Davidobot, we need a little bit of help here.
First off, the demos on the GitHub page do not work in non-compatiblity mode. Looks like you need to add the the cross origin fix to davidobot.net
I don't think I can do much about that - it's hosted on GitHub pages so I'm not sure if I have control over that?
ivan wrote: ↑Sun Dec 12, 2021 10:37 am
Also, I have some trouble with the memory management with the latest version of the source code:
Code: Select all
love.js:9 pthread_sigmask() is not supported: this is a no-op.
_pthread_sigmask @ love.js:9
$func8115 @ love.wasm:0x331baf
$func7568 @ love.wasm:0x2ce9e5
$func8114 @ love.wasm:0x331b1b
dynCall @ love.js:9
onmessage @ love.worker.js:1
Any tips on what could be causing this warning?
Thank you so much for your work on this project!
Interesting! Does it only happen in the latest source version? There wasn't anything radical changed in there afaik...
It could be this?
https://github.com/Davidobot/love/commi ... fdbe93f48d
Try removing that line perhaps?
(this looks like a related issue
https://github.com/emscripten-core/emsc ... -489713683 )