Skip to content

seekerluke/browser-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blueberry Engine

A 2D game engine in your browser. Loads a Berry language interpreter with WASM which lets you write and reload scripts from a webpage made with Svelte. The game runtime itself uses PixiJS.

Usage

To build the engine for use with the editor, use build-for-editor.sh. It will automatically build the engine and copy the files needed into the editor directory.

To build the engine on its own, make sure you have make installed and do the following in a command line:

make OUTPUT=engine-build.js

This will build a library for the Berry interpreter, and then compile it with the engine itself to produce the final output, which is defined by the OUTPUT variable, in this case engine-build.js. You can change this to whatever path you like.

The resulting JavaScript file is built as an ES6 module by default, which can be imported into a Node.js environment. This is how the web editor uses this file.

This command uses Emscripten, and you can change the output to produce a .wasm or .html file instead, but this has not been tested.

To build the web editor, go to the editor directory and run the appropriate NPM commands listed in package.json. The JS file you built from the engine should go in editor/src/lib.

About

A 2D game engine in your browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published