I've been experimenting with PostScript programming over the past two years, creating several small games (Tic-Tac-Toe, Chess, Sokoban and Tetris) all running in Ghostscript or directly on printers. Here are my annotated slides about this quirky and fun journey, filled with insights, code snippets, and lessons learned.
I've just implemented Tetris in PostScript, pushing the limits of a document-processing language to run a realtime game. It works in GhostView on macOS.
* 600 lines / 10 KB * 69 different PostScript operators, no external libs * Realtime input, direct drop, increasing speed levels * 7-tetrimino random bags * Nintendo-style scoring and high score tracking
This project builds on my earlier experiments with PSChess and PSSokoban.
It show that PostScript is a lightweight, expressive, and surprisingly interactive programming language. A perfect tool for hacking on unexpected platforms.
Requirement levels like MUST, SHOULD, and MAY act as control flow. Section numbers define labels. Packet-diagram labels serve as registers.
Executing RFC 9379 outputs the powers of two. Pre-existing RFCs MAY parse as valid programs, forming a historically accidental standard library.
reply