SENIOR PROJECT OF COMPUTER ENGINEERING, JUNE 2014 1
ECS Game Engine Design
Daniel Hall, Student, Cal Poly SLO, Zoe Wood, Advisor, Cal Poly SLO,
Abstract—Game programming design and organization can be difficult and complicated. To simplify the development
process, frameworks with an array of tools and utilities known as game engines are used. The main goal of this project
is to explore game engine designs and develop a design for a modular and expandable game engine. The designs
covered in this paper are Object Oriented Programing (OOP) and two Entity Component System (ECS). OOP designs,
commonly used in computer science, use a hierarchy of objects to share functionality. ECS designs are based off of the
concepts Composition over inheritance in which objects contain features instead of inheriting them. However, designs
have their own weaknesses, such as expandability in OOP design. The issue comes from the tightly coupled nature of
a hierarchy where changes made near the root of the hierarchy requires significant code reconstruction. ECS solves
the coupling issue, however, problems exist with cross system communication and shared components across systems.
The two ECS designs used, Cupcake and Artemis, aim to solve these issues. By writing simple game applications,
the functionality of each design was tested and analysed. Using the two strengths of Cupcake and Artemis, this paper
proposes a new ECS design to minimize architectural issues.
F
1 INTRODUCTION
G
AME development can be a complicated
process. It can require the use of graph-
ics, sounds, physics, networks, artificial intel-
ligence, and input. A common practice is to
use existing libraries that implement a tech-
nology to save time and effort. Even so, tying
several technologies together into one system
can prove to be a difficult task. Game engines
answer this problem by providing both the
framework and technology needed to make
a game. This allows game developers to skip
the struggle of implementing technologies and
focusing on game development.
The largest problem encountered when de-
veloping game engines is how to represent
game objects. Game objects can range from a
simple 2D image with no control or interaction
to a highly complex 3D object with controls,
sounds, animations, and AI. Conceptually, it is
easy to understand that game objects represent
entities within a game with several features.
• Daniel Hall is with the Computer Engineering Department,
California Polytechnic State University, San Luis Obispo, CA,
93407.
E-mail: daniel.ma.hall@gmail.com
• Zoe Wood is with Computer Science Department.
Manuscript received June 14, 2014
The issue arises when trying to organize an
architecture that can handle a combination of
features.
A common approach is to use an Object Ori-
ented Programming (OOP) architecture. How-
ever, due to the nature of inheritance and hi-
erarchies, difficulties arise when representing a
game object. Entity Component Systems (ECS)
became widely popular as the answer to OOPs
problems with game objects.
This paper will go over the disadvantages of
OOP, benefits of ECS, variations of ECS, and a
proposed ECS design to promote modularity.
2 OBJECT ORIENTED PROGRAMMING
Object Oriented Programming is a program-
ing design that is meant to be reusable and
modular. It represents information as objects
containing data and logic. A unique and prac-
tical feature of OOP is inheritance. This allows
the architecture to create a hierarchy of shared
features and structure which helps promote
code reuse and organization.
What would a hierarchy look like with game
objects? OOP sounds exactly what game en-
gines need for code reuse and organization.
Figure 1 is an example of what a hierarchy
may look like representing a vehicle and a