I've played around with writing games before but I always run into the same problems... weak memory management, lack of a decent GUI, flat physics model, the list goes on. Any past attempts have pretty much been a hodge-podge of code and have resulted in inflexible applications, giving me no room to do what I want to do (or to even finish for that matter).
To remedy this, I'm writing a flexible (but somewhat simple) game engine. Keep in mind, I write code for a living 8 hours a day so the game is coming along slowly for now. I have a series of games in mind that I plan on implementing with this engine, each more complex than the previous but based on the same concept.
Here's how I've come along so far:
- Memory management: Easy-to-use components that deal out objects and destroy objects upon request. Great for use in a builder pattern.
- GUI: A flexible GUI class that can easily be extended into many GUI objects.
- Command processor: Command class is extendable to many command objects that may be queued into a command processor to handle major functions of the application. Good for running commands from a console. Plus, it's a nice little exercise before diving into the light-weight script engine I'll be needing later on.
- Console: Crap. I'm rewriting it using the GUI and command processor above.
- Physics system: Pretty robust but badly designed and, worst of all, 2D. It manages objects within "spaces", allowing collision detection on about 12,000 moving objects simultaneously @ 50 fps on a P4 1.5GHz. Not bad, just needs a rewrite.
- All the basics such as DirectInput, system timer, File I/O (w/ serialization), etc.
- Other tidbits: Parser, AI, good targeting and leading with some of the worst path-finding ever, etc.
Currently, I'm building a multi-threaded application using most of the above and plan on starting the first game of the series ASAP. I think about how much I've written so far and I feel like I'm almost over the finish like. Then, I think about how much further I have to go. Ugh!