Raycasting 3D Maze

by Kozuma3
My raycaster thing o-o [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Kozuma3.Raycasting3DMaze##version=12

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 12
Date added: Nov 27 2020
Last updated: Aug 2
6 fans
Raycasting Created by Kozuma3



Kozuma3: (Aug 1, 8:10 pm)
Kozuma3: (Dec 4 2020, 9:38 am)
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.
Magicsofa: (Dec 4 2020, 5:16 am)
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))
X = round(sin(i),0.01)
Y = round(cos(i),0.01)

you could have a list of sin and cos results for all 360 possible angles (or was it including non-integer angles?)

and here:

var X = sin(angle) * speed
var Y = cos(angle) * speed

Why not calculate DX and DY only when the player turns, then only addition is needed for each step?
Kozuma3: (Nov 30 2020, 9:01 pm)
Magicsofa wrote:
I love it

Thank you :D
Magicsofa: (Nov 30 2020, 6:37 pm)
I love it