BananaBread is no longer under active development. A fork of this project, cfoust/sour, has continued the effort. Among other things, it adds support for multiplayer servers, upgrades the engine to the latest version of Sauerbraten, and supports all of the game's maps.
A port of the Cube 2/Sauerbraten 3D game engine/first person shooter to the web, compiling C++ and OpenGL to JavaScript and WebGL using Emscripten.
See the FAQ.
A live demo is available. Note that it requires WebAssembly.
Cube 2 is a compact and efficient 3D game engine. By compiling it to JavaScript and WebGL you can run a complete first person shooter in your web browser, using only standard web APIs and without any plugins.
Features:
The original engine also has a lot of other features not yet enabled (but will be):
Get emscripten and its dependencies,
It's recommended to go through the emscripten tutorial to see that it is set up properly.
Then do emmake make client -j8
in cube2/src/web
for a web build.
(You can also do make
in cube2/src/native
for a native linux build.)
You can then run bb.html
(in cube2/
) to see the output.
If you have any problems building, feel free to file an issue here or to find us on emscripten IRC (see emscripten site).
Run python -m SimpleHTTPServer 8888 in cube2/
Load localhost:8888 in your browser
To use maps of your own or make other kinds of changes or additions to the artwork, see the Modding page.
If you append ,debug
to the URL of one of the levels, it will use
bb.debug.js
instead of bb.js
. The debug build has not been run
through closure compiler and is much more readable for stack traces
and profiling and so forth.
Code is zlib licensed (just like Sauerbraten):
Copyright (C) 2001-2012 Sauerbraten authors (see cube2/src/readme_source.txt) and BananaBread authors (see below)
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
BananaBread authors:
All art content in this project (levels/maps, character model, etc. etc.) is either CC-BY or CC-BY-SA, which means you can use it in your projects, including commercial ones. If a directory does not contain a specific license file, then it is new artwork created for this project, which has the CC-BY license,
https://creativecommons.org/licenses/by/3.0/
and copyright is held by the Mozilla Foundation.
Previously-existing content can also be CC-BY-SA, see license files in specific directories.