
ID:2639206
![]() Nov 27 2020, 9:00 pm
|
|
Raycasting Created by Kozuma3
![]() |
![]() Nov 30 2020, 6:37 pm
|
|
I love it
|
I was thinking, you could reduce CPU usage by making a lookup table for all those trig calculations? For example here:
for(i = (ANG-ARC) to (ANG+ARC)) you could have a list of sin and cos results for all 360 possible angles (or was it including non-integer angles?) and here: StepForward() Why not calculate DX and DY only when the player turns, then only addition is needed for each step? |