Adding new systems

Wow journal entries 4 days in a row. I might actually be back in the groove. :)

With all this new functionality going into my engine I figured I'd give a little insight into my work processes around adding new stuff.

Usually the desire to add functionality to my engine will show up while I'm working on a sample or an actual game. For example when I was working on Tiki Lounge Blackjack I wanted to have some more "flair" like explosions, sparks, etc. Perfect stuff for a particle system. I didn't have time to do it then so I added to my next version list. This is just a list of features or work that I want to do with the engine before the next game. This list ended up having physics engine work, scripting system work and general refactoring on it as well.

I approach adding new functionality to my engine in phases. I'll come up with a feature I'd like to have, like a physics engine, and do a basic integration. Not all fancy and fully functional but just the basics to prove that it works. I'll do that for all of my new features. After that they're there and I'll start using them for a game or sample. It's at this time that the feature really gets fleshed out.

I find actually using something in the context of a game gives me a better idea of what I need it to do rather then blindly designing how it will work up front. Some may call it design on the fly, I call it just in time design. It's not like I just hack things together either. Once I realize some needed functionality at that point I will step back and figure out how to add it cleanly to the object model. I don't always get it perfect but that's what refactoring is for. After I've got a feature fully working in the context of a game I'll do a major refactoring pass on the area. This is mainly for cleanup purposes to keep my code base from getting totally ugly.

So far this process has worked great for me. It helps me to get new features in quickly and also keeps a lot of engine work done in between projects. There is nothing worse than revamping your engine in the middle of a project and then having to update your project to work with the new design. It's just depressing to work for days on your game just to get it looking like it did before your change.