Love.js - A Direct Emscripten Port

Discuss any ports of LÖVE to different platforms.
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: Thu Sep 17, 2020 8:29 am Any tips for the "reload the page if screen is blank" bug?
This one is annoying and happens about 1/3 of the time.
Might be related to this: https://github.com/Davidobot/love.js/issues/16 ie try changing the minwidth/height
Sheepolution wrote: Wed Oct 21, 2020 9:50 pm When does the pthread error appear? After successfully porting several older games I encountered a game that gave me this error. But I'm pretty sure that I don't use any threads. I can't think of anything special I'm doing that I don't do in other games.
It appears for any game compiled with the non-compat build option when run on a non-Chrome browser (with the exception of Firefox when setup on a host with the correct CrossOrigin settings)
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
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Sheepolution »

Davidobot wrote: Thu Oct 22, 2020 11:29 am It appears for any game compiled with the non-compat build option when run on a non-Chrome browser (with the exception of Firefox when setup on a host with the correct CrossOrigin settings)
Well I did make non-compat build but I did run it in Chrome so that's weird. For now I'll try to see if I'm doing something weird in the game.
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Sheepolution »

I had an error: 'An error occurred before the game window could be initialised. Please check the console!'

I had this error because the I loaded my font with "love.graphics.newFont("myFont.ttf") while the file was named myFont.TTF. This works with LÖVE, but not with Love.js Changing the name to myFont.ttf (so with lowercase .ttf) it worked. I am not reporting this as a bug, as I think this is reasonable, but saying it here in case anyone has the same problem.
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 »

Sheepolution wrote: Sun Oct 25, 2020 4:24 pm This works with LÖVE, but not with Love.js
This probably doesn't work with LÖVE on case-sensitive OSes. In other words, it probably only works on Windows. Better be consistent with your casing.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Sheepolution »

I encountered another error. This one only happened sometimes. This was caused by my love.resize. I think it's because I used a variable in my love.resize that is created in another file that is required. So I think sometimes the resizing happens before the other file is required? Not sure if that makes sense but anyway check if the variables you want to use exist and then it's probably good I guess.
User avatar
pgimeno
Party member
Posts: 3541
Joined: Sun Oct 18, 2015 2:58 pm

Re: Love.js - A Direct Emscripten Port

Post by pgimeno »

Stifu wrote: Sun Oct 25, 2020 5:08 pm This probably doesn't work with LÖVE on case-sensitive OSes. In other words, it probably only works on Windows. Better be consistent with your casing.
+1. I often suffer that when I check Löve applications from Windows developers. If the web version is case sensitive too, that's actually good, because the windows users who port their programs to web have a means to check their portability with respect to case sensitive filenames.

By the way, when you zip your programs into a .love file and run that, you'll probably run into the same issue. However, you won't notice it if you have the .love in the same directory of the application, because then PhysFS will find the files that are out of the .love.

So, another way to test is to create a .love file, move it out of the application's directory, then run it.
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Sheepolution »

I just finished porting most of my LÖVE games. I made a Twitter thread about it: https://twitter.com/Sheepolution/status ... 0597142528

Thanks again David!
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 »

Sheepolution wrote: Sun Oct 25, 2020 7:58 pm I encountered another error. This one only happened sometimes. This was caused by my love.resize. I think it's because I used a variable in my love.resize that is created in another file that is required. So I think sometimes the resizing happens before the other file is required? Not sure if that makes sense but anyway check if the variables you want to use exist and then it's probably good I guess.
I think this problem might be solved if the minwidth/height one gets resolved too. Probably some nondeterminism at play somewhere in there.
Sheepolution wrote: Mon Oct 26, 2020 2:51 am I just finished porting most of my LÖVE games. I made a Twitter thread about it: https://twitter.com/Sheepolution/status ... 0597142528

Thanks again David!
Super cool to see!! This is the main reason I wanted to get the project up and running again - to spread the LÖVE)) makes playing games much easier, especially when they're jam games or smaller experiments.
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
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Love.js - A Direct Emscripten Port

Post by Sheepolution »

Using preventDefault on a keyCode prevents that key from triggering love.textinput

This means that space doesn't work, as that is one of the keys that are in the preventDefault list. The fix for me was to simply not use the preventDefault code.
gianmichele
Citizen
Posts: 63
Joined: Tue Jan 14, 2014 11:03 pm

Re: Love.js - A Direct Emscripten Port

Post by gianmichele »

I was playing some sheepolution games and all need chrome to run. Any reason for this? Will this ever run on mobile Safari?
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests