5 ms·
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
by aleyan 1mo ago
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/ https://aleyan.com/projects/ascii-side-of-the-moon/
[1] https://ytirnity.com/play/hexwalker https://ytirnity.com/play/hexwalker
- holsta 1mo ago> 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.
- saintfire 1mo agoPopping 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.
- butlike 1mo agoIn 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.
- aleyan 1mo agoAU/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.
- butlike 1mo agoNice, 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.
- agys 1mo agoA 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 https://play.ertdfgcvb.xyz/#/src/basics/performance_test
- aleyan 1mo agoI 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.
- slowin 1mo ago> 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.
- echoangle 1mo ago> 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.
- slowin 1mo agoYou get notified if the server key changes though. I don't think it's fair to say there's no defense against MITM.
- dolmen 1mo agoThat doesn't protect against MITM happening on the first connect.
- account42 1mo agoMost 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.
- Daviey 28d agoHaving made`ssh mario.baby` and https://mario.baby https://mario.baby (visa was) from the same code.. I'd choose https any day.
- qsera 1mo ago>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.
- thomasfromcdnjs 1mo agoI 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/GRAPHICS.md https://github.com/thomasdavis/sshfighter.com/blob/main/docs... (the homepage is ai generated, the real work is in the ssh server)
- mspreij 1mo agoUh.. that looks freakin' awesome. How?!
- thomasfromcdnjs 1mo agoaha 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.
- mspreij 1mo agoI 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.
- thomasfromcdnjs 1mo agowould love to see what you build. i am working a ssh mmorpg, about to start working on the lore
- alchemism 1mo ago
- larme 1mo agobecause modern browsers are monsters that a lot of us want to avoid
- deleted 1mo ago[deleted]