Archive for dynamic function

Game engine progress

Posted in WIP Game 2012 with tags , , , , , on February 12, 2012 by pcedev

Things are coming along nicely. The dynamic function table works great; functions can even remove themselves from the table if or when their task is done. The script handler can forcibly remove all or individual functions from the active list as well. The first function I added was scroll acceleration function. It accelerates or decelerates the maps current speed with either a linear step or non-linear step, and of course a rate in which to apply. The non-linear setup is nothing special, just a second parameter with rate and signed value which gets added to the main signed acceleration variable (which gets signed added to the map speed variable). Thus, the increment changes over time. Adds some nice curves instead of just linear ramps. I think the next function to make for this table will be background processing fade routines and palette related functions.

The second thing is the map collision logic. There’s a separate map for this and a ring buffer in ram. Right now it’s just squares, but I’ve worked out the logic for different shapes inside the 8×8 collision tile. I don’t need anything fancy, just some angled ramp pieces.