Page 4 of 23

Re: Love.js - A Direct Emscripten Port

Posted: Mon Feb 15, 2016 5:59 am
by unlimitedbacon
Thanks, slime. GLSL/ESSL is an unforgiving language. It still has issues, but at least it actually runs now.

I found an online tool for validating shader code. You just need to remember to change back Love's aliases.

Re: Love.js - A Direct Emscripten Port

Posted: Thu Feb 18, 2016 2:10 pm
by rnlf
I guess my poor old Motor2d is obsolete now. Good job!

Did you experience any performance impact by all the exception-aware code? When I started my project, I explicitly wanted to avoid the performance penalty for exception-aware code in Emscripen.

I have to say, while I am happy that this project exists, I'm also sad that you obsoleted my own project :(

Re: Love.js - A Direct Emscripten Port

Posted: Thu Feb 18, 2016 4:26 pm
by Ulydev
rnlf wrote:I guess my poor old Motor2d is obsolete now. Good job!

Did you experience any performance impact by all the exception-aware code? When I started my project, I explicitly wanted to avoid the performance penalty for exception-aware code in Emscripen.

I have to say, while I am happy that this project exists, I'm also sad that you obsoleted my own project :(
You should not take this as a competition, but rather as a really big project you've taken part in. You guys should really work together on this web port. :awesome:

Re: Love.js - A Direct Emscripten Port

Posted: Thu Feb 18, 2016 7:06 pm
by Tanner
rnlf wrote:I guess my poor old Motor2d is obsolete now. Good job!

Did you experience any performance impact by all the exception-aware code? When I started my project, I explicitly wanted to avoid the performance penalty for exception-aware code in Emscripen.

I have to say, while I am happy that this project exists, I'm also sad that you obsoleted my own project :(
Emscripten disables exception catching for -O2 and higher. I'm not sure what continued performance impact this has. Performance profiling and improvement is always going to be a thing but, for the time being, I'm pretty happy with how things run.

P.S. I hope you learned stuff while making Motor2D and if you did then you shouldn't be sad. Writing Punchdrunk taught me a ton about graphics pipelines and, even though Motor2D was better than it, I don't regret making. If nothing else, it's a great resume piece. :)

Re: Love.js - A Direct Emscripten Port

Posted: Fri Feb 19, 2016 1:26 pm
by SiENcE
@Tanner Great work! Thanks for this.

Now i hope it's added as öfficial löve pört :).

Re: Love.js - A Direct Emscripten Port

Posted: Fri Feb 19, 2016 3:54 pm
by bobbyjones
SiENcE wrote:@Tanner Great work! Thanks for this.

Now i hope it's added as öfficial löve pört :).
Probably in like 300 years when 0.11.0 is released

Re: Love.js - A Direct Emscripten Port

Posted: Sat Feb 20, 2016 11:50 am
by Tjakka5
Awesome work, I'm planning on using this for a few commercial projects, and I was wondering if you have any tips on achieving the following:

1. Optimization.
Of course the game will run slower than a executable, but is there anything in particular I can do/have to watch out for to get the most amount of performance?

2. Loading times.
I've noticed that loading games can take a little while. Any way to speed that up a tad?

3. Accessing data from the server.
I don't know if this is possible, I haven't tested it either. But is there some way for the Love project to access a file that is stored on the server, for example a .json?

4. Sending data from Javascript to Love.
Again, don't know if its possible, but is there any way for Javascript to send data to Love, such as when a button on the page is pressed?

I've also noticed that my games tend to run at a really low framerate (~5 to 10 fps), with a bunch of lagspikes. And after 30 seconds or so they start performing normal. Any idea what the cause of that is, and how to prevent it?

Re: Love.js - A Direct Emscripten Port

Posted: Sat Feb 20, 2016 3:23 pm
by Tanner
Tjakka5 wrote:Awesome work, I'm planning on using this for a few commercial projects, and I was wondering if you have any tips on achieving the following:

1. Optimization.
Of course the game will run slower than a executable, but is there anything in particular I can do/have to watch out for to get the most amount of performance?

2. Loading times.
I've noticed that loading games can take a little while. Any way to speed that up a tad?

3. Accessing data from the server.
I don't know if this is possible, I haven't tested it either. But is there some way for the Love project to access a file that is stored on the server, for example a .json?

4. Sending data from Javascript to Love.
Again, don't know if its possible, but is there any way for Javascript to send data to Love, such as when a button on the page is pressed?

I've also noticed that my games tend to run at a really low framerate (~5 to 10 fps), with a bunch of lagspikes. And after 30 seconds or so they start performing normal. Any idea what the cause of that is, and how to prevent it?
1. Turn on vsync. Don't create new objects in your game loop.
2. Use the release build. Make your server is configured to gzip the assets it serves.
3. Not easily right now.
4. Not right now.

If I had to guess, asset loading and object creation.

Re: Love.js - A Direct Emscripten Port

Posted: Sat Feb 20, 2016 6:51 pm
by josefnpat
For loading times, would it help if we actually added a loader, or is it loading all the assets into memory at once anyway?

Re: Love.js - A Direct Emscripten Port

Posted: Sat Feb 20, 2016 6:56 pm
by Tanner
josefnpat wrote:For loading times, would it help if we actually added a loader, or is it loading all the assets into memory at once anyway?
The release page has a barebones loader. Everything gets loaded into memory because emscripten emulates a filesystem in-memory because browser don't provide a synchronous filesystem implementation. I really depends on what the major bottleneck is: is it actually downloading the assets, is it loading them into memory or is it the initial load and run of the application?