Some Programming Mumbo-Jumbo

I haven't really talked shop in awhile on this here ol'blogosphere so I figured now would be a good time to get out some thoughts.

A while back I mentioned this idea of a "generator" system that would create objects based on element names from an XML file. This system also allowed for "data inheritance" where elements could derive from one another. This worked in a few ways but the generator system required a lot of "workarounds" that I ultimately found more annoying then helpful. A lot of flexibility got lost trying to make a system that could cover all these basis of object generation. What I found was I lost a lot of special case control - and that is where the workarounds came into effect.

So I've decided to keep the data inheritance system (I found that VERY useful in proto-ing) but strip the object generator and replaced it with normal factories. This may require several factories for various object types (game entities, collision shapes, etc) but will let me do more special case stuff that I can later wrap up if I feel like it.

The (thats what I call) sticky situation is removing the generator system from the current code base. I've decided to do this slowly by replacing "components" of objects first (for example collision shape generation) with factories and slowly work my way up to the highest levels of object generator (the point where all the objects are spawned). I do know that I will need a generic factory object so maybe if I get a chance I can write one and test it out with collision shapes tonight. Packing/moving prep has been taking 1st priority for obvious reasons but I'd like to get some of this rolling since I hope to use some of this code base with friends on the side when I get to my new job.

1 comment:

Laura "Sko" said...

you should go into your settings and change how the timestamps read.. I know you write a blog at "4:35 pm" but I don't know what day. ;)

Anyhoo I love you... I get to live with you soon. ;)