Love.js - A Direct Emscripten Port

Discuss any ports of LÖVE to different platforms.
unlimitedbacon
Prole
Posts: 6
Joined: Sun Dec 27, 2015 10:28 pm

Re: Love.js - A Direct Emscripten Port

Post 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.
rnlf
Prole
Posts: 7
Joined: Wed Jul 29, 2015 1:15 pm

Re: Love.js - A Direct Emscripten Port

Post 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 :(
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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:
User avatar
Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Re: Love.js - A Direct Emscripten Port

Post 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. :)
User avatar
SiENcE
Party member
Posts: 806
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Love.js - A Direct Emscripten Port

Post by SiENcE »

@Tanner Great work! Thanks for this.

Now i hope it's added as öfficial löve pört :).
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Love.js - A Direct Emscripten Port

Post 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
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Love.js - A Direct Emscripten Port

Post 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?
User avatar
Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Re: Love.js - A Direct Emscripten Port

Post 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.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Love.js - A Direct Emscripten Port

Post 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?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Re: Love.js - A Direct Emscripten Port

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests