When programming Rabbit Wars back in 2007, I ended up with huge objects for each of my game entities. They handled player input, AI, moving, shooting, health points and rendering. I didn’t like it, it drove me mad. But then I came across this Evolve Your Hierarchy article. Since I was still in the middle of programming, I refactored my game entity code to use components instead of multiple inheritance (just like the article described). It worked great, my code was readable again.
Sometimes I feel like a juggler who tries to keep too many balls in the air. The older you get, the more things you build, and the more balls you have to juggle. A wife, kids, a job, a home, a passion, finances, friends, hobbies, … . Some balls are really fragile, and you do … Read more