Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Framework overview

Lusito edited this page Oct 28, 2016 · 10 revisions

One of ecstasy's main advantages is its clean API, which makes it easy to use the right way and hard to break it. Let us take a look at how to use it, step by step. Bear in mind this is just a guide, for a complete API reference, please refer to the doxygen documentation.

First, make sure you understand what an Entity Component System is.

Here is an UML class diagram that will help you understand ecstasy's architecture.

  • Entity: simple containers of components.
  • Component: interface for your game Components to implement, they are supposed to be bags of data with no logic whatsoever.
  • Family: used to represent a set of entities with a specific collection of components.
  • Engine: main class of the framework, manages all entities and systems.
  • EntitySystem: allows you to implement game logic that may operate on entities of a given family.
  • Signal: allows you send and connect to various signals.

MemoryManager

In games where entities are constantly created and destroyed memory (de)allocation might become a problem. Imagine a space shooter where ships are firing projectiles at very high rates and explosions come and go rather fast. There is no need to allocate new memory every time.

Luckily enough, ecstasy has been designed with both ease of use and performance in mind. It features a very convenient memory manager, which will solve this problem without too much hassle. You can also replace the default memory manager with your own.