{"repo":"izabera/pseudo3d","free":true,"listed":false,"github":"https://github.com/izabera/pseudo3d","clone":"git clone https://github.com/izabera/pseudo3d.git","description":"a raycaster in bash","language":"Shell","stars":273,"topics":["3d","bash","gamedev","raycasting","terminal","terminal-based","terminal-game","tui"],"license":null,"category":"cli-tools","readme_excerpt":"a raycaster in bash https://github.com/user-attachments/assets/59851903-cf4c-4dfc-afae-3c533f6241f7 more screenshots/vidoes at https://imgur.com/a/izas-wolfenstein-bash-journey-bAy5zhp largely a port of https://lodev.org/cgtutor/raycasting.html use the arrow keys to rotate and move around, and q to quit why this was a bit hard - bash is slow. this is by far the biggest issue. it's so slow that you cannot possibly achieve an acceptable frame rate if you have to execute even a single command per pixel. this implies that you also cannot keep the state of the screen in memory, neither as an array of colours (did you know that accessing a random element in an array takes linear time?) nor as a single long string (did you know that accessing the nth character in a string takes linear time even in LANG=C?), because literally just reading this representation to dump it to the screen will take longer than a frame - bash has no floating point support nor access to a library of maths functions. all the maths is done on integers, scaled up by 64k - terminals are ugly if you use a full character to represent each pixel, so this uses unicode half blocks with different foreground and background colours, which effectively doubles the vertical resolution. there is unfortunately no way to update only one of the two colours in a cell, nor any way to query the current colours of a cell (besides, it would be too slow for bash), so every time we write a pixel we need to know the colour of an adjac","default_branch":null,"files":null,"tree":[],"storefront":"/r/izabera","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/izabera/pseudo3d/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}