Love.js - A Direct Emscripten Port

Discuss any ports of LÖVE to different platforms.
User avatar
Davidobot
Party member
Posts: 1209
Joined: Sat Mar 31, 2012 5:18 am
Location: Cambridge, UK
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Davidobot » Wed Feb 03, 2021 11:18 am

ivan wrote:
Wed Feb 03, 2021 6:53 am
The love file has to be in the same folder as the player until we figure this out.
Happy Wednesday :) I attached a prototype thing I quickly whipped up that allows anyone to drag-and-drop a .love file into your player and it will run. It's incredibly ugly and I hacked together some code to make it work, but it works :) There is also a bunch of needless checks, and I disabled caching (bc I didn't have time to test it) and fallback to compatibility version (bc it needs to be slightly smarter than changing URL)

There is also a live version on my website: https://davidobot.net/lovejs/lovejsplayer/index.html

EDIT: I just want to add that nothing gets uploaded anywhere and it's pretty fast as the browser will be loading from your local FS.

EDIT 2: you can make compat work by probably pre-loading (depending on the user agent) the correct js files.
Attachments
lovejsplayer.zip
(3.31 MiB) Downloaded 26 times
My projects: Raycaster, love.js v11.3 port
itch page: link
My website: link
My library: LovelyMoon

gianmichele
Citizen
Posts: 57
Joined: Tue Jan 14, 2014 11:03 pm

Re: Love.js - A Direct Emscripten Port

Post by gianmichele » Wed Feb 03, 2021 12:31 pm

yep yep yep, definitely working. I love it!

User avatar
Popolon
Prole
Posts: 11
Joined: Mon Nov 07, 2016 11:03 am
Location: France/Paris

Re: Love.js - A Direct Emscripten Port

Post by Popolon » Thu Feb 04, 2021 10:34 pm

Nice job ! On Linux, it works perfectly on Falkon browser (Webkit based) but not at all on Firefox.
The Compatibility version work with Firefox.

User avatar
Stifu
Party member
Posts: 102
Joined: Mon Mar 14, 2016 9:53 am
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Stifu » Fri Feb 05, 2021 7:05 pm

Popolon wrote:
Thu Feb 04, 2021 10:34 pm
Nice job ! On Linux, it works perfectly on Falkon browser (Webkit based) but not at all on Firefox.
The Compatibility version work with Firefox.
I guess it doesn't work with Firefox simply because it's missing the required headers:
In Firefox, the normal version can throw Uncaught ReferenceError: SharedArrayBuffer is not defined. Fix is discussed here. TL;DR Enable the following HTML reponse headers on the website you're hosting your project on:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests