• This repository has been archived on 27/Oct/2020
  • Stars
    star
    490
  • Rank 87,770 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

LÖVE ported to the web using Emscripten

UNMAINTAINED

This project has been inactive for a while! You're probably looking for https://github.com/Davidobot/love.js

Love.js

This is LÖVE ported to the web using Emscripten.

It differs from Motor or Punchdrunk in that it is not a reimplementation but a direct port of the existing LÖVE v0.10.0 code with very few code modifications. As such, it should be at feature parity, as long as the browser it's running in supports a given feature.

Examples

Here are some live games:

Dependencies

  • Python 2.7

Python 2.7 will allow you to package your game into a format that Emscripten can read. It will also let you run a simple web server for testing. Python 3.5 is not supported at this time.

Usage

Get the code.

  1. Clone the repository. git clone https://github.com/TannerRogalsky/love.js.git
  2. Clone the submodules: git submodule update --init --recursive

Package your game

  1. Navigate into the debug folder.
  2. Package your game.
  • python ../emscripten/tools/file_packager.py game.data --preload [path-to-game]@/ --js-output=game.js
  • This should output two files: game.data and game.js into the debug folder.
  • Make sure you include the '@/' after the path to your game source. This will tell the file packager to place your game at the root of Emscripten's file system.
  • Make sure your [path-to-game] does not contain any non ascii characters

Test it

  1. Run a web server.
  • python -m SimpleHTTPServer 8000 will work.
  1. Open localhost:8000 in the browser of your choice.

Release it

  1. If everything looks good, nagivate to the release folder. Package and test your game for release.
  2. The release-compatibility folder can now be copied to a webserver. A simple static webserver should suffice.

Release Types

release-compatibility is recommended if the performance it yields is adequate. The difference between compatibility and performance is that performance is compiled with exception catching disabled and memory growth disabled. This means that you will not be able to rely on catching exceptions from C++ in your code and you may need to set TOTAL_MEMORY on the Module object to indicate how much memory your game will require.

Issues

Some things, like threads, don't have browser support yet. Please check the project issues for known problems.

Contributing

Please consider submitting a test. Any functionality that isn't covered in spec/tests would be very useful.

The build process for this project is still a very manual process and is not ready to be shared. Feel free to keep an eye on the emscripten branch of my LÖVE fork if you're really curious.

More Repositories

1

sprockets-es6

Sprockets ES6 transformer
Ruby
304
star
2

punchdrunk

An attempt to replicate the LÖVE API in the browser using moonshine.
JavaScript
81
star
3

love2d_template

A base template for any Love2D game including a bunch of libraries and structure.
Lua
21
star
4

lua-poly2tri

A Lua wrapper around poly2tri.
C
11
star
5

polyline.lua

A polyline implementation in pure Lua
Lua
7
star
6

Friendshape

A cute, coop 2D platformer
Lua
6
star
7

tokio-tungstenite-wasm

A wrapper around websys and tokio-tungstenite that makes it easy to use websockets cross-platform.
Rust
6
star
8

morguelike

Lua
5
star
9

Stratcave

2D platform strategy game
Lua
4
star
10

Demoloops

A framework for making quick looping animations
C++
4
star
11

tannerrogalsky.github.com

Personal site repo
JavaScript
4
star
12

catenary.lua

A catenary implementation in Lua
Lua
4
star
13

NomicBot

A IRC bot to facilitate the playing of Nomic
Python
3
star
14

Robocode

A colleciton of robots for robocode competitions.
Java
2
star
15

vidispine.js

API helper for Vidispine in JS
JavaScript
2
star
16

LVLG

The LittleViking level generator
Java
2
star
17

CoffeeScript-Heroku-IRC

An IRC bot, written in CoffeeScript, designed to run on Heroku.
JavaScript
2
star
18

big_trouble

Prototypes for a top-down adventure/mystery game.
Lua
2
star
19

make-stateful

Turns your JavaScript objects into little state machines.
JavaScript
2
star
20

eisenscript

A programming language designed for generating awesome structures.
Rust
2
star
21

sportball

Multiplayer physics sport game
Lua
1
star
22

GravityGame

Gravity-based simulation
Java
1
star
23

suits

A sub-1KB set of playing cards.
JavaScript
1
star
24

VerticesFromImage

This is a small tool for obtaining vertices from an image.
Java
1
star
25

raf-runner

Simple API for running a function in a requestAnimationFrame loop.
JavaScript
1
star
26

XChat-Foobar2000-NowPlayingScript

An XChat now playing script written to work with foobar2000
C
1
star
27

GRIDPHREAK

Love2D schmup
Lua
1
star
28

sharecart1000

http://sharecart1000.com/
Lua
1
star
29

GGJ2017

Global Game Jam 2017
Lua
1
star
30

prevention-game

A private game jam game by Tanner and Chris
Lua
1
star
31

winit_minimal_example

A minimal window + GL example that works on native & wasm
Rust
1
star
32

LoveZip

An implementation of the Zip File Format in Lua
Lua
1
star
33

dungeon_generation_unity_talk

Dungeon Generation Talk written for http://www.meetup.com/Toronto-Unity-Developers/events/159614512/
Ruby
1
star
34

kamasutris

TGGJ 2013
Lua
1
star
35

wogademo_2013

Game for WOGADEMO 2013
Lua
1
star
36

wherehouse

Where?House game
Lua
1
star
37

gbcjam6

GBC Jam #6
Lua
1
star
38

ROMJAM2016

A game made for the 2016 ROMJAM
Lua
1
star
39

jsonschema-to-ts

Rust
1
star
40

wasm-raytracer

wasm shared memory raytracer
Rust
1
star
41

wasm-micro-rs

minimalist wasm from rust
Rust
1
star
42

hades

A Hades save editor
Rust
1
star
43

youre_next_hackathon

Repo for the game I made in solidarity with the contestant in the You're Next Hackathon
Lua
1
star
44

Whyday-Hackathon

Lua
1
star