MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/tinycode/comments/u4y1cu/city_blocks_tiny_raycasting_demo_in_a_tweet_of/
r/tinycode • u/Slackluster • Apr 16 '22
5 comments sorted by
16
Featuring raycasting, shadows, city gen, textures, fog, and sky gradient. Actual code generates infinite city, the loop is just for the gif.
https://www.dwitter.net/d/25311
for(w=c.width&=i=10368;i--;x.fillRect(i%w,i>>7,1-Z/w*T+s,T=1))for(a=i%w/64-1,Y=Z=b=1-i/7e3,X=t*30,s=(b+a*a)/3;++Z<w&(6-S(Z>32&16<X%w&&X/8^Z/8)**12*60>Y||T|(s=S(X&Y&Z)*3/Z,a=b=1,T=Z/w));Y-=b)X+=a
3
Awesome!
2 u/Slackluster Apr 16 '22 thanks. :)
2
thanks. :)
Truly Amazing! How 3D software avoids flickering between frames of an animation?
Insanity.
16
u/Slackluster Apr 16 '22
Featuring raycasting, shadows, city gen, textures, fog, and sky gradient. Actual code generates infinite city, the loop is just for the gif.
https://www.dwitter.net/d/25311
for(w=c.width&=i=10368;i--;x.fillRect(i%w,i>>7,1-Z/w*T+s,T=1))for(a=i%w/64-1,Y=Z=b=1-i/7e3,X=t*30,s=(b+a*a)/3;++Z<w&(6-S(Z>32&16<X%w&&X/8^Z/8)**12*60>Y||T|(s=S(X&Y&Z)*3/Z,a=b=1,T=Z/w));Y-=b)X+=a3
u/BingBong3636 Apr 16 '22
Awesome!
2
u/capellan2000 Apr 17 '22
Truly Amazing! How 3D software avoids flickering between frames of an animation?
2
u/panicattheben Apr 17 '22
Insanity.