Wednesday, 10 July 2019

Initial Title Screen

I've decided to work on the title screen today.

That may seem a little odd so early on in the project, but since so much code is needed right at the start to display anything at all (screen set-up and printing, splits and so on) and so much of it will be used for the title and in-game screens, I thought I may as well do it now and have something to show for it.  I'm too impatient!

I first completed a rough layout in my screen editor, 'ChillED'.



I then exported the screen RAM and colour RAM data into the game assembly file. I had previously written some screen display code for another C64 project (Unused Shmup Tunes, see here...), so surgically removed the code and inserted it into Chiller 2.

After a few changes to the layout in ChillED and a further export of data, the title screen ended up being displayed in the game.  Here is a screen dump using WinVICE...

Rather plain at the moment, but I have managed to include some previously pixelled sprites that spell out the game name.  The sprite "plotter" for this resides in split 1 on the screen and was written so that it won't just handle the the title screen sprites, but eventually the in-game sprite player and meanies too!  Double plus good!

I cannot tell a lie - this sprite plotting code was also written for and grabbed from the Unused Shmup Tunes release and since it's my code, it's allowed!  Here is the sprite plotter code for Chiller 2 that handles the x-y position (including MSB) and colour of all 8 sprites, as well as being able to pluck the correct sprite definition from the sprite bank...

 ; in-game sprite plotter!            
             
 sprite_plotter            
           ldx #$00  
           ldy #$00  
 sprite_plot  
           lda sprite_x,x  
           asl  
           ror $d010  
           sta $d000,y  
           lda sprite_y,x  
           sta $d001,y  
           iny  
           iny  
           lda sprite_col,x  
           sta $d027,x  
           lda sprite_def,x  
           sta $07f8,x            
           inx  
           cpx #$08  
           bne sprite_plot  


Now the basic title screen is in place, I fancy adding some colour washes to the text as well as making the logo sprites bounce up and down.  The grassy ground in the screen dump above will eventually have a scrolling message of sorts above it.

Next diary entry...



No comments:

Post a Comment