Elektrine lite

← Feed

@797@merveilles.town

Post #2277474

2025-09-22 02:59 UTC

I felt sorry for a friend who was frustrated with the I/O portion of writing a Rogue/Dwarf Fortress-like game this morning. Text mode is surprisingly painful in 2025 compared to 1985, when you could just grab a pointer to the text framebuffer and poke bytes. So, I made a little open source library that presents a proper, modern graphics API for text mode games! textgame runs directly in the terminal on macOS, Linux, Windows 11. 32-bit unicode, 24-bit color, double-buffered, keyboard input, blitter with transparency and clipping regions, and string printing with word wrap and numeric formatting. https://github.com/factory797/textgame

Replies (9)

  • @ireneista@adhd.irenes.space 2025-09-22 09:36

    @797@merveilles.town oh very nice :)

    Open ##2591449

  • @gulfie@mastodonapp.uk 2025-09-22 09:56

    @797@merveilles.town fond memories of being severely impressed with the curses library in the mid 1980’s…

    Open ##2591450

  • @riley@toot.cat 2025-09-22 10:24

    @797@merveilles.town What do you mean, "32-bit Unicode" ? Did you develop a better way to map combined glyphs than the Consortium did? (After all, a single code point is but 21 bits — and while there's lot of combining characters, most of the theoreticlly feasible combintions do not actually make sense.)

    Open ##2591451

  • @troed@swecyb.com 2025-09-22 11:30

    @797@merveilles.town cool!!!

    Open ##2591454

  • @fraggle@social.coop 2025-09-22 17:08

    @797@merveilles.town nice! I implemented something similar (libtextscreen) for Chocolate Doom

    Open ##2591455

  • @lea@lea.lgbt 2025-09-22 17:52

    @797@merveilles.town love that :) could also be useful to port my current DOS project (which pokes to 0xB800 or 0xB000 on a monochrome display adapter) to other platforms. Not working on a game, but a music composing tool :)

    Open ##2591456

  • @smattymatty@techhub.social 2025-09-22 19:12

    @797@merveilles.town I absolutely love the aesthetic, reminds me of am much simpler time. I am glad to see you unravel the recursive absurd and return to the base case; simple fun games!

    Open ##2591457

  • @jsatk@sfba.social 2025-09-22 19:37

    @797@merveilles.town holy cow

    Open ##2591458

  • @swetland@chaos.social 2025-09-23 00:07

    @797@merveilles.town Neat. Reminds me a bit of (the sadly no longer maintained, but still quite useful) termbox (https://github.com/nsf/termbox), as far as providing a simple addressable display on top of terminals. Which really changed my way of thinking about using text terminals -- back in the 70s/80s, the key was to optimize for sending the minimal number of bytes over the (often quite slow serial) transport... nowadays simply refreshing the whole screen or a dirty rectangle is simpler and faster in most cases.

    Open ##2591459