Can anyone help, or know how to implement acceleration/decel? I feel like this would almost work, but I cant figure out how to make your position keep going after letting go of button w/SPOFS!?
You can use the Verlet integration. Make a FOR loop containing:
X=X+ ???
Y=Y+ ???
VX=X[I]-OLDX[I]*FRICTION
VY=Y[I]-OLDY[I]*FRICTION
OLDX[I]=X[I]
OLDY[I]=X[I]
X=X+VX
Y=Y+VY
the arrays OLDX and OLDY are needed
most people use the Euler integration, but then you modify VX instead of X directly, like in the verlet integration. And verlet is more accurate, saving only points instead of smaller velocity values
Hmm, not sure I fully understand, Ill have to check that out. Strangely enough I got accel working, but only when I push UP? I swear the code looks exactly the same for each direction. It's changed a bit from SS.