On my last post I was planning a sprite system for my cutscenes. Good news is, it’s all done! Although I’ve allocated 2k for my cutscenes, because my 1k data loading buffer follows, it allows me to load a 3k one-shot cutscene no problem!
Er, well, after a slight code rearrange. Turned out I was using the load buffer to store a copy of colour RAM when using my window system. Open a window, and bye bye 1k load buffer, and hello corrupted text! A bit of a code refactor to the window system plus a bit of zero page shuffling soon fixed that!
So now I can embed sprites into a cutscene data file and copy them up into VRAM.
I’ve extended the command table for my cutscenes, adding a command for animating sprites. I’m trying to keep the individual commands as short as possible, so I’m packing multiple parameters into one byte. For sprite animations I can specify sprite number, base sprite frame, a 2 bit frame mask, a rate shifter, plus a time. If the time is set to zero, the animation loops forever. There’s an IRQ timer running that I use for animations; the current sprite frame is defined by the IRQ timer shifted down by the rate shifter, masked by the frame mask, before being added to the base frame. Using this method I can easily define either 2 or 4 frame animations. If I need anything more complex, I’ll add a new sprite animation command. Adding new cutscene commands is real easy.
Originally I used the sprite animate command to animate my cutscene characters talking, but since then I’ve added another cutscene command: TALK. The talk command word counts the text, generating an animation duration. It also sets up a sprite animation, as well as output the text, and waits for a key to be pressed.
I’ve also added headers to my windows, so instead of prefixing the text to show who’s speaking with things like: “BRILEY:HEY…”, instead the window has a title like: “(BRILEY)”, with the name in yellow. Looks much nicer! I’ve changed all the older cutscenes to the new format.
Next step is to add a cutscene command for moving spites. You see, at the moment, one of my cutscene commands is an I/O register stream, and is used to setup the sprites and their start frames. To move sprites in the cutscene, I have to add individual byte streams, each one re-positioning a sprite, along with a wait_vbls cutscene command (used to wait for a specific number of vertical blanks). It works, but it’s a bit clunky, and only useful for moving sprites over short distances. But in some of my cutscenes I’ll be needing to walk characters off screen, hence the need for a new move sprite command…
Once my cutscenes are in a reasonable state, I’ll need to stop and add more graphics, this time the backgrounds need some work, especially the interiors of the houses. Houses are looking a bit bland right now, and I have some ideas…
I’ll also investigate adding a night mode for the backgrounds. Briley’s arrival to the village of Maepole is supposed to happen at night, so I have a plan to change the background multi-colours, plus alter the background character colour table. I did some tests last night and it looks promising… I’ll post screenshots soon to show the difference…
This looks amazing, Best of luck with it! Also, I have only now just discovered your older posts detailing your work on previous games and they are super interesting, so thanks for that 🙂
LikeLiked by 1 person
Sorry for the hijack Sarah.. but Plume!! Whoa! Get in touch please, would love to say hi!
Sarah, the blog is amazing!! Thank-you!
LikeLiked by 1 person