Hacker News new | past | comments | ask | show | jobs | submit login
Dissecting the 128-byte raycaster (2014) (finalpatch.blogspot.com)
130 points by petercooper on March 7, 2018 | hide | past | favorite | 20 comments



Bonus content: Terry Davis randomly shilling TempleOS in the comments.


I wouldn't say that it's random. TempleOS seems to designed for the niche of classic style bare metal applications, extending the ideas behind 86DOS and C64 development on to modern systems.

Someone who's into a 128 byte DOS raycaster would probably find TempleOS to be pretty cool.


The article itself is very interesting, the Terry Davis comments were the cherry on top.


640x480x4bit is indeed like circumcision, yes.


What happened to that guy? Haven't seen anything lately.



So he's not homeless?


AFAIU, he's on disability pretty much permanently.

Which I'm all for FWIW.


For some reason Terry Davis is like nerd catnip.

I think we came to the conclusion that he has Tourettes, Schizophrenia, or some other mental condition which produce his racist rants, repetitive speech patterns, and hallucinations.


TYVM, I almost missed that gem.


The author implemented\improved the shader as https://www.shadertoy.com/view/MdXXz2

I copypasted the original code here - https://www.shadertoy.com/view/MdtcDX - neat!


Heads up to userbinator who posted about this in yesterday's mini Wolfenstein post BTW: https://news.ycombinator.com/item?id=16534119


writing in assembly is such a joy ... cuts to the essence ... such speed, power and danger ... especially when doing graphics pre gpu ... your post inspires me to get back on that saddle ... loved back when I found how to control one pixel then over a few days implemented bresenham's line algorithm then had objects moving in 3d with perspective projection all in a few pages of code, of course no libraries ... electrical engineering majors who get assembly as their first programming course like me are exposed to programming in the spirit of a chainsaw haircut

great post


To calculate a simple xor (color=x ^ y) to produce a texture for walls was a common hack in the early days of computer graphics. I used it frequently under DOS. It is still useful for these kind of hacks :-)


It's visually distinctive as well. As soon as I saw the screen capture I thought "that's an XOR".


It's known as "munching squares": https://en.wikipedia.org/wiki/Munching_square


Author (of the article, not the demo) here. I still remember debugging this thing in Turbo Debugger in DosBox and the CDQ instruction was causing trouble because Turbo Debugger could not recognise it.


I just tried it in dosbox 0.74 on Linux and it doesn't work - it renders very slowly and nothing that looks like that youtube video. Does it work for anyone else?


Thanks for posting this! It was a great read. I have always been interested in low level graphics programming.


That's real time? Awesome!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: