Cube Engine: Features and Games

Cube Game Engine

Every game developer wants to develop games that can work on almost all platforms and a game engine that is free of cost. The Cube is an open-source landscape-style engine that acts as an indoor FPS game engine. It combines extremely precise dynamic occlusion with a type of global geometric mipmapping for dynamic LOD enabling adjustable frame rates and graphic detail on the most processor.

Cube Engine

The Cube is an open-source landscape-style engine created using OpenGL and C++ that acts as an indoor FPS game engine which allows for in-game editing of geometry in a full 3D mode, which means that you may fly around the map and point or drag objects to pick or alter them while playing simultaneously with others in multiplayer. It has simple but efficient fine-grain lighting that resembles light mapping and is capable of dynamic lights and shadows. 

Map precompilation is not needed; Even lightning is done instantaneously. Features a Doom/Quake-style single and multiplayer game with some brutal old-school gameplay. It has a very simple quad-tree world structure that can handle slopes, water, decent collision detection and physics, and client/server networking that goes a long way in giving a lag-free gaming experience.

Further Development

The Engine was first made available in 2001 with the “Cube” game, developed by Wouter Van. Since then, it has appeared in a number of different games. The Creators typically modify the engine to suit their particular projects’ requirements. There are modifications of a contradictory nature, nevertheless. The primary cause of this is that the engine code and the original game code are not independent of one another. Both Cube mods and other games with Cube Engine use these unclear changes.

Although most engine modifications are minimal, there are certain exceptions, such as in AssaultCube (2006) and AssualtCube Reloaded (2010), where the modifications are substantial.

Cube 2: Sauerbraten

The Cube 2:Sauerbraten, the successor to the Cube Engine, was released in 2004. The Cube engine served as the foundation for the Cube 2 Engine, Which gradually diverged from it. The Cube engine and the Cube 2 Engine differ greatly from one another, with the two being especially notable.

  • Geometry is one of these two key differences. The Cube 2 Engine has an accurate 3D geometry in contrast to the Cube Engine, Which has 2.5D Geometry.
  • There is a folder containing the source code, which is the second of these two differences. The engine’s code and the code related to the game are in two separate folders. A third folder contains shared code that enables the communication between the engine and the game-specific code. Though not always, The name of the game is frequently found in the folder containing its unique code.

The name of the source code folder in The Cube 2: Sauerbraten version is fpsgame, while in the Eastern version is rpsgame. Other folders that contain libraries utilized by the engine, the game, or both are present alongside these folders.

Features of Cube Engine

Environment

The environment of the games developed using Cube Engine is similar to that of Minecraft, a well-known 3D pixel game built on boxes. Any items can be added or removed, and there are many different kinds of items to choose from. Because Javascript’s boundaries are primarily limited by integer values. The rendering distance is somewhat limited, and the world changes as the player explores new regions.

The world’s topography is produced via a pseudo-random function. The core structure is similar to that of Minecraft, with chunks –16 x 16 infinite nodes– making up the world. For each piece, the pseudo-random function produces a single height value. Everything is filled with nodes below the height value and those items above the height values are left empty. 

In contrast to the Minecraft-looking games, The world renderer utilizes a 2D Perlin-noise generator rather than a 3D one. Additionally, there are no opponents, mobs, trees, ore, or underground passages. The features need to be limited because the renderer consumes all the processing resources.

Rendering

A simple painter’s algorithm is used for rendering; everything is drawn from back to front, Prioritizing nodes that are close to the camera over those that are further away. The engine employs very basic 3D Rendering methods because canvas cannot perform 3D rendering. There have been some optimization approaches used, such as back-face culling, occlusion culling, and frustum culling. Octrees are not well suited for this engine that’s why chunks are being used. 

Since textures are not supported by canvas, an affine texture mapping technique is employed to implement textures from scratch. A straightforward renderer that uses simple color is also available because rendering with the textures makes the game noticeably slower. Since the texture placement is identical to that of Minecraft, any recently released Minecraft texture pack can be used with this game.

Games Developed using Cube Engine

The games developed using the Cube Engine are:

Cube

The first game that got everything started was Cube. Even though Cube 2 has almost completely overdone it, the Cube stands on its own. It has 100 maps and all of them are not found in Cube 2, and it has a variety of single-player and multiplayer gameplay.

Cube is also more compact in every manner, including download size, hardware needs (stills works well with outdated hardware), and source code size.

AssaultCube

Probably the best Cube mod ever made is AssaultCube. It has brand-new content and is playable alone. With more realistic surroundings and weapons than Cube. The gameplay offers a more realistic gaming experience. There are numerous game modes available, including Capture the Flag.

AssaultCube is a faster-paced game than Counter strike but slower-paced than Quake when compared to each other. The movements bug that allows players to move sideways while keeping their attention on the attacker is still present in AssaultCube because the developers thought that this was a fun aspect of Cube, like the bunny hopping bug in Quake, so they chose not to modify it.

Cube 2: Sauerbraten

The game has a single-player mode and a multiplayer mode, both of which includes an in-game level editor and support LAN, local and internet play. The game is open-source, free software. The goal of this game is not to provide the most features and best graphics possible, but rather to enable in-game map customization while maintaining a compact and elegant engine source code.

The Cube 2: Sauerbraten was a redesigned version of the Cube. the Engine was created using OpenGL and C++. The game uses a new 6-directional heightfield (or octree) environment model, although most of its basic principles and goals are carried over from its predecessor. The game offers a variety of game modes, including deathmatch and capture the flag.

Categories: Blog
M. Saqib: Saqib is Master-level Senior Software Engineer with over 14 years of experience in designing and developing large-scale software and web applications. He has more than eight years experience of leading software development teams. Saqib provides consultancy to develop software systems and web services for Fortune 500 companies. He has hands-on experience in C/C++ Java, JavaScript, PHP and .NET Technologies. Saqib owns and write contents on mycplus.com since 2004.
Related Post