Page 13 of 21

Love.js v11.3

Posted: Sat Sep 12, 2020 12:11 pm
by Davidobot
Hey everyone!

I've been slowly tinkering away at the v11.3 port. I've recently released proper build instructions for Windows, and a compatibility version just today. The latter makes things a bit slower if your game uses threads, but makes the exported game available in basically every browser you can think of (including mobile browsers!)

I've updated the demos on my website. The coolest one to try on mobile is the G3D Demo.

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 1:06 pm
by Stifu
I got that to work on the first try by simply following the new readme.me on the repo, and without even checking my older posts here. That's good. :)

I used Another Kind of World as the source love file. That one works flawlessly.
It doesn't work with our own game yet (it didn't work before either, but I didn't bring it up), probably we're doing things that are not compatible. I think we can figure it out on our own. Disabling shaders and removing the usage of the inspect.lua lib (as it results in a weird Error: Syntax error: lib/debug/inspect.lua:1: unexpected symbol near '燎 error) makes our game load, at least! Then it freezes as you select a character.

Amazingly, our .xm music files play for a second before stopping, I didn't expect them to work at all. I thought only mp3 or ogg would work on the web.

Just for fun, this is what it looks like now (I'll probably take that link down soon): https://www.zabuyaki.com/play3/

PS: I'm thankful for the compatibility version which will be useful for us.

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 1:37 pm
by Davidobot
Stifu wrote:
Sat Sep 12, 2020 1:06 pm
I got that to work on the first try by simply following the new readme.me on the repo, and without even checking my older posts here. That's good. :)
Super! I think I'm getting down to the problem behind shaders not working - I think it has to do with different memory alignments in emscripten. It's 16 in WASM, but 8 in asm.js

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 2:05 pm
by yetneverdone
Did i just read that threads work in web but is slower?

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 2:11 pm
by Stifu
Davidobot, can you recommend how to write code paths that are only for lovejs? Maybe through start-up command line arguments?
This would enable us to write code such as "if not lovejs, then go fullscreen", and so on. Thank you.

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 3:08 pm
by Davidobot
yetneverdone wrote:
Sat Sep 12, 2020 2:05 pm
Did i just read that threads work in web but is slower?
Threads work both on the compatibility and normal release. On the former, they are slower.
Stifu wrote:
Sat Sep 12, 2020 2:11 pm
Davidobot, can you recommend how to write code paths that are only for lovejs? Maybe through start-up command line arguments?
This would enable us to write code such as "if not lovejs, then go fullscreen", and so on. Thank you.
love.system.getOS returns Web in-browser. ;)

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 4:58 pm
by MadByte
I noticed that Another Kind of World has some visual problems like the stuff seen on the image (background tile not visible etc). I wonder what is causing this as this doesn't happen in the normal version of the game.
Also for me the music cuts out right after it started playing in the love.js port.

Image

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 6:56 pm
by Davidobot
Stifu wrote:
Sat Sep 12, 2020 1:06 pm
Amazingly, our .xm music files play for a second before stopping, I didn't expect them to work at all. I thought only mp3 or ogg would work on the web.
MadByte wrote:
Sat Sep 12, 2020 4:58 pm
Also for me the music cuts out right after it started playing in the love.js port.
My bad, I forgot to mention that threading is necessary for proper audio support. I updated the README on the GitHub with both the full and compat versions of the demos, so you can see the difference.
MadByte wrote:
Sat Sep 12, 2020 4:58 pm
I noticed that Another Kind of World has some visual problems like the stuff seen on the image (background tile not visible etc). I wonder what is causing this as this doesn't happen in the normal version of the game.
Firefox seems to be having some graphical glitches, e.g. the depth buffer not working on desktop Firefox but working on (mobile) Chrome. For audio, see the above comment.

Re: Love.js - A Direct Emscripten Port

Posted: Sat Sep 12, 2020 7:22 pm
by MadByte
Davidobot wrote:
Sat Sep 12, 2020 6:56 pm
Firefox seems to be having some graphical glitches, e.g. the depth buffer not working on desktop Firefox but working on (mobile) Chrome. For audio, see the above comment.
I tested it on desktop Chrome / Chromium as well - same issue. :P

Re: Love.js - A Direct Emscripten Port

Posted: Sun Sep 13, 2020 7:44 am
by D0NM
Dear friends!
This lovejs is such a cool think
It should be way more popular. Now trying to see where does our Zabuyaki stop working with lovejs.