Locate sample

Engine presentation

OniDev

The Planet Centauri engine is based on a C++11 “from scratch” engine based itself on my game creation library: OniDev.

OniDev is a C++11 library that greatly simplifies the development of C++ games. It has the particularity to have a high level of abstraction and has many indispensable features such as:

  • windowing management, graphical contexts, keyboard/mouse…
  • an automatic atlas texture system for sprite management
  • an audio engine that allows you to instantiate sounds easily, play music, decode wav and ogg
  • a customizable 2d particle engine
  • a basic collision engine
  • an easy-to-use entity system with collision and event detection
  • a mathematical module with matrix, projections, etc…
  • a graphical engine with shaders, vbo, vao, fbo etc…
  • a network engine based on UDP
  • support for UTF8
  • handling of json and other markup languages like xml
  • a stacktrace system to find the origin of crashes
  • a (de)serialization system
  • many helpers like a perlin noise generator, CRC calculation, base64 encoding, etc…


OniDev depends on the following libraries:


Some statistics:

  • 200 .cpp source files
  • 180 .h include files
  • 25000 lines of .cpp code
  • 9000 lines of code .h
  • 5600 lines of comments


Some old examples are available here.

The entity engine code is available here, and can be used with other libraries like SFML.


Custom Engine

The engine I created for Planet Centauri is designed specifically for 2D sandboxes.

It allows to manage very large worlds via a system of dynamic chunks that are loaded and unloaded automatically, to manage thousands of static entities at the same time without affecting performances thanks to an efficient partitioning system.

It has a powerful system of events, the possibility to import and export world chunks, adding objects is done via a flexible configuration file system, which also allows modding .

Some statistics:

  • 800 source files (.cpp and .h)
  • 200 000 lines of code
  • 26,000 lines of comments


Listing of features (not exhaustive)

World:

  • Dynamic chunk system
  • Management of several worlds/dimensions at the same time
  • Ability to display another world/dimension in a window
  • Objects attribute system to assign behaviours to decorations
  • Partitioning of static entities (objects)
  • Tile based fluid engine
  • Procedural world generation engine, customizable via config files
  • Procedural dungeon generation via rooms assembly

Engine:

  • Integration of assets via configuration files (decorations, drops, crafts, sounds, projectiles, magic, etc…)
  • Flexible widget based (Qt like) UI engine, with custom skins system
  • Events system (allows level design without code)
  • Powerful projectile engine
  • Powerful magic/spell engine with events and command system
  • Customizable monster spawner
  • Basic explosions
  • Gear system
  • Item conveyor system
  • Logic circuits
  • Fire, spread of flames
  • Basic netplay

Entity:

  • Living entity systems with damage, resistance…
  • Pathfinding for terrestrial entities
  • Realistic bullet physics
  • Customizable projection physics (recoil)

Monsters:

  • Monster buff/buff system/npc
  • Rarity, statistics, monster abilities
  • Virtual inputs for monsters (allows transformations)
  • Capture and breeding of monsters

Rendering:

  • Rendering of tiles with automatic joints, slopes
  • Tile based dynamic lighting engine
  • Local lights “tron like”
  • Ambient shadows for blocks (occlusion)
  • Optimized tile rendering via FBO baking
  • Dynamic rendering via VBO pool
  • Flexible cameras, rigid cameras
  • Indexed colors (monsters, blocks)
  • Pallets for blocks (painting)
  • Trails
  • Physical particles
  • Screen resolutions, customizable zoom (non-dynamic)

Game:

  • Dynamic Minimap
  • Craft system
  • Containers, inventory system
  • Drop of objects on the ground
  • Day and night cycle, weather (rain, wind, snow)
  • Procedural trees with several stages of growth
  • Plants with several stages of growth
  • Transition of biomes (backgrounds, bgm, weather)
  • Customizable player (face, armor)
  • Skills, combos
  • Bows, guns, scepters, boomerangs, swords, tools, grenades…
  • Consumables, medical supplies…
  • Customizable magic
  • Logs and logging of player actions
  • Admin command console
  • Game modes
  • Dynamic vine/rope physics
  • Basic system of quests
  • Translation system
  • Keybinding

Audio:

  • Near sound fusion system, ambient sounds