28 lines of code (not including white spaces or comments) fast and interesting. Not a bad effort if I say myself
' Floor Casting
const resX = 640
const resY = 480
const xres = 320
const yres = 240
#include once "tinyptc.bi"
if (ptc_open("FLOOR CASTING", resX, resY) = 0) then end -1
dim shared as integer buffer(resX*resY)
dim as single u, v, w, camX, camY
dim as integer c, b
while (inkey$ = "")
camY += 1
camX = xres*sin(camY*3.14159/180)
b = 0
for y = 1 to resY
w = -yres / y
v = resX*w - camY
u = -xres*w + camX
for x = 1 to resX
c = (u xor v) and 255
buffer(b+x) = rgb(c,c,c)
u = u + w
next
b = b + resX
next
ptc_update@buffer(1)
wend
ptc_close
end 0