Monday 14 January 2008

The engine redesign is complete!... or is it?

I say this as a strange new bug has cropped up - when the level is restarted, the player simply won't redraw! So now we have a secret, "not actually programmed at all" multiplayer mode appearing every time the level's restarted. Luckily, it can still redraw when the player hits a block (bye bye, second player) but it can be very confusing having two iterations of the character on-screen at once.

But fear not, as this bug is balanced out by lots of superawesome goodness! Firstly, look closer at the screenshot above. Click it to view it full-size if you need to. Or, better still, I'll stick in a close-up shot on the left. Done. What's that odd brown thing then? That, my friends, is a hole; a bottomless chasm leading to instant death. Touching one of these will make you restart the level (the result of many a battle with Python). Impressive, no? Well, yes, the image used there doesn't work all that well. But it's just a place holder of course; any 24*24 tile could be used.

And, as mentioned in an earlier post, non-rectangular layouts have been made possible by a new system that reads the wall from a file. A text file in courier font speaks a thousand words in the Trebuchet font, so here's an example:
WWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWFWWWWWWWWWWWW
WW00B000000000000000000WW
WW0000000000000000000B0WW
WW0B000000000B000000000WW
WW000B00000000000000000WW
WW000000000000000000000WW
WW000000000000000000000WW
WW000000000000000000000WW
WW000000000000000000000WW
WW000000000000000000000WW
WW00000000000000000B000WW
WW000000B00000000000B00WW
WW00000BCB0000B00000000WW
WW00000B0B0000000000000WW
WW000000000000000000000WW
WW00000000000000000H000WW
WW000000000000000000B00WW
WWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWW


Those of you who were paying attention during the last paragraph will probably have guessed that the W's denote walls. The more intelligent among you will have inferred that the B's represent blocks and the 0's are for empty space. But the other two may confuse you slightly, so I'll explain them - C is the character start point and F is the level goal (or finish). This method means an end to complicated *.DAT files that had to be stored in a level's folder to explain where the walls are and where the end is, and as the area doesn't need to be rectangular it is now possible to have a level goal that is actually within a path leading out of the level boundaries.

With any luck, you'll now have forgotten all about the disastrous bug I mentioned earlier so we (I actually - no-one else understands the arcane engine design yet) can go back to trying to fix it. Enjoy your blissful ignorance, fools!

Mwahahaha.

No comments:

Post a Comment