← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdvin Jakobsson <[email protected]>2026-09-08 19:34:30 +0200
committerEdvin Jakobsson <[email protected]>2026-09-08 19:34:30 +0200
commit676addbf62939c6ff0e0e22ba9727e8520bfedc6 (patch)
treebb711cba7cded980858d9ccb7b3c1c6c785f7072
parent7939594b8cb126674ed838a9de25dd24813321b0 (diff)
Add README
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d55cab7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+# ndoom
+
+An experiment in seeing how far a shell script can be pushed: a Wolfenstein-style raycaster written entirely in zsh, doing its trigonometry through `bc -l` and rendering the result as ASCII art in the terminal.
+
+`ndoom.sh` casts 91 rays across a fixed 8x8 hardcoded map, walking each one out step by step and writing its hit distance to a plain file called `distances`. `render.sh` reads that file back and draws one ASCII frame from it — closer walls as `#`, a floor tint below a `height` line, and blank sky above it. It's a single-frame renderer rather than a live game: the loop that would tie the two scripts together into an actual playable frame-by-frame walk is written but commented out in `ndoom.sh`, so right now it's run as two separate steps by hand.
+
+Mostly just curious to see whether shell arithmetic and `bc` could stand in for the floating-point trig a raycaster needs — turns out yes, just very, very slowly.
+
+## Running
+
+```sh
+./ndoom.sh # casts rays, writes ./distances
+./render.sh # reads ./distances, draws one ASCII frame
+```
+
+Needs `zsh` and `bc`.