Love.js - A Direct Emscripten Port

Discuss any ports of LÖVE to different platforms.
abhimonk
Prole
Posts: 6
Joined: Sat Sep 25, 2021 3:30 pm

Re: Love.js - A Direct Emscripten Port

Post 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!
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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.
Last edited by ivan on Wed Dec 08, 2021 12:41 pm, edited 1 time in total.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Love.js - A Direct Emscripten Port

Post 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?
obey
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Love.js - A Direct Emscripten Port

Post 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.
obey
User avatar
Stifu
Party member
Posts: 106
Joined: Mon Mar 14, 2016 9:53 am
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Stifu »

BrotSagtMist wrote: Wed Dec 08, 2021 1:24 pmIs there a buglist?
Yes: https://github.com/Davidobot/love.js/issues
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Love.js - A Direct Emscripten Port

Post 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...
obey
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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.
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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!
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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 )
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests