This is hilarious. Is there any technical reason it couldn't have been written twenty years ago?
I guess 20 years ago CS students weren't told to "write a Doom-like game" as an awk homework =)
Show HN: 3D shooter in your terminal using raycasting in Awk
11–20 of 57 posts
Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#12Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#13Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#14It's amazing what you can do in so few lines of code. If you have the time you ought to do a tutorial on how to make this sort of game, it would be a great read.
It's old and C++ but explains raycasting very well.
And there is also a similar project in just 265 JS lines: http://www.playfuljs.com/a-first-person-engine-in-265-lines/
Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#15Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#16Like a sculpture made out of snot,you can applaud the elegance of the sculpture, and the elegance of the construction, but you have to wonder about the building material...
Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#17Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#18Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#19Man, that AWK looks a helluva lot like Javascript.
There is a bit of cheating going on here though. Awk doesn't support true multidimensional arrays. They are depending on a Gawk extension for that bit of functionality.
Re: Show HN: 3D shooter in your terminal using raycasting in Awk
#20Man, that AWK looks a helluva lot like Javascript.
As in Javascript, awk represents all numeric values using double precision floating point. I have always thought that was a strange (but not necessarily bad) choice for a language that is basically all about text processing. I guess it works out pretty well if you need to do 3D graphics math. There is a bit of cheating going on here though. Awk doesn't support true multidimensional arrays. They are depending on a Gaw…