Tetris in PostScript(github.com) |
Tetris in PostScript(github.com) |
* 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.
gs -dNOSAFER tetris.ps
In another terminal in the same working directory, run the command it gives in the source file: stty raw -echo; cat >> t.txt
Keep the second terminal focused for your keyboard inputs. I don't know if there's an elegant way to quit, but I just close the Ghostscript window and kill the second terminal.Unfortunately only one of them survives to this day.
(WASM or otherwise)
https://en.m.wikipedia.org/wiki/NeWS
You would write full blown GUI apps in Postscript with some C glue.