QTE RPG Devlog #1: Retro style RPG party movement

Featured image from Starmen.net

One thing that I had been kicking around in my head for a while before I started this project was what seemed like a simple question – how would you get characters to follow each other like an old RPG?

Experimenting with Earthbound as an example, I was able to think up a pretty general solution – use an array of position values where a new position is added to the start of the array when the lead character changes position. The lead character always matches the first position, while other characters in the chain match later positions in the array.

this works fine on old hardware, where frame times are expected to be consistent- you can just keep a simple fixed array and have each character match a position at a set slot. But modern hardware, especially PCs, can have varied performance – Using a time based system instead of a frame based system complicates things. We still push in position changes, but we’ll need to keep track of the time change as well. Instead of matching specific slot offsets in the array, characters instead match specific times. With a little interpolation between points where the specific time is reached, we can get the desired position for the character. We can store a little rotation data too and viola! retro RPG party mechanics.

Demo of RPG follow system

There’s a bit more I’d like to look into – instead of a set array size, I designed the array to instead contain a set time frame. This means its length is generally determined by the frame rate- the higher the frame rate, the more samples in the array. Since we need to resize and iterate through the array whenever we make a change, that can get time consuming real quick. I plan to look into ways to limit the array size to make sure a high performance CPU doesn’t accidentally get bottled necked by it’s own strength – but for the purposes of the experiment, this should serve nicely for now.

Leave a Reply

Discover more from Catfort Software

Subscribe now to keep reading and get access to the full archive.

Continue reading