Dorkbots Grid

 

A framework for managing objects on a grid. Grid cell objects store a state and type fields and include events to facilitate implementation of an observer pattern.

 

There are two grid frameworks -

 

The Grid is the base framework, it's best suited for building 2D games like tik tac toe, checkers, chess, or matching games, etc.

 

The WorldGrid framework is built on top of the Grid framework, it deals with managing Entities. Entities could be enemies and players, or other interactive objects. The WorldGrid keeps track of where Entities are located and breaks up a plane into grid coordinates. When dealing with lots of entities, you can get a performance boost by not searching the entire scene/world for entities and instead look at entities in adjacent cells in the grid.

 

You can find the Dorkbots Grid repository on Github - Dorkbots Grid