3 ms·
As someone who maintains a roguelike with a terminal-like UI that: 1. Maintains an internal representation of what the game thinks is on screen. 2. Runs the g
by munificent 4mo ago
As someone who maintains a roguelike with a terminal-like UI that:
1. Maintains an internal representation of what the game thinks is on screen.
2. Runs the game for one frame which updates that representation.
3. Generates a diff to see how that differs from what's actually on screen.
4. Executes the minimum set of draw calls to get the screen to match the internal representation.
It's really not that hard. It's a few hundred lines of code.
- javcasas 4mo agoSure. For a videogame. > -> rasterizes them to a 2d screen Also you forgot "render to a framebuffer, then parse the framebuffer back to chars". Anyway, I'm off to construct the new `ls` command. It will render the list of files to a mesh of billions of polygons in a GPU with advanced shaders, 16x oversampling, HDR and all the graphic acronyms I don't understand, then read the resulting image, find the nearest character in the ANSI charset and use that one. It will be _glorious_ (and profoundly stupid)
- ux266478 4mo agoCould be improved. Encode the image to webp with high compression settings and handle the ASCII mapping by spinning up a local LLM to do OCR on it. Individually. For each cell.
- javcasas 4mo agoThanks for the idea for V2.0. Hopefully the Claude team doesn't do it first.
- tikimcfee 4mo agolol... I know you meant this comically, but you just called me out and it's glorious: https://glyph3d.dev https://glyph3d.dev I built a truly glyph based instanced quad system to render millions of characters in space at once.
- munificent 4mo agoMy roguelike's "graphics" are a simulated terminal, so it's a 2D grid of colored characters. It's essentially a TUI, just like Claude Code, except instead of rendering to a real terminal using ANSI escapes, I render to a web canvas using... something probably more complex than what Claude has to do. It's still not hard.
- fc417fc802 4mo agoVaguely related to your glorious idea. https://www.shadertoy.com/view/NtcGRr https://www.shadertoy.com/view/NtcGRr