LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Showcase your libraries, tools and other projects that help your fellow love users.
Psyraven
Prole
Posts: 3
Joined: Sat Aug 25, 2018 5:58 pm

LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by Psyraven » Sat Aug 25, 2018 6:16 pm

Hi all

I tried to make the HTML5 port (Love.js) a bit more approachable and created an online tool which can run LÖVE projects and LUA code directly in the browser and also generate a standalone HTML file.

Check it out => LÖVE Web Builder

Because the latest Love.js build is based on version 0.11.1 (a pre-release of the final 11.0) it is sadly not up-to-date with the API but a lot of things can run with minimal modifications. Check the hints section on the top page for caveats and other quirks I encountered during my testing. I think it's a viable target for smaller games, especially game jam releases. I hosted my two latest Ludum Dare entries on the site as examples, they run pretty smooth on the machines I tested.

The samples from the Example-Browser project are available with a simple code editor in the 'Write and Execute Code' tool. A fun way to play with LUA code directly in the browser.

Feedback welcome! :-)

ItsSeaJay
Prole
Posts: 5
Joined: Sun Aug 26, 2018 9:13 am

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by ItsSeaJay » Sun Aug 26, 2018 9:43 am

Hi, Psyraven!

This looks really cool! I've yet to try building any of my back catalogue with it, but the performance of the demos provided has been sublime. I remember trying to build my Love2D Jam 2018 game with love.js and it being somewhat of a nightmare. This should make that process much easier. I especially like the ability to run abitrary code. Have you used GMLive?

Wscb
Prole
Posts: 10
Joined: Sun Apr 08, 2018 8:07 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by Wscb » Mon Aug 27, 2018 3:58 pm

Thanks a lot for that tool! I was just trying to figure out how to do a HTML5 port using Love.js (game's not finished yet, but I prefer to know early where I might have problems). I must have been doing something wrong because it wasn't working but thanks to your tool I won't have to waste time trying to find out what I did wrong. I was also starting to wonder if I'd done something in my code that couldn't be ported, so it put my mind at ease.

Psyraven
Prole
Posts: 3
Joined: Sat Aug 25, 2018 5:58 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by Psyraven » Mon Aug 27, 2018 4:29 pm

ItsSeaJay wrote:
Sun Aug 26, 2018 9:43 am
the performance of the demos provided has been sublime. I remember trying to build my Love2D Jam 2018 game with love.js and it being somewhat of a nightmare. This should make that process much easier.
Performance and ease of deployment/running are main goals of the tool. Sadly a bunch of downsides as listed on the top page. Not having threads breaks streamed audio sources and relying on the Love.js build that is out there means not being on the latest 11.1 API. One day I might give in and set up my own build environment but LÖVE has just a few too many dependencies, making that quite a task...
ItsSeaJay wrote:
Sun Aug 26, 2018 9:43 am
This should make that process much easier. I especially like the ability to run abitrary code. Have you used GMLive?
I just looked at GMLive for the first time and that looks really nice. A good looking text editor and the split editor/game view makes sense. An online LÖVE IDE would be kinda neat (-:
Wscb wrote:
Mon Aug 27, 2018 3:58 pm
I was also starting to wonder if I'd done something in my code that couldn't be ported, so it put my mind at ease.
I have listed some of the quirks of the HTML5 port I came across during my testing on the top page. As mentioned above streaming audio sources are not supported for now. Shaders might need modifications and I stumbled on a few TTF fonts that just didn't work. The used Love.js build is version 0.11.0-rc3 which means it is a late pre-release of 11.0 from July 2017 not including some of the latest changes.

mkapolka
Prole
Posts: 2
Joined: Mon Sep 03, 2018 7:57 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by mkapolka » Mon Sep 03, 2018 8:20 pm

Thanks so much for building this! The design is really nice to use. However, audio is not working for the game I exported. All the sources are in "static" mode so I don't think it's the streaming audio issue. Here's a link to the game: https://mkapolka.itch.io/love-export-ex ... ord=charge

I'm a little curious how to go about debugging this. Are there any instructions on how you build this page? It looks like it's an emscripten-ified version of love.js. Are you working off the 0.11 branch or is there a more official one somewhere I'm not seeing?

Psyraven
Prole
Posts: 3
Joined: Sat Aug 25, 2018 5:58 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by Psyraven » Tue Sep 04, 2018 12:38 pm

Hi there

Thanks for trying it out, and thanks for testing how it looks embedded on itch.io!
There totally should be a page design selection with a border-less option for embedding.

Regarding your sound issue, I looked into it and... it's a bit complicated.

So, your game plays sounds like this:

Code: Select all

            self.sound:stop()
            self.sound:play()
Which is perfectly fine but it somehow translates to three lower-level OpenAL instructions 'stop, play, seek to position 0'. I don't have an explanation why just sound:play() alone is just 'play' without the 'seek' instruction but that's how it arrives in the javascript OpenAL implementation.

Turns out, seek is very wrongly implemented in the runtime that was used when our love.js was built. Furthermore, it acts the same as stop when used! For now, I ended up removing everything seek was doing which is now on the site, your game should run fine now.

As you guessed, the build of love.js used by my tool is straight from the love.js github 0.11 branch (as is written on the top page). I really want to do my own build but LÖVE has a tad too many dependencies so it seems a daunting task to set up a build environment. A lot of problems could go away with a up-to-date build.

User avatar
zorg
Party member
Posts: 2379
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by zorg » Tue Sep 04, 2018 1:13 pm

A tidbit of info, not sure if relevant or not, but Löve proper changed how the audio internals worked in either 11.0 or 0.10 (that is, the state of love.audio Sources), by removing the paused state, making the pause function stop playback, and the stop function both stop playback, and seek to 0.

This does simplify the internal state, although the js implementation may simply be ordering the 3 instructions wrong (in theory, it should be "stop, seek to 0, play")
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

mkapolka
Prole
Posts: 2
Joined: Mon Sep 03, 2018 7:57 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by mkapolka » Fri Sep 07, 2018 3:24 pm

Psyraven wrote:
Tue Sep 04, 2018 12:38 pm
Turns out, seek is very wrongly implemented in the runtime that was used when our love.js was built. Furthermore, it acts the same as stop when used! For now, I ended up removing everything seek was doing which is now on the site, your game should run fine now.
This worked for me, thanks so much! I've been looking into trying to get a new build of love.js going with the 11.1 tag but yeah, it's really hard! If I get anything working I'll let you know. I'd love for love to have more robust support for html5 export.

PGUp
Citizen
Posts: 68
Joined: Fri Apr 21, 2017 9:17 am

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by PGUp » Sun Oct 14, 2018 11:41 am

the .zip file is damaged for me?
-

User avatar
yintercept
Prole
Posts: 27
Joined: Mon Apr 02, 2018 3:31 pm

Re: LÖVE Web Builder, a tool to package, build and run LÖVE games for the web

Post by yintercept » Sun Oct 14, 2018 7:32 pm

This is actually a really nifty idea and a gap that needed to be filled.
I'm not programmer so it's one last platform I have to deal with. It's a good start
Currently working on something Love2D could really use. Shhh.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests