Entity System - Nintendo Game Development

Published on Friday, September 27, 2013


Hello, Nintendo Web Framework game developers! In this 2D JavaScript game tutorial, I'll explain the concept of an entity system. In modern object-oriented game development, the idea behind the entity system is that an entity is a very simple JavaScript class that represent things in the game world that can act or be interacted with. For example, in Nintendo's Super Mario Brothers, Mario, Luigi, a mushroom, and Bowser are all examples of entities. All the entity represents is something, somewhere in the game. Some people have the base entity class know how to do a few things on its own such as render itself or move, but normally, an entity class simply represents a location within the game space, and allows you to add and remove components to/from it. An entity is also able to update itself, which normally means it delegates control to all of its components, in act in its behalf in some way or another. Some entity classes also include some sort of query system so you can get specific components that belong to the entity, but normally each component runs only when the entity object tells them to during its update stage. As in any good object-oriented design, each component should have little to no knowledge of other components.

Copyright © 2014-2017 EasyLearnTutorial. All rights reserved.