Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Hacker Culture · Hacker News (YC) · · 2:48 runtime

A walkable ASCII cyberpunk city in one HTML file [video]

Comments

In the wiki Also namedJavaScript
Transcript 253 words · auto-generated captions

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.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 549 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks