Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Pirating the Pirates (mubi.com)
    65comments
  2. Hijacking the PS5's RTMP stream (yashgarg.dev)
    20comments
  3. Show HN: HN.watch – Videos of all Hacker News posts (hn.watch)
    22comments
  4. Joseph Szabo’s pictures of American adolescents (newyorker.com)
    1comments
  5. Who wrote Elizabeth I's most scathing letters? (smithsonianmag.com)
    2comments
  6. Parley: Federated, decentralised chat that speaks plain IRC (mills.io)
    124comments
  7. When did Google get so weird? (sancho.bearblog.dev)
    955comments
  8. Launch HN: Vespper (YC F24) – SOTA Docx MCP (vespper.com)
    2comments
  9. GrapheneOS – When an app is slow (wirelessmoves.com)
    7comments
  10. What heraldry and Japanese mon can teach about visual-identity generators (benovermyer.com)
    13comments
  11. Windows 11½ (definitelynotwindows.com)
    62comments
  12. MongoDB CEO resigns to join Meta (reuters.com)
    189comments
  13. Sonnet 5.5 (anthropic.com)
    159comments
  14. Cf: The Agentic CLI for the Cloudflare API (cloudflare.com)
    18comments
  15. So long Google, and thanks for all the nudes (lecaro.me)
    33comments
  16. I made a visual workspace for AI Automations (biom.dev)
    9comments
  17. OpenAI still doesn't seem to have a handle on all of its rogue AI activity (techcrunch.com)
    65comments
  18. Kids turned low-traffic NPR Spotify comments into a secret group chat (thisamericanlife.org)
    99comments
  19. 37,500 border drawings: a map of the world as people remember it (habibicode.org)
    31comments
  20. What Would a Serious AI Product Look Like? (glyph.im)
    26comments
  21. Footguns with Postgres “at time zone 'UTC'” (bookofrevenue.com)
    87comments
  22. The problem is not AI code, but not knowing about system architecture or intent (ssp.sh)
    195comments
  23. Coding Is Not Solved (alexewerlof.com)
    366comments
  24. Show HN: Destroy Any Website with Stickman (spritefusion.com)
    8comments
  25. Show HN: PaperMono, e-ink fridge magnet shopping list with mobile web page (github.com/seamusc)
    50comments
  26. Solving a corn puzzle with CP-SAT (thill.me)
    5comments
  27. Owed a billion dollars in Nvidia stock (colo.to)
    430comments
  28. Ember-1 (fireworks.ai)
    243comments
  29. Show HN: Free alternative to graphics design giants (scissor.studio)
    33comments
  30. Nissan's third generation e-POWER powertrain (nissan-global.com)
    343comments

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

401 pointsby 28d agoyoutube.com
65 comments
1mo agoHN ↗

From the video description:

“I wanted to build a city that feels alive, but is made entirely from ASCII characters.

This is a small custom engine built with JavaScript and Canvas — no Unity, Unreal, 3D models, textures, or shaders. The world is a grid-based city with roads, buildings, trees, cars, and pedestrians.

Every frame, the engine raycasts from the camera to work out perspective, depth, collisions, and what should be visible, then draws it all using letters, numbers, and symbols.

In other words: it’s a tiny 3D city made from blocks, viewed through a screen of ASCII characters.

Still a work in progress, but I’m going to keep pushing the atmosphere, detail, and interaction further.”

1mo agoHN ↗

This is really nice! is it accessible somewhere to play with?

28d agoHN ↗

The OP's first link is a demo, their second link is the source.

28d agoHN ↗

Wouldn't it be better to use blocks (219 in ASCII) as the main paint unit and use some other half-block and "hashed" characters (ASCII 220, 223, 176-178) to implement dithering?

28d agoHN ↗

Everything above 127 would be extended ASCII instead of strict ASCII, if that matters.

28d agoHN ↗

There are multiple extensions to ASCII. "Extended ASCII" isn't a single thing, but a category of single-byte character encodings which are supersets of ASCII.

28d agoHN ↗

Wow, that's interesting. It's a good start, and it would be interesting to see how the project develops.

27d agoHN ↗

It looks really good in the video uploaded, but when I tried it myself it didn't look the same and was hard to tell what was going on. Not sure what the issue is.

27d agoHN ↗

Same here. The video looks cool, but what I see is much messier and hard to identify shapes and objects. Tried on latest Brave and Firefox on Arch Linux.

27d agoHN ↗

The video showcases his new version. The live version is his old version.

27d agoHN ↗

Rhys is the developer of the video version, a person named Miguel wrote the version that was linked with source code. The CONTRACT.md in Miguel's version suggests AI usage, as does commit history (I'm not a zealot about this, but I do note it). I think Rhys's version is more handcrafted, but also much less accessible, being pay-to-play and being delivered in obfuscated WASM.

27d agoHN ↗

If you want to get into fixed-width character art, I highly recommend doing it in the browser like OP did rather than trying to old school it in the terminal. I have done a little ascii[0] and unicode[1] graphics, and the browser is such a better tool. You can set fonts and proportions and know exactly how things will render for the user. Mouse input, performance profiling and a bunch of other things are just better in the browser. Both of my projects work in the terminal but were browser first.

It is kind of shocking to me how TUIs are enjoying a bit of dev tool renaissance right now when the browser is such a capable platform.

[0] https://aleyan.com/projects/ascii-side-of-the-moon/ [1] https://ytirnity.com/play/hexwalker

27d agoHN ↗

It is kind of shocking to me how TUIs are enjoying a bit of dev tool renaissance right now

For me, it's because I can SSH from my wimpy laptop to systems with hundreds of CPU cores and TBs of RAM - and use the same tools and workflows that I am used to.

27d agoHN ↗

Popping into a TUI from an existing terminal session to quickly do something without lifting my hand is the only reason I use and prefer a TUI.

If I have to open a browser which has, frankly mediocre, kb nav, then I'd rather it just be a GUI.

I guess I'm a browser detractor, though, because unless its a webserver used for quick configs then I dread using them.

27d agoHN ↗

In hexwalker, what does the AU/A0 button do? Also is there anything to "do" or is it more of a wanderlust simulator? I found a cave with a coffin but so far no items underfoot to use.

27d agoHN ↗

AU/AO are auto explore underworld and overworld and A0 is to stop auto explore. You can click on them in the top menu.

Also is there anything to "do" or is it more of a wanderlust simulator? It is mostly just a technology demonstrator for having a hexagonal grid map in the terminal. There is nothing to do. I am prototyping some gameplay features around interacting with the environment, but I expect the end result will be very light weight gameplay that more "A Short Hike" than nethack.

26d agoHN ↗

Nice, thanks for the reply. For what it's worth, I like the sparse nature of the game so far, and yeah, agree on not trying to make it into nethack.

27d agoHN ↗

A couple of years ago I wrote extensive benchmarks on three browser-based rendering techniques: text in the DOM, 2D canvas, and WebGL canvas. The DOM approach is the purest, as it uses a font, and it can achieve very good performance. The only noticeable slowdown at 60 FPS occurs when the character color changes frequently within each line: each new character needs to be wrapped in a span. 2D canvas is a bit more flexible but not necessarily faster. WebGL is obviously the fastest, at 1000+ FPS, and pixel fonts can be rendered ultra-crisp as well.

Below is the DOM test for frequent vertical color changes. Press and hold the cursor over the ASCII output to change the orientation (notice the FPS drop at the top left).

https://play.ertdfgcvb.xyz/#/src/basics/performance_test

27d agoHN ↗

I suspect DOM is probably fast enough for most usecases. For me, DOM only started chugging because every tile (2 half-width characters in hexwalker) was a react element and those would get garbage collected en-masse and cause studder.

27d agoHN ↗

It is kind of shocking to me how TUIs are enjoying a bit of dev tool renaissance right now when the browser is such a capable platform.

Command line tools (and by extension TUIs) can be used over SSH and don't require messing around with HTTPS certificates. They also have the benefit of having the context of your CWD.

27d agoHN ↗

don't require messing around with HTTPS certificates.

Which also means there’s no real defense against MITM attacks… at least I don’t think anyone seriously checks the host key on first connection.

27d agoHN ↗

You get notified if the server key changes though. I don't think it's fair to say there's no defense against MITM.

26d agoHN ↗

That doesn't protect against MITM happening on the first connect.

26d agoHN ↗

Most reasonable countries have the same defense against that as you get against someone stabbing you. I don't see many security professionals insisting that you have to walk around in plate mail for some reason.

27d agoHN ↗

when the browser is such a capable platform

Seriously? Why would you want to open a memory heavy browser tab to run a TUI? This attitude is how we got Electron.

Browser as an app platform, should be used as a last resort.

27d agoHN ↗

I built sshfighter.com recently and pushed terminal graphics to the limit (with no kity)

You have to zoom out to get more pixels for it to look good (and press v to switch rendering engine if it starts off poor)

ssh sshfighter.com

And instructions on how to do it are here -> https://github.com/thomasdavis/sshfighter.com/blob/main/docs...

(the homepage is ai generated, the real work is in the ssh server)

27d agoHN ↗

aha i've been hacking away at the terminal graphics over ssh for ages for months, the repo is fully open source.

the sprites aren't all the same size or as good as they could be but already spent too much $$ on sprites.

the sprites are just passed through algorithms that optimize for what text characters at different aspects would make them look good.

27d agoHN ↗

I was pretty proud of my Game of Life & Wireworld implementations for the terminal, with half-character resolution o.o; Guess I'll have to up my game and start work on Twin Cobra and Dune ][ clones.. now that I've seen it's possible..

Using sprites is clever :-) then I guess that's how these older games worked too.

27d agoHN ↗

would love to see what you build. i am working a ssh mmorpg, about to start working on the lore

27d agoHN ↗

This is awesome. I did the same, sshwars.com [NSFW]. Mine is def not as graphic cool as yours but different game play.

OP: Amazing ascii world! I love old school terminal style everything.

27d agoHN ↗

because modern browsers are monsters that a lot of us want to avoid

27d agoHN ↗

Is the GitHub project the same as the videos? Seems like no.

27d agoHN ↗

Welcome. Not a dupe if no discussion after a period of time. Sometimes things just don't get traction. Resubmit is ok.

27d agoHN ↗

Sometimes things just don't get traction. Resubmit is ok.

More like it was resubmitted a hundred times already.

27d agoHN ↗

This makes me deeply nostalgic. Starlight Zone from Sonic the Hedgehog is my favorite game level of all time and the aesthetic of this city is basically like stepping into the background of Starlight Zone.

https://youtube.com/watch?v=ZHR5OKDL81g

27d agoHN ↗

It's beautiful, but when I went to try it out myself it seems it's pay to play?

https://ko-fi.com/s/e1e0f91951

Note that's "Prototype 1", and I gather the more developed v2 (featured in the update video) isn't available yet.

27d agoHN ↗

I bought the game so I could study the code. Unfortunately it is wasm & obfuscated. I'm gonna see what my handy dandy big giant brain buddies can do with it.

27d agoHN ↗

Reminds me of classic DOS text adventures, but with a modern cyberpunk twist. Love the aesthetic and the clever single-file packaging.

27d agoHN ↗

Seriously impressive browser tech pushing what's possible in one HTML file. The ASCII art and walking mechanic are brilliant.

27d agoHN ↗

Reminds me of old MUDs, but elevated with a proper walkable city. Super clever use of pure HTML for this whole experience.

27d agoHN ↗

Another example when technology can be just used to do cool things, art, and not only be useful (besides beiing a learning experience by the author)

27d agoHN ↗

I love the way this looks very interesting and impressive. One does wonder if as you keep making it more realistic, does it begin to lose it's ASCII nature a bit and become more like a normal rendered game to look at. I think it looks beautiful as it is at the moment and can not wait to see more of this.

27d agoHN ↗

This is an ad. Furthemore, what is being sold, for money, is a simple prototype of a basic 3D renderer.

27d agoHN ↗

This was really impressive. Looking at the comments, I didn't realize there was a whole ASCII art underground. I don't want to sound negative at all, but it would have been nice to seem some recognizable letters to drive home that it's ASCII.

27d agoHN ↗

Says it's in one HTML file... well, where? Why post a video if you could just link to it? I don't see a link to it anywhere, and I'm not watching a youtube video to look at an HTML file.

27d agoHN ↗

There is a link in the video description.

You have to pay for the demo...

27d agoHN ↗

Ah yes, let me just whip out my wallet real quick and pay for a demo of an HTML file. I'll _definitely_ be doing that.

27d agoHN ↗

To be fair it's a great way to accept donations.

27d agoHN ↗

It's not a donation if they're actually selling a file.

27d agoHN ↗

Maybe we have a different definition of "donation", but it requires you to pay at least $2.50 to access it. Sounds like a purchase, not a donation. And for a demo of an HTML document.