# Game speed cubic growth

Is it possible, using delta in my update method to increase a game speed variable exponentially on cubic growth (the blue line below) My maths isn't great so I'm not sure how the formula would be put into practice using a float gameSpeed and delta in an update method -(void) update:(ccTime)delta I think I would also need a value to control the speed of the growth too?

Probably the most robust way is to store a linearly-growing gameTime value that you can update by just adding the delta to it each frame, then set gameSpeed = someConstant * pow(gameTime, 3.0) each frame.
power = 3.0;   // Or whatever power you want; it could even change over time

That should cause gameSpeed to grow approximately as time cubed, but you could also alter the power to increase or decrease the rate of acceleration (or make it slow down again, using a negative power).
• @Lewis someConstant is just a global constant factor you can tune to scale the overall rate of growth. – Nathan Reed Jul 6 '12 at 19:54