Day Four Complete

As I predicted yesterday there wasn't nearly as much progress today as there has been in previous days. Still, the wasn't a complete loss and this is some stuff to report.

The biggest change is that the game now features a working menu system, and a state machine for moving between the menu, level intro, playing the level and the level outro. The menu is very simplistic and features no animation at all yet. If I get time I think I'll make the buttons highlight when you go over them.

Although the menu mentions high scores they still need adding. I intend to have an online top 100, but I'm not sure if I'll have time for that.

On the game side I changed the smoke colour to differentiate it from the steam. I also added a new piece for the player to use, a compressor. This works like a pump and forces steam from one area to another even if the pressure gradient is the reverse of that. The limiter only stops steam 'flowing' in the opposite direction, the compressor actually continues to move what steam there is on the lower pressure side to the high pressure side. I need to make the compressor cost points when you have it running and to allow the user to switch it on and off.

Tomorrow it is important I get the rest of the game pieces completed so I can concentrate on designing more levels, balancing the game out and generally giving it a polish on Saturday. I also need allow the user to adjust already placed items, and to blow them up. Finally I need to change the system such that when you have an incomplete network it vents steam out of the hole. Currently the pressure just builds up it acts as if the end is sealed.

I'm quite pleased with how easy it was to add a new game piece, I think I've done a good job of designing the structure of my program. I downloaded one of the other games today and all the code was in a single, huge file. Mine is split into 23 files, that biggest of which is just 120 lines long and I've used classes and inheritance to good effect. At one stage I even had multiple inheritance, but I've since removed that. Unfortunately the games are not judged at all on their code, I'm much more likely to the win a beautiful code contest than I am a beautiful graphics one :-)

(log in to comment)


And what's wrong with having all your code in one big file? ;)

I tried reasonably hard with code quality last time round - I'm a C++ programmer at heart, so I did my best to create reusable objects, make use of inheritence, etc. However, I also didn't know much about Python at the time, and made a real pig's ear of certain things due to the time constraints.

This time round, I'm much more aware of the language and its features. This has both features and benefits: on the plus side, I now know how easy it is to do things like persistent option values (shelve) and storing arbitrary datastructures (pickle - great for level editors); however on the minus side, since I am now happier with list and object semantics, passing of function objects, etc., I have found myself using and abusing these features to get things done quick & dirty instead of creating fully-fledged classes. This has saved me time in some cases, and cost me it in others.

As with any programming language: code suckage is 10% bad language design, and 90% how you use it.

"this has both features and benefits" means, of course, "this has both advantages and disadvantages."