Saturday, December 18, 2010

Entity System Test Project

Entity Systems are a great way to build up game objects, but a significant thought shift from traditional OOP inheritance trees. Simply getting started is one of the bigger challenges as well as being aware of, and avoiding, functionality creep into entity and component objects.

Much has been written on entity systems, although most of it is at a very high level overview of what they are. There are some examples in a few books, but I'm cheap. Browsing the net though, here's a quick list of some of the best examples and most helpful collections:

Step 1

I plan on stepping away from OTD for a little while here. It has a ton of code behind it, a lot which has been sitting there for over a year without refactoring. I'm starting a much smaller project to focus on entity systems for a while as well as clean up some of my engine code.


Source code is up on BitBucket. It's still very, very early, but a decent foundation to build on. Further posts will detail the process of creating an entity system in XNA and C# as well as try to explain my reasoning behind a few things.

Questions to deal with

  • How will lists of components be sent to systems? Big dictionaries?
  • How will component types be cached and then pruned? Entities can register components on add

No comments:

Post a Comment