Sign in to follow this  
  • entries
    3
  • comments
    3
  • views
    2757

The Game Engine

Sign in to follow this  

338 views

My Game Doesn't Run Without It
The CharWars game engine is divided into two parts: the game world and the game interface.

The Game World
The game world basically acts as a world containing all the entities of the game. It also acts as the bridge for the physics world (Box2D's b2World) and the entities.

Updates
Entities are updated through the game world. Once the game world is updated, it only calls the update function of the entities which are on the top of their own hierarchy (has no parent entity). Once the entity is updated, it then calls the update functions of it's child entities. This method is much much better than updating one by one all the entities for a lot of reasons (synchronization, full hierarchy, etc.).

The Game Interface
The game interface handles the rendering and user-control functions of the game. It doesn't render the entities directly but instead the entities only send messages to it (this is also the same for user-control).
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now