Cube 2: Sauerbraten

Cube 2: Sauerbraten (German for "sour roast", also known as Sauer) is a first-person shooter released for Microsoft Windows, Linux, FreeBSD, OpenBSD, and Mac OS X using OpenGL and SDL.

In the style of Quake, the game features single-player and multiplayer game modes and contains an in-game level editor. The game engine is free and open-source software under the zlib License with commercial support available from the developer's business counterpart, Dot3 Labs.

The game media is released under various non-free licenses. The aim of the project is not to produce the most features and highest-quality graphics possible but rather to provide real-time, in-game map editing while keeping the engine source code small and elegant.

Gameplay
Cube 2 features singleplayer and multiplayer, the latter offering LAN, local, and online play. The game features multiple modes, such as deathmatch, Capture the Flag, and variations thereof. Players can also engage in online cooperative map editing. Single-player modes feature both episodic gameplay and deathmatches on multiplayer maps with AI bots instead of human opponents.

Development
Cube 2: Sauerbraten started as a redesign of the original Cube game engine. The engine is written in C++ and OpenGL. The game shares most of its design goals and philosophy with its predecessor, but uses a new 6-directional heightfield (or octree) world model. The game was ported to iOS by developer FernLightning.

Derivatives and forks
Since the engine code is open-source, a number of forks and derivatives have been based on it, most notably:


 * Platinum Arts Sandbox forks the Cube 2 engine to create a standalone game creation system.
 * Red Eclipse, a fork of Cube 2 with improvements to the engine featuring a different style of gameplay. With version 2.0, it has been ported to the engine of Tesseract.
 * Tesseract, which features an improved version of the Cube 2 game engine. It offers better graphics, but has higher system requirements.
 * OctaForge is a fork of Tesseract.
 * Tomatenquark is a fork of Cube 2 that is available from Steam.
 * Cardboard is a fork created for the shooter game Carmine Impact available on Steam.
 * Syntensity was a fork of Cube 2 focused on creating online content using the Intensity engine.
 * In 2012, Mozilla researcher Alon Zakai created a browser based demo called BananaBread by using Emscripten to port the C++ code to JavaScript and WebGL.

Rendering engine
Cube 2's rendering engine is designed around modern graphics processing units, which perform best with huge batches of geometry already stored in video memory. Lighting is precomputed into lightmaps—image files that correspond to geometry as textures—for efficient batching, with an additional stored directional component, that allows for efficient shader-based lighting effects. The original Cube engine's rendering engine assumed that overdraw (where polygons that do not appear in the final scene are occluded via the z-buffer) was more processor-intensive than sending new streams of triangles to the graphics processing every frame, which vastly limited its performance on more modern hardware where memory bandwidth is a greater limiting factor. The most recent releases (starting with "CTF Edition") support a precomputed visibility system (PVS) for graphics cards that do not support hardware occlusion.

Real-time editing
Cube 2: Sauerbraten uses a 6-directional heightfield (or octree) world model. An octree, in Sauerbraten, is a cube that can be split into eight smaller cubes; those smaller cubes are also octrees, and can be subdivided further. This allows much more complex level geometry and easier editing.

Each cube-shaped node in the octree represents a renderable volume, or a type of Marching cube, which are referred to as a cube, where each edge of this cube can be lengthened or shortened to deform the cube into a variety of other shapes. Corners of cubes can also be "pushed" or "pulled" to create crude curves. The what you see is what you get realtime editing has enabled level designers to add a lot of detail to maps, while reducing the time spent on actual creation. This is in contrast to traditional modern polygon soup 3D engines which take a model generated as an essentially random batch of triangles from an external modelling program and attempt to spatially subdivide the model's triangles after the fact by splitting them to fit into tree structures, such as a BSP tree or even an octree, that require costly pre-processing to build. Cube 2's novelty thus lies in that the world representation is the octree, or Marching cubes, structure itself, from which efficient triangle batches are generated for the graphics processing unit to render, without need for expensive and time-consuming pre-processing.

Reception
The game has been shown in a Burger King television commercial. It also received four out of five stars in a MacWorld UK review and was mentioned in issue 3 of Games for Windows: The Official Magazine (as well as their "101 Free Games" article), where it was described as being "perfect for both stingy and creative gamers alike".

The "CTF Edition" was reviewed positively by Phoronix, a Linux-focused hardware and software review website, as well as Linux.com, a website providing news related to free and open-source software. PC World recommended the in-game editor for amateur game design.