top | item 42609786

(no title)

kfuse | 1 year ago

Doom doesn't use raycasting, it uses binary space partitioning.

From the description it seems to be a DOOM clone. Physics feels a bit off, but all the little details may trick you into believing that it's the real thing.

discuss

order

bzzzt|1 year ago

Doom uses both: binary space partitioning to find the visible surfaces then casting rays to draw the textures.

boomlinde|1 year ago

There is no need to cast rays when you have divided the space into convex polygons. If you know all the vertices of a convex polygon and two of them form a visible wall, you can determine the texture column and height of the screen space wall column by means of interpolation. This is what the Doom engine does.

The PC version of Wolfenstein 3D used a more straight forward ray casting approach, but I think the SNES port was Id's first use of BSP.

cyberax|1 year ago

It doesn't. Doom uses BSP to precisely determine which columns of textures it needs to render.

It's faster than raycasting, so this was even used in Wolf3D port to GBA.