Generally, for this "progressively getting faster" behavior to work, you need to have acceleration
constant and variable speed
. Update speed
and objects position
each tick (with dt
, delta time between this and previous tick) like so:
acceleration := 1; // some constant value
speed := speed + acceleration * dt;
position := position + speed * dt;
To make behavior even more progressive, you can make acceleration
to grow over time too:
acceleration_grow := 1; // some constant value
acceleration := acceleration + acceleration_grow * dt;
speed := speed + acceleration * dt;
position := position + speed * dt;
Note that if you have varying dt
, then the behavior will vary as well, since every previous step affects next one. E.g. one dt=0.5
update will produce significantly different result than five updates with dt=0.1
, despite having the same dt
sum.