## Love.js - A Direct Emscripten Port

Discuss any ports of LÖVE to different platforms.
Tanner
Party member
Posts: 164
Joined: Tue Apr 10, 2012 1:51 am

### Re: Love.js - A Direct Emscripten Port

Introducing the 0.11 branch of love.js.

This is a significant departure from the previous version released and is the shape of what I imagine will eventually be the official release of this port.

A few things of note:
• This is compiled with and relies on Emscripten's pthreads. This severely restricts which browsers will run this project but it's necessary to support Love's full range of features; not just Lua threads but also media decoding. It also means that this project cannot be compiled to Web Assembly yet. But fixes for these problems are just a matter of time. If you have an up-to-date browser you likely already have support for SharedArrayBuffers behind a flag and so you can run the multithreaded code even if it's still experimental.
• Errors should properly propagate to the Love error screen now. A long-time frustration of users of the previous version was that errors just killed the process (sometimes without so much as an error message). This fix is brought to us by some in-progress work to reconcile native and browser main loops. Screenshot: https://i.imgur.com/Z5EvLBq.png
• We now make much more effective use of the cmake build files. This includes not using the emscripten ports repositories to ensure dependencies are the same across platforms and compile SDL2 with pthreads support. This was, pleasantly, not as big an undertaking as I thought it might be.
• The project is modularized which means that you can run more than one instance on a page. See the provided index.html pages for examples.
How you can help: The easiest way for you to help would be to expanding the testing files with the features you'd like to see. Grab a nightly build of Love 0.11 and run the specs in the repository.

Ulydev
Party member
Posts: 408
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

### Re: Love.js - A Direct Emscripten Port

Amazing work!! Keep it up!

undef
Party member
Posts: 434
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

### Re: Love.js - A Direct Emscripten Port

Yaaay!

Tanner
Party member
Posts: 164
Joined: Tue Apr 10, 2012 1:51 am

### Re: Love.js - A Direct Emscripten Port

I've put together a node.js cli tool to facilitate building using this project.

Ensure you have the latest version of node.js installed and then you can run:

Code: Select all

npm install -g love.js
From that point, creating a new love.js project should be as easy. Running love.js will prompt you for some information and then output all the necessary files to debug and release you game.

Code: Select all

  Usage: love.js [options] <input> <output>

Options:

-h, --help            output usage information
-V, --version         output the version number
-t, --title <string>  specify game name
-m, --memory [bytes]  how much memory your game will require [16777216]


Ulydev
Party member
Posts: 408
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

### Re: Love.js - A Direct Emscripten Port

Tanner wrote:
Tue May 30, 2017 5:08 pm
I've put together a node.js cli tool to facilitate building using this project.
This. is. amazing.

D0NM
Party member
Posts: 166
Joined: Mon Feb 08, 2016 10:35 am