Quote: "And just a heads up if the angle calculations slow it down do NOT cache sine, cosine, tangent and arctangent values in arrays, people say it is faster but I've timed it and it's actually slower."
Thanks for the tip, but when I tested it in past the array-method was faster.
Maybe it's different on each computer, who knows... Will do some more tests later...
-----
Made a new test, seems as if you're right.
sync on
sync rate 0
SetupSin()
do
cls
print "FPS: ", screen fps()
if controlkey()
print "DBP-Sin"
for x = 1 to 99999
s# = sin(x)
next x
else
print "Array-Sin"
for x = 1 to 99999
s# = _Sin(int(wrapvalue(x)))
next x
endif
sync
loop
function SetupSin()
dim _Sin(360) as float
for x = 0 to 360
_Sin(x)=sin(x)
next x
endfunction