Briley Witch RPG Diary – 17/10/2017

Okay, so the sprite move command for cutscenes is in and working! Yay! I’ve changed all the cutscenes to use this. It reduces the cutscene command stream a little, plus looks so much smoother/better! The new command has four parameters: sprite number, time (in frames), delta-X, and delta-Y. I’m using fractional values, so my deltas are stored 4:4. The values are expanded into 2-byte values in the code.


I did have an issue with the x coordinate of sprites: on the C64 it’s a 9-bit value, tediously split between a low 8-bit value per sprite, and an additional byte that holds the 9th bit of all 8 sprites. My solution: since I’m already storing a 16-bit value for both x and y (so I can do fractional moves), I just need to shift the x coordinate down 1 bit and use the top bit to store the 9th bit (remembering to shift it back up when I go to store the values into the hardware registers). The shift back up moves the top bit into the carry flag, so all I have to do is set/reset the 9th bit in the hardware register based on this.


With both sprite animation and move commands in, I should be able to make my cutscene characters walk across the screen (instead of gliding as of right now). Before I do that, I’ll need to create some walking animation frames for the male characters…


Oh, also did a bit more testing with night colours, and have adjusted the scroll system to cope with a colour table swap. Next step is to add code to convert the day-time character colours into a night-time set. Should be easy!


Hmm… I might make night mode a part of the game and not just for cutscenes. It certainly changes the mood of the game. I could also change the music to suit… go for something a bit creepy/spooky… Well, once I get around to doing some music…


 •  0 comments  •  flag
Share on Twitter
Published on October 17, 2017 06:24
No comments have been added yet.