quick poll - precalc sin & cos or perform every frame ?

BlitzPlus Forums/BlitzPlus Programming/quick poll - precalc sin & cos or perform every frame ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graig...

I ran your code and I got similar results also...

LOOKUP=0: Time 6964 Millisecs
LOOKUP=1: Time 5230 Millisecs

OK, very close results BUT! The code is badly designed as I pointed out above. Lets compare results....

Senario 1: Calc, Draw, Calc, Draw, Calc, Draw, Flip.
Using Lookups: 5230 Millisecs

Scenario 2: Calc, Calc, Calc, Draw, Draw, Draw, Flip.
Using Lookups: 4072 Millisecs

It appears that the difference is getting less and less the more calculations and more drawing is used. But is this a real world scenario? 200,000 trig functions and 100,000 drawing operations. I would say that the trig functions are an overkill here but I feel that the drawing operations are realistic. There is still over a one second difference on my machine.