When I was setting up my game engine, and even when developing my game, I took the time to create a nice class hierarchy. It took a little extra time. I did not go overboard. There may have been 15 classes tops. And some of those were small subclasses.
During a final round of testing, I found some of the text was coming out wrong. That was disturbing as the text worked fine in some scenarios. I traced it back to find some code doing extra work to get the job done right. To fix the global problem, I moved that code to a base class. Then everyone got the fix. I did have to tweak a few instances where the specific code made some wrong assumptions. But I essentially fixed the problem in one location. Bonus.
As an aside, I find the Java Collections Framework very helpful in developing games. Now I cannot imagine how I lived without them. Oh yeah. I used arrays. Painful. Luckily there is no more of that pain in my projects.
Check Your Subroutines - We are delivering our latest release to internal test today. Had a code review yesterday. Many issues were found. We are fixing the highest priority probl...
1 week ago