💾 Archived View for tilde.town › ~tickletickle › blog › 2021-03-03.gmi captured on 2024-05-10 at 11:08:56. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
2021-03-03
I have always been mesmerized by fantasy consoles like PICO-8 [1] or TIC-80 [2]. They include the low-end constraints of game consoles from the eighties with high-level languages such as lua and current computer performance. People have been very creative to go over those limits, as far as creating a stunning Doom port [3]. I myself spent time fiddling with the concept. First by writing a half-baked "player" for PICO-8 cartridges to run on a cheap retro-gaming (RS-97) that features a MIPS cpu. It still requires quite a bit of work because Lexilaffle had the interesting idea of modifying key aspects of the lua interpreter to secure their assets.
Gemini is sort of a fantasy protocol. Even though it addresses some of the core problems of the web as we know it, its shortcomings, such as the impossibility to build "apps" or its denial of the social web, make it look like a nostalgic artefact from the past. For some reason I love the aesthetics of such artifacts.
Before discovering Gemini, I though a lot about fantasy computers and, I developed my own idea of the concept. First, unlike consoles that have graphics, it has to be an ASCII terminal. I love ASCII/ANSI art, and I deeply regret being born too late to enjoy the golden age of BBS. So I plan on recreating a modern days Bulletin Board System with ASCII graphics.
I have hacked a few iterations before. One used TCC [4] to compile C code "scripts" with an API giving access to a 80x25 CP437 [5] character screen displayed through SDL. Later, I explored ASCII roguelike development and made all sorts of hacks including a micropython framework which can render colorized bi-tone tiles such as ASCII characters.
This is a short design document for the BBS fantasy computer.
- It will use a 8x8 font with two 256 character banks
- The second bank will be customizable
- text/plain
- text/bbs: a gemini-like / markdown-like format with support for coloring / styling
- application/bbs: scripts that execute client side and can change
- print(x, y, text, fg, bg): show text
- peek(x, y): get char, fg, bg at given spot
- poke(x, y, c, fg, bg): set character at given location
- canvas primitives: rect / line / circle / polygon / paint?
- on_key(key, scancode, action, modifiers): key pressed
- on_char(char, modifiers): character pressed / composed
- on_mouse(x, y, button, action, modifiers): mouse moved or clicked
- on_render(time): called 60 times per second to draw the content of the terminal
- navigate(url): change url of current page
- require(url): load remote module
- fetch(url): get data from same server (status, content-type, data)
- bank(num): change character bank
- load_bank(url): load font from url
- interaction primitives: input / alert / confirm ?
- theme(color): change URL/status bar main color
- UI elements? add_link(x, y, text, url, fg, bg): simple way of adding a link
An implementation is pending, but it would be interesting to see if it can be built to run natively and in a web browser.