Shredz64 – Code Rewrite and Optimization

Oh man, lots of coding tonight. I rewrote pretty much the whole graphic/sprite engine and optimized a ton of crap, I didn’t realize how much unneccessary code I had in there until the SID file exposed just how much processor time it was taking up. The majority of the fixes were things like only redrawing a specific area instead of a general region, precalculating sprite movement ahead of time instead of running division and multiplication operations every refresh to figure out where to put a sprite, stuff like that.

Long story short, songs now play at full speed, even while the maximum number of notes are on screen and hammering away at the strum bar. There are still a few more things to add into the gameplay that will slow it down a bit, but I’m confident now it won’t be an issue. Actually, after all the work tonight, there really aren’t a lot of major obstacles left, the only thing that will be a pain at this point is getting real button-note data in there so notes on the fret board actually line up with the music. I was thinking of writing an editor that could be used in game to add your own note data, allowing you to add any sid file you want and turn it into a Shredz64 song. This is probably what I’ll do, as I need to make a tool to get it in there anyway, no way am I typing out the millisecond of every note to appear on the board.

I’m thinking that it will function by playing a SID very very slowly, letting you play the notes on the guitar where you want them, and then records this to the note file. The only thing that might be weird is some sound envelope processing won’t work correctly playing the PSID file so slowly, and might not play at all. We’ll see, it doesn’t have to be perfect by any means.

I’m confident that in a months time I will have a full video of at least 1 demo song in action. Check back often! ๐Ÿ™‚

Leave a Reply

Your email address will not be published.