Snake screen saver written in pure C with linux in mind (idk really, its written by AI)
- C 98.6%
- Makefile 1.4%
| src | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
ssave
Auto-playing snake screensaver for the terminal. Half-block rendering for square pixels, ~22KB binary.
ssave [options]
| Flag | Default | Description |
|---|---|---|
--scale |
2 | Pixel size per cell (1-20) |
--goodies |
1 | Simultaneous food items (1-64) |
--obstacles |
0 | Extra obstacles (0-1) 1=10% |
--particles |
- | Animate eating the goodies |
--speed |
13 | Moves per second (1-20) |
--fps |
16 | Frame rate (1-60) |
--w |
auto | Terminal columns |
--h |
auto | Terminal rows |
--color.KEY=#RRGGBB |
rainbow + defaults | Per-key color |
-s / --screen-saver |
off | Any key press exits immediately |
Colors
Keys: snake, goodie, bg, obstacles
ssave --color.snake=#00ff00 --color.goodie=#ff0000
ssave --color.bg=#0a0a0a --color.snake=#ff8800 --scale=6
snakeunset → rainbow cycling over body segmentsbgunset → transparent (terminal default)
Scale
Controls chunkiness. 1 = smallest (half block per cell). Higher = bigger cells, smaller play area.
ssave --scale=1 # tiny cells, large play area
ssave --scale=8 # chunky cells, small play area
Goodies
Multiple food items make pathfinding more interesting:
ssave --goodies=6 # 6 food dots on screen at once
ssave --goodies=12 --scale=4 # busy screen, lots of action
Install
make build
make install # → ~/.local/bin/ssave
Quit
Press q. With -s, any key exits. Terminal restores automatically.
Screensaver mode
ssave -s — any keystroke quits. Use as xscreensaver command or similar.