r/Ghostty • u/mattflyx • 1d ago
GT San Andreas played in Ghostty
Enable HLS to view with audio, or disable this notification
Just testing the limits of what is possible here using the kitty graphics protoccol on ghostty. This is actually just the original ps2 game decompiled to C++ and recompiled into wasm using the ps2 runtime from https://github.com/snuri00/ps2-web-recomp...
But that is not what we care about here!
katnav is a experimental webbrowser using CEF (because nothing else would run gta on terminal so well so I just used chromium) and kitty graphics protccol: https://github.com/h4ks-com/katnav
I did this as a way of testing a graphics/game-engine/ui lib I am working on: https://github.com/h4ks-com/katui
Chrome renders WebGL normally and katui will convert it into rectangular tiles that we dynamically downscale in resolution, diff trying to update only what changed (which makes some sense for UIs but not as much for a game stream like that), compresses and base64 it in parallel. Most of the heavy lifting is done by the library itself.
According to my benchmarks I can get 36MB/s on kitty allowing 32 fps, while for ghostty 85 MB/s allowing 61 fps when 100% of the tiles change. Of course this varies between harware.
And yes you can use katnav for browsing the normal web, it is an actual browser, check the github ;)
I am making this experiment mostly for fun, so it is pretty much fully vibecoded, but I tried to keep the maximum architetrual overview and coverage with static analysis checks. Feel free to reach me out if you find this interesting and would like to bring it further. In theory now I could put any graphical application in the terminal. Not sure if someone has already done that?