My wife traveled for work and came home with Covid. So i am quarantined for a few days. Converted a raycaster for the NG version of Basic-Engine while I have lots of time to play. If you make a game of it , please share.
``
10 DIM SinTable(1795)
20 DIM CosTable(1799)
30 PI = 22 / 7
40 DIM Mapp(10, 10)
50 FOR z= 0 TO 1795
60 SinTable(z) = SIN(z * PI / 900) * 100
70 CosTable(z) = COS(z * PI / 900) * 100
80 NEXT z
90 FOR y = 1 TO 10
100 FOR x = 1 TO 10
110 READ Mapp(x, y)
120 IF Mapp(x, y) = 2 THEN
130 Mapp(x, y) = 0
140 px = x: py = y
150 END IF
160 NEXT x
170 NEXT y
180 px = px * 1000
190 py = py * 1000
200 SCREEN 3
210 Angle = 0
220 SkyColor = rgb(0,0,64)
230 ' WallColor = rgb(0,64,0)
240 FloorColor = rgb(12,12,12)
250 DO
260 call Raycast
270 DO
280 kb = INKEY()
290 LOOP UNTIL kb >1
300 IF kb = 87 THEN px = px - SinTable(mangle) * 5: py = py - CosTable(mangle) * 5
310 IF kb = 83 THEN px% = px + SinTable(mangle) * 5: py = py + CosTable(mangle) * 5
320 IF kb = 65 THEN mangle = mangle + 25
330 IF kb = 68 THEN mangle = mangle - 25
340 IF mangle < 0 THEN mangle = mangle + 1800
350 IF mangle > 1795 THEN mangle = mangle - 1800
360 LOOP
370 proc Raycast
380 s = -1
390 FOR z = -160 TO 160
400s = s + 1
410 a = mangle + z
420 IF a < 0 THEN a = a + 1795
430 IF a > 1795 THEN a = a - 1795 '
440 xx = px: yy = py
450 dd = 0
460 DO
470 xx = xx - SinTable(a)
480 yy = yy - CosTable(a)
490 m = Mapp(xx / 1000, yy / 1000)
500 dd = dd + 1
510 LOOP UNTIL m
520 ds = 1000 / dd
525 cr=rnd(16):cg=rnd(15):cb=rnd(16)
530 LINE s, 0,s, 99 - ds, SkyColor
540 LINE s, 100 - ds,s, 100 + ds,rgb(cr,cg,cb)'walls
550 LINE s, 101 + ds,s, 199, FloorColor
560 NEXT z
570 RETURN
580 DATA 1,1,1,1,1,1,1,1,1,1
590 DATA 1,0,0,0,0,0,0,0,0,1
600 DATA 1,0,0,1,0,1,1,1,0,1
610 DATA 1,1,1,1,0,0,0,1,0,1
620 DATA 1,0,0,0,0,0,0,1,0,1
630 DATA 1,0,0,0,0,2,0,0,0,1
640 DATA 1,1,1,1,0,1,0,0,0,1
650 DATA 1,0,0,0,0,1,0,1,0,1
660 DATA 1,0,1,1,1,1,0,0,0,1
670 DATA 1,1,1,1,1,1,1,1,1,1