Tuesday, 12 May 2009

Trashing through more code

Saturday 9th May 2009

I decided to do some more programming with the front end for Trash Course. Things needed to be sorted out. First of all the front end required an options selection. So I decided to add an extra IRQ interrupt so that I could open the bottom border and put the game options sprites into that border. Seems to have been no problem.

Secondly I programmed in the functions for the game options sprites. Not bad. Seems to work fine, except for when I tried to play the game with sound effects the WinVice C64 emulator had crashed. I realized what went wrong. I had forgotten to poke the correct place in memory. LOL. So I fixed the problem and got the sound effects working. The player modes worked nicely.

My next step was to program a Get Ready and Game Over screen for the game. I did not do anything exciting for the Get Ready and Game Over screen, because it wasn't really worth the effort. All I did was create a new IRQ and also got the routines to play the Get Ready and Game Over jingle and linked those to the front end and the game. Now that was working, I had another idea which was to get the Game Over screen to display the final score for the players. To do that I had to convert the SEUCK score plot data into raw screen data. That was easily done by adding the accumulator by $30 and pasting the data to the screen. It worked nicely.

I was working on the high score entry/table routine, but unfortunately I did not do all that good with this, due to the fact that my code was way too big as I was copying the same routine time and time again for each rank position on the high score table. I gave up at the end as I could not figure out a way to do a shorter version of high score ranks. Well, sort of. I sent a message to Martin Piper to ask if he can help me work out how I can do a high score detection using as less code as possible (Optimization).

No comments:

Post a Comment