/CogEngine

Component-oriented 2D game engine for OpenFrameworks

Primary LanguageCMIT LicenseMIT

ofxCogEngine

logo

What's the CogEngine?

CogEngine stands for C++ component-oriented game engine. It can be used as a tool for creating 2D windows or mobile games. It is implemented as an OpenFrameworks addon.

Budget: over 600 working hours

Platforms

  • Windows
  • Linux
  • Android

Features

  • Scene graph
  • ECS pattern (messaging, generic attributes, flags, behaviors, components)
  • Animations
  • Finite state machines
  • Goal-driven behavior components
  • Steering behaviors
  • Monte-Carlo tree search
  • A* Path-finding
  • SQLite database
  • Custom networking protocol for multiplayer
  • XML and JSON parsers for certain components
  • Lua scripting language

mario

Projects

  • Hydroq
    • RTS game with Monte Carlo AI
    • available here
    • !!only works with the version 0.2 of this engine (link)

logo

  • Arkanoid clone
    • included in the Example folder

logo

  • Paratrooper clone
    • included in the Example folder

logo

How to use it

Component Architecture

  • The whole game is made of components
  • Component is an entity that defines functional behavior for the whole application or its part (is not attached to any game object)
  • Behavior is a component that is attached to a game object, defining its functionality
  • Node is a part of scene graph, represents a single entity (usually a game object)
  • Attribute is a generic attribute, kept in a collection the Node has a reference to
  • The overall behavior of a particular game object is determined by the aggregation of its behaviors and attributes

Component Architecture Example

Scene

scene1

Objects

scene2

Component architecture

scene3

Compatibility

Works with OpenFrameworks 0.9.8

LICENSE and ATTRIBUTIONS

  • ofxCogEngine is made available under the MIT license.
  • ofxCogEngine bundles catch framework, lua scripting language, luabridge binder, sqlite and following OpenFrameworks addons: ofxNetwork, ofxSQLite, ofxTextLabel, ofxXmlSettings