Skip to content

bnoordhuis/jove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JÖVE

Like LÖVE but with JavaScript instead of Lua.

JÖVE is a framework for making 2D games in JavaScript.

WORK IN PROGRESS

build

$ cargo build  # produces target/debug/jove

running

$ jove [options ...] <script> [args ...]

# example: log garbage collector activity
$ jove --trace_gc --trace_gc_verbose script.js

Run jove --help to see a list of all options.

Script arguments are available through the global args array.

example

// run with: jove example.js
const WHITE = [1,1,1,1];
const RED = [1,0,0,1];

let d = 0;
let s = Number(args[0]) || 1.0;

function render() {
    const x = 350 + 200 * Math.sin(d);
    const y = 250 + 150 * Math.cos(d);
    d = (d + .005) % 360;
    clear(...WHITE);
    rectangle(...RED, x, y, 100 * s, 100 * s);
}

About

JÖVE is a framework for making 2D games in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages