Page 18 of 23

Re: Love.js - A Direct Emscripten Port

Posted: Thu Oct 22, 2020 11:29 am
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)

Re: Love.js - A Direct Emscripten Port

Posted: Thu Oct 22, 2020 2:19 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Sun Oct 25, 2020 4:24 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Sun Oct 25, 2020 5:08 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Sun Oct 25, 2020 7:58 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Sun Oct 25, 2020 8:00 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Mon Oct 26, 2020 2:51 am
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!

Re: Love.js - A Direct Emscripten Port

Posted: Mon Oct 26, 2020 9:53 am
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.

Re: Love.js - A Direct Emscripten Port

Posted: Mon Oct 26, 2020 12:57 pm
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.

Re: Love.js - A Direct Emscripten Port

Posted: Mon Dec 21, 2020 11:24 pm
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?