]> git.gir.st - VIper.git/blob - README.md
note about dejavu mono braille chars
[VIper.git] / README.md
1 # VIIper - a Snake Clone for Unicode-compatible Terminals
2
3 TODO: find a better name
4
5 ## Dependencies
6
7 You'll need either a terminal emulator with good Unicode (Emoji) support and a
8 compatible fonts, or an actual DEC VT220 to fully enjoy the graphics of this
9 game. This is what I'd recommend:
10
11 - A VTE based terminal (like GNOME Terminal and a whole bunch of others)
12 - Google Noto's Color Emoji Font (Fedora: `google-noto-emoji-color-fonts.noarch`)
13 - DejaVu Sans Mono with Braille characters patched in (fetch from Ubuntu)
14
15 ## Keybindings
16
17 `h`, `j`, `k`, `l` or cursor keys move the snake.
18 `r` to restart, `p` to pause, `q` to quit.
19
20 ## TODO
21
22 - DONE base game: fixed field size, fixed speed
23 - DONE food (unicode)
24 - DONE put 'sprites' into `schemes.h`
25 - DONE snake elongates
26 - DONE unicode chars
27 - DONE input buffer (so fast 180° turns get executed)
28 - DONE only redraw changing parts of the screen
29 - DONE input out of whack when stopping (^Z) and resuming
30 - DONE keybindings for restart, pause, redraw
31 - DONE on dying: show end screen, allow restarting
32 - DONE score, increasing speed, ~~timer~~
33 - DONE bonus/special items: slower snake, shorter snake, etc.
34 - decaying points? (more points the faster you get the food)
35 - wall-wrap-around mode?
36 - fix all `grep -n TODO viiper.c`
37
38 ## Notes
39
40 ### terminal compat
41
42 to display emojis, we need a terminal that can handle a color emoji font (no
43 shit, sherlock). mlterm, xterm and urxvt didn't work in my tests (mlterm might
44 work if compiled correctly, the other two use bitmap fonts and i don't think
45 there are any w/ emoji support).
46 i intend to put bonus items in the game that will only be visible for a short
47 time. when they get near the end of their life, SGI-5 (blink) will make them
48 blink. this is supported in gnome-term 3.28 (vte 0.52) which is supplied with
49 fedora 28. [bug report](https://bugzilla.gnome.org/show_bug.cgi?id=579964)
50 for KDE's konsole you'll need [this
51 fontconfig](https://gist.github.com/IgnoredAmbience/7c99b6cf9a8b73c9312a71d1209d9bbb)
52 and follow the steps inside.
53
54
55 ### strange behaviour of SIGALRM
56
57 I'm using SIGALRM to advance the snake's position. during some refactoring I
58 noticed that when the signal handler returns, a STX (ASCII 0x02) byte gets
59 pushed onto stdin.
60
61 ### DejaVu Sans Mono: Braille Characters
62
63 This font (while otherwise beautiful) does not by default include glyphs for the
64 braille characters in Unicode. And gnome-terminal falls back to some very ugly
65 rendition.
66
67 Ubuntu patches this font to include those glyphs, so you can just fetch it from
68 there, or patch the font yourself. For this, open
69 `/usr/share/fonts/dejavu/DejaVuSansMono.ttf` and `DejaVuSans.ttf` and copy the
70 braille section to the Mono variant. You can save the font under a different
71 name in the same directory and the fallback will then work correctly.
Imprint / Impressum