-
Component / Entity Systems
Posted on March 17th, 2011 No commentsNote: I’ve put this work on hold and am going another direction with this project. The C++ code is found in the ogre branch. I’ll have a new post about what I’m putting together soon!
If you’ve done any sort of game development in the past 5 years you’ve most likely heard of “Component Systems” or “Entity Systems” for doing object and scene management over an OOP hierarchy. Object Hierarchies may start out clean, but over the course of the development of a game, become a very difficult to work with. Components — very succinctly built self-contained clusters of data and logic that can be added to, or taken away from, anything — are the answer.
There is a ton written about these kinds of systems. A quick Google search of either of the terms in the title will get you to many of the most popular posts describing the why of Component systems, so I’m not going to dive into that myself. Instead, this post will be explaining how I’m implementing Components in Project Slartibartfast, why I’ve made the decisions I’ve made, and how I plan on continuing development with this system.
As an avid supporter of Open Source software, it’s been annoying reading so much about this radically different methodology and find very little code, or code examples that don’t solve the issue I’m trying to solve, concerning Components. Now that I’ve sat down and actually turned an idea in a working system, I realize that these systems really do end up being very specific in their implementation to the product at hand, be it a game, an engine, or something not game related at all. So this isn’t per-say a “this is how you implement Components and Entities” but an exposé of how I’ve decided to implement this in my game.
As an aside, because these arguments come up so often, my personal view of software development and design is that pragmatism beats idealism every single time. As long as you have a good reason for your decisions, build something that works, don’t fret that it’s not a “best practice.”
That said, lets dive into the Component system of Project Slartibartfast.
-
Project Slartibartfast – Introduction
Posted on March 9th, 2011 No commentsIt’s been some time since I last wrote (a little over a year, yikes!) and with a new year I’ve decided to finally take on some projects that I’ve been putting off for far too long, as well as getting back into writing and keeping a log of what I’m working on and why. I’ve spent so many years, and so many hours researching, reading, and consuming writings and code related to game design and graphics techniques that it’s time for me to give back to the community what I’ve learned over the years, and what I’ll be learning as I progress through this next project of mine.
I’ve been a gamer since I got my hands on my family’s first computer back in the early 90s. Running Windows 3.1, I was immediately enthralled with the device, and when I discovered things like Minesweeper and Solitaire, that was fun, but the game that hooked me was Treasure Mountain! If it wasn’t for my parents constantly yelling at me to get off and give my sisters time to play I would have sat there forever. Thinking back, it is a good thing that my parents got on my case about playing games, as I’ve learned to pace myself, but they were never able to dull that need to play something. Then I discovered programming.
I attribute my love of programming to Texas Instruments and their graphing calculators. I had messed around with QuikBasic (Nibbles!) but it didn’t click until I was teaching myself TI-BASIC on the TI-83. From there I was able to teach myself C to build apps for the TI-89 using TIGCC, and with these tools at hand, I was making my own games!
From then on I knew I was going to be a programmer, and initially wanted to get into the games industry, though for plenty of reasons that are a post in and of itself, I ended up choosing to stay out of that realm. I spent plenty of time tinkering, researching, and just keeping up with game development, but I never really sat down and made a game, or spent enough time on one to consider it “finished”. This year it’s time for that to change.
And thus was born Project Slartibartfast.

