The Virtual Reality Engine

A VR Engine is basically a library of virtual reality related software functions (all library functions are described in the lite-C chapter of this manual) . The engines of the Acknex-Series (such as A5, A6, A7...) contain functions for 2D and 3D graphics, collision detection, sound, multiplayer, physics, and user interface, together with a scripting language that offers easy acces to those functions. In the following, some key features of VR engines are explained.

The renderer is the core part of a VR engine which actually paints the 3D objects - entities - on the screen. The engine uses different rendering algorithms for 5 types of entities: models, sprites, terrain, BSP levels, and particles. Depending on which method is used for accessing the 3D hardware, there are DirectX or OpenGl renderers. An OpenGl renderer uses 3D hardware through the OpenGl graphics library, which is available for most 3D cards. A DirectX renderer uses Microsoft's DirectX library, which is integrated in Windows. On old 3D cards, OpenGl normally renders a little faster, while on modern 3D cards DirectX offers better features and performance. The A6 and A7 engines use a DirectX 9.0c renderer.

The culling system renders only the parts of a game level that are not covered by walls or other objects. Usual culling systems are BSP tree based. The BSP tree system is the fastest and most effective, especially for indoor levels, but has the disadvantage that the BSP tree must be precalculated by the level editor. Renderers that don't support culling mostly use Octree systems for organizing the scene. Many commercial 3D engines use a BSP tree based culling system. With a BSP tree culling system, the indoor rendering speed is independent of the level size and number of objects, which allows games to run with a decent frame rate even on old PCs. A LOD system also increases the frame rate in outdoor levels. It automatically switches to 'simpler' shapes of objects when they are far away from the camera, thus reducing the overall number of polygons drawn per frame.

Shadow Mapping - also called Lightmapping - is a system for creating realistic lights and shadows without frame rate penalties. A shadow mapping compiler allows you to place an unlimited number of static light sources in the level, and then precalculates the light flow and static shadows for each surface. Most today's commercial 3D games use shadow mapping. As you see in the images below, smooth lights and shadows greatly add to the atmosphere of a game (A4 engine images by Rémi Valantin).

With Shadow Mapping
Without Shadow Mapping

A Particle System is an effect generator that creates a huge number of small particles for special effects like smoke, fire, or explosions. Well-made particle effects look better than pre-rendered animation, and thus particle generators are used in all newer games and game consoles. For creating realistic particle effects, the particle generator must be able to move thousands of particles without frame rate reduction. Simple particle systems only allow to assign particles some properties like lifespan, gravity or color; more sophisticated engines, like A6 or A7, also allow programming individual movement functions for every particle, and contain a beam generator for creating light beams or tracer paths (screenshots from the game 'Glider' by REVOgames).

Particle effect
Beam effect

Shaders add a new dimension to graphics rendering. They allow the transform, lighting, and rendering functionality to be modified at runtime on a vertex and pixel basis. A shader is a small script that runs on the graphics hardware for every vertex or pixel that is rendered on the screen. This gives the user a new level of dynamic flexibility over the way that pixels are rendered. Vertex and pixel shaders can be used to create realistic water ripples, render cartoon style, cover models with fur, or control the lava flow of a volcano (screenshots by users on the Gamestudio Shader Forum).

Normalmapping shader
Fur shader


? latest version online