A walkable ASCII cyberpunk city in one HTML file [video]
Comments
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
So, this is a fun little prototype I've been working on. I wanted to see if I could make a city that feels alive, but is built entirely from ASCII symbols.
The idea was to create something that looks like you are walking through a world made of data without it just being a flat visual image.
It runs on a tiny custom engine I built for the project. Just JavaScript and canvas in a single HTML file. So, there's no Unity, there's no Unreal, there's no 3D models, textures, or shaders.
Underneath the system, if you like, it's a grid-based 3D world. The city stores where roads, buildings, trees, cars, and people are, along with things like building height. And every frame, the renderer casts rays out from the camera across that grid, finds the first thing each ray hits, and uses the distance to work out perspective, size, depth, and what should be hidden behind other things.
The engine also handles collisions, cars, pedestrians, and certain objects correctly in front of or behind each other.
So, instead of normal graphics, it turns all of that into letters, numbers, and symbols on a canvas. Nearby objects use larger, brighter clusters of characters. Distant objects become [music] smaller and fade into the dark.
So, in other words, it's a tiny 3D city made from blocks, but you see it through a screen of ASCII characters.
I think I'm going to carry on playing around with this prototype. Let me know what you think.





