sitting in a traffic jam. They’re not very mentally stimulating, the most interest being the insides of your nostrils and the car in front. So while slowly shuffling my way home today I had a think about the design of my game environment.
I’ve just finished making the engine parse the config part of the XML file. I can now describe using XML what resolution screen to have, whether the mouse or keyboard are required, and whether sound should be enabled. So what should take about five lines of code, now takes an XML parser, some classes and an external file. That’s progress for you
The next step is to get the basic environment loop working. I need to be able to open the screen and have standard things like “quit” work properly. If you just close an Allegro program it freezes and Windows pops up to kill it off, which isn’t any good. Especially when debugging, applications that fail to exit correctly make GDB do odd things.
So, back to the traffic jam, it was very interesting as I managed to get stuck in the middle of a busy junction with cars coming at me from all angles. There’s lots of roadworks and traffic lights in town, they’re all out of sequence with each other and much confusion. A bit like my code, and like my code, the new shopping centre will be built, roads widened and traffic lights resynced with each other. Or something, I don’t think my game environment will have a shopping centre in it. Order will come from the chaos though.
Computers were invented to remove the mindless repetitive work people used to do. There are certain parts of software development that are somewhat repetitive and ripe for automation. All that boilerplate code every project has, collision detection routines, menu systems, sprite manipulation. The whole lot can be automated away and scripted from outside the code. Less bugs. More effort to begin with, but less effort later on.
I think, I’m making this all up as I go along, going off what seems to make sense to me.

