• Stars
    star
    1,375
  • Rank 34,198 (Top 0.7 %)
  • Language
    C++
  • Created over 12 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML

The BananaBread Engine


Notice

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.

Demos

A live demo is available. Note that it requires WebAssembly.

Overview

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:

  • A multitude of visual effects including water reflection/refraction, parallax mapping, glare, particle effects, lightmaps, skeletal animation (on gpu), etc. etc.
  • Streamlined and quick physics system
  • Ragdoll physics
  • Bot AI with adjustable skill level
  • Integrated in-game editor
  • Fast performance both running on the web or natively
  • zlib license

The original engine also has a lot of other features not yet enabled (but will be):

  • Multiplayer
  • Multiplayer editing
  • Shadowmapping

Building

Get emscripten and its dependencies,

http://emscripten.org

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).

  • See needed.txt for some possibly useful scripts to package the output.

Running

  1. Run python -m SimpleHTTPServer 8888 in cube2/

  2. Load localhost:8888 in your browser

Modding

To use maps of your own or make other kinds of changes or additions to the artwork, see the Modding page.

Debugging

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.

License

Code

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:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

BananaBread authors:

  • Alon Zakai
  • Gregor Koch
  • Bobby Richter

Art

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.

More Repositories

1

ammo.js

Direct port of the Bullet physics engine to JavaScript using Emscripten
C++
4,147
star
2

box2d.js

Port of Box2D to JavaScript using Emscripten
C
1,316
star
3

speak.js

Text-to-Speech in JavaScript using eSpeak
C++
1,279
star
4

llvm.js

LLVM compiled to JavaScript using Emscripten
JavaScript
455
star
5

webgl-worker

JavaScript
231
star
6

xml.js

Port of libxml to JavaScript using Emscripten
JavaScript
174
star
7

zee.js

zlib compiled to JavaScript using Emscripten
C
97
star
8

j2k.js

Port of OpenJPEG, an open-source JPEG2000 codec, to JavaScript using Emscripten
C
82
star
9

intensityengine

[Not active!] An open source platform for 3D games and virtual worlds
C++
58
star
10

lzma.js

An LZMA implementation in JavaScript, compiled from lzip
C++
56
star
11

meandmyshadow.web

C
51
star
12

Massive

The asm.js benchmark
JavaScript
47
star
13

gmp.js

A port of the GNU Multiple-Precision Library (GMP), a library for arbitrary precision arithmetic, to JavaScript using Emscripten
C
44
star
14

mloc_emscripten_talk

JavaScript
41
star
15

clangor

clang ported to js
C++
41
star
16

worker-ui

Discussions and experiments with splitting UI rendering off the main thread on the web, using workers
34
star
17

boon

Freedoom + PrBoom: Open source Doom in HTML5
C++
33
star
18

Relooper

this repo is deprecated, see the binaryen repo
C++
21
star
19

build-suite

Pre-built WASM builds
JavaScript
19
star
20

bullet

C++
18
star
21

cashew

asm.js parser in C++
C++
18
star
22

syntensity

Experimental port of Sauerbraten/Syntensity to the web, using Emscripten
C++
17
star
23

talks

JavaScript
16
star
24

llvm-js

C++
16
star
25

clang-js

C++
14
star
26

cxx_demangle

C++ name demangling
JavaScript
14
star
27

misc-js-benchmarks

Miscellaneous JavaScript Benchmarks, of Dubious Value
JavaScript
13
star
28

emscripten-site

Emscripten website
HTML
11
star
29

demo-bananabread

BananaBread demo
JavaScript
10
star
30

musl-emscripten

C
10
star
31

binaryen-webpack-plugin

Binaryen plugin for webpack: shrinks wasm files
Python
8
star
32

webgl-2d-screen

JavaScript
7
star
33

embenchen

Emscripten benchmark suite
JavaScript
6
star
34

xz-lzma.js

C
3
star
35

simulations

Python
2
star
36

almond

C
2
star
37

tps_report_cloud_archiver

JavaScript
2
star
38

blog

SCSS
2
star
39

minir

C++
1
star
40

embooken

1
star
41

llvm-js-2

Trying to coax the Cpu0 backend to output JS
C++
1
star