Raycasting Created by Kozuma3
[Old]
ID:2639206
Nov 27 2020, 9:00 pm
|
|
Nov 30 2020, 6:37 pm
|
|
I love it
|
In response to Magicsofa
|
|
Magicsofa wrote:
I love it Thank you :D |
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? |
I've just updated the source.
I went through it and renamed everything and cleaned it up for others to look at. [edit] Also the StepForward() isn't used, just left it in. |