BananaBread – Cube 2 engine in the browser

After BrowserQuest (I described the merits and the installation over here) the Mozilla Foundation didn’t stop by bringing top-down 2D multiplayer to the web. A couple of days ago they released Bananabread. From the description:

BananaBread is a 3D first person shooter that runs on the web. It takes the Cube 2: Sauerbraten engine, which is written in C++ and OpenGL, and compiles it using Emscripten into JavaScript and WebGL so that it can run in modern browsers using standards-based web APIs and without the need for plugins.

This is important in a couple of ways.

  1. This is a full-fledged first person shooter running completely in the browser  in JavaScript and WebGL – smoothly.
  2. The described development way – compilation of a C/C++ with Emscripten – could be one way to go to develop games or virtual world environments in the browser (as opposed to written in JS directly).
  3. I learned in the Google Creative Sandbox in Berlin that Google sees the Chrome browser more and more as a multimedia engine to run creative applications – like games. That’s why they are incorporating things like WebGL and the Mouse Lock API. Obviously Mozilla/Firefox agrees.
  4. Sauerbraten.

I’ll go into more detail for this last bullet.

The Sauerbraten engine – luckely renamed Cube afterwards – was written by Wouter van Oortmerssen back in 2002 with Cube 2 following two years later as a re-design. The major features that makes Cube 2 stand out from the rest of the pack are:

  1. It is lightening fast on current hardware and runs great even on older hardware because it uses a cube based, oct-tree approach to render the world.
  2. It’s a multiplayer game with real-time editing abilities.
  3. It’s open source.

Now let’s look at the first issue: the cube based approach. If that sounds familiar – that’s right. That’s the same approach that Mojangs Minecraft uses. Also the second bullet – multiplayer editing – is a feature of Minecraft: in fact the multiplayer editing feature is what makes most of the fun (according to personal observations and some relatives ;-) ).

I am not stressing this to tell somebody ripped the concept of somebody else, rather the opposite: we can learn from both concepts to create better virtual worlds.

To me, Minecraft today seems to be as close to virtual world immersion as it gets, with its incredibly easy user interface and the fantastic crafting notion. Sauerbraten, on the other hand, features more realistic graphics, although using the same blocky approach. Also it’s open source. Both have clients for Windows, Mac OSX and Linux  using a completely different approach (Java vs. C++).

With virtual worlds being at an all time low (see the Gartner Hype Cycle 2012 discussed in Wagner James Aus NWN ) we need to learn from these concepts to do it better next time – and there will be a next time.

With the WebGL translation of Sauerbraten, I can’t help but stress there are ways to create a multi-plattform, multi-device approach for games and virtual worlds – even within the browser.

If I had too much time and/or money on my hands, I’d propably start with the Cube 2 engine, de-militarizing it (a bit) and slowly but surely adding features like external user authentification, multi-screening abilities, DropBox integration – maybe even crafting features. The Sandbox Game Makers did a Cube 2 conversion towards a somewhat more peaceful, educational game play:

There’s tons of ressources and mods out there. I’d like to point out the excellent (albeit german) ressources at Natenoms Blog with a very friendly user community, explaining important more advanced features like mumble integration (i.e. VoIP support in Cube 2).

11 Responses to BananaBread – Cube 2 engine in the browser

  1. cronos3k says:

    look at its a restructured version of cube 2 including the new Tesseract render and a new scripting interface

  2. Dirk says:

    Thank you! I remember this project but wasn’t sure if it is under active development. Your comment seems to prove it is? :-) i will check this out – thanks again.

  3. azakai says:

    Hi there, I am one of the people working on BananaBread. I’d love to work with people that want to make a more virtual worlds thing with this technology – basically doing as you said, starting with Cube 2 or Sandbox, using the BananaBread HTML 5 on that, and adding virtual worlds features. There is a lot of potential in that approach, if people want to work on it.

  4. Dirk says:

    You have mail. :-)

  5. brynnb says:

    Thanks for this Dirk! I didn’t know this existed and it’s pretty cool.

  6. […] auf […]

  7. Erik says:

    This is awesome; I’ve been making some huge levels using the Cube 2 engine for a larger gaming project but am far better as a level designer and writer than coder; that said, I’d love to contribute more to this community, and turning Sauerbraten levels into online playable content is amazing! Here’s a link to my wordpress and a bunch of content I’ve written imagining Fargo as a dystopia in the early 22nd century:

    I’m hoping to make friends and collaborators working on Cube 2 projects; it’d be wonderful if code got written to allow for a dialog and quest system, along with an AI to make story arcs and action triggers a bit smarter :) I’d love to get some mail on this!

  8. Erik says:

    here’s a link to some zipped up levels I made using cube 2 and its assets:

  9. […] but also a lot of open source projects like BrowserQuest (I wrote about it here) and of course BananaBread from the man […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: