Sunday 29 June 2008

Code Orgy

Well, today has been a long day. I was hoping to go home for the weekend and spend some time with my family, but alas, it was not to be.

So, in a bit of a sulk, I decided to sulk in a corner and finish getting the data files written. I didn't realise it would take me 14 hours. Cue major league sulk! :-)

I now have 20 files, one for each level containing:
  • Sprite frames for monsters
  • Speech data
  • Level name
  • Character set colours for the character sets (the 9929 video processor divides the ASCII set up into groups of 8 characters, each group can have different foreground and background colours)
The character sets on the 9929 make it a pain to organise which characters (having the same colour attributes) should be grouped together, nevertheless it is done now.

In addition, an additional file holds the 8x8 character graphics used on the levels - the graphics are re-used quite a bit on different levels, so rather than re-define the same graphics time after time, I've just defined them once. Each level then consists of a table of pointers that point to appropriate places to take the data from. Much more economical. I was going to use the sprite editor that I wrote to do the Manic Miner sprites to do the 8x8 graphics, but in the end I just used JSWED to display the characters in a grid, and worked out the hex in my head by eye (if that makes sense). Geeky? Yes. Fun? Er, no, not really!

Finally, for a bit of fun (!), I managed to get the ZX Spectrum character set out of the ZX ROM, so I've created a data file for that also - so the game should play with the real Sinclair character set.

Next step: screen layout for the levels. I'm thinking RLE (run-length encoding) is probably the best way to go, economical without trying to be too clever.

I think tomorrow I'll cut my first lines of code, instead of working with purely (boring) graphic data.

Funky.

2 comments:

Anonymous said...

/quote
Speech data

I can’t wait to what is in store !

/quote
The character sets on the 9929 make it a pain to organise which characters (having the same colour attributes) should be grouped together, nevertheless it is done now.

I have continued with some work on my Screen Designer (includes screen, characters and colors), and a “grap and break up” functionality is on the drawing board. Maybe I will be switching from C# to Java to make it more “available” for 99ers. Might even go for an applet. Don’t know how well Java (with or without web enabling) will do with updating graphics. I had to use Marshal in C# to get safe and fast code (otherwise the load and save didn’t appear instant).

/quote
I was going to use the sprite editor that I wrote to do the Manic Miner sprites to do the 8x8 graphics, but in the end I just used JSWED to display the characters in a grid, and worked out the hex in my head by eye (if that makes sense). Geeky? Yes. Fun? Er, no, not really!

It was still there in the back of my mind, when I did my first few demos back in 2004. Amazing how few mistakes I made (no, it was not switching >B with >D).

:-)

Cheers

Anonymous said...

I just -by coincidence- found your Manic Miner blog (thanks google).

Really nice, can't wait to read some more and play this game on the TI ;-)

Filip