Bluegin bluegin
Android C++ game engine

BlueGin Reference


BlueGin is a native C++ game engine for mobile devices. It is built on ports of Cinder and Flixel, two popular libraries for creative and game applications.

BlueGin games are compatible with Android 1.6 and above. Graphics are rendered with OpenGL ES 1.5.

For game developers most of the relevant classes can be found in the flx namespace.

Portable and self contained

BlueGin has minimal external dependencies - a working copy of the NDK (R5) and Boost is all that's needed to build an Android app.

The distribution includes a subset of the Cinder library and full versions of Box2D and RapidXML.

Resource management and texture packing

A unified resource manager provides access to image, audio and font assets. The asset pipeline includes a Python texture packer for creating texture atlases that use GPU resources efficiently and render fast.

Game state management

Games are written as a set of (FSM) state classes with hooks for initialization, transitioning and cleanup.

Entities (objects and sprites)

Game entities derive from a unified hierarchy. Custom game entities can derive from a minimal flx::Object class or a flx::Sprite class that manages rendering and animation.

Group management

Game entities can be added to a Group class for organizational purposes. Groups are used throughout to manage rendering lists, collision detection groups and bulk entity operations.

Collision detection

BlueGin uses a quadtree to perform efficient collision detection and resolution in 2D. Collisions may be checked by a custom callback or by overriding callbacks on the entities themselves.


Support for general tilemaps, including specialized collision detection and autogeneration of tilemap areas.

BlueGin includes an importer for Ogmo Editor tilemaps.


A simple emitter class is included, with hooks for creating variations of particle effects.


A native interface wrapping Android's MediaPlayer and SoundPool libraries provides low latency playback, resampling and volume control of sound and music files.


Fast bitmap font rendering, with support for importing HGE (Haaf's Game Engine) font files.

Special effects

A small set of screen effects are included for enhancing game presentation

Memory management

BlueGin uses a consistent memory management model with reference counting for allocations. In most cases you will not need to delete entities yourself, nor write destructor methods.

Internally, BlueGin uses the small object allocator from Box2D to speed up large batches of allocations.

BlueGin online

Main repository -

Contact -

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines