• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Simple Math question

H

Halph-Price

Guest
Any tip or tutorials for doing exp/log.

I get the programming but it's been a while since I did math.

example: To make alpha fade away on smoke, there's linear way of just "image_alpha-=.01"

but to make it fade away in the same time, but quickly in the start and then slower towards the end, or vice versa, what's the particular formula for something like that.

I've been messing around but I can't seem to really notice the differences, and I am not sure what I am doing.

I am sure there's someone here that knows math. I could figure out the answers to problems, but I don't even know how to write the problem from scratch.
 
H

Halph-Price

Guest
Have a variable t vary linearly in the [0, 1] range, then use any fast-start-slow-end function to set image_alpha, e.g. sqrt(t) or sin(t*pi/2).

Help yourself and study up on Robert Penner's tweening equations.
That's exactly what I wanted. It's not like it's an easily googleable question. Thanks for the tip using sqrt(t) or sin(t*pi/2) I wouldn't even think of it. That's great.

That's a great link.
 
Top