]> git.gir.st - VIper.git/blob - README.md
initial (proof-of-concept-y) code
[VIper.git] / README.md
1 # VIIper - a Snake Clone for Unicode-compatible Terminals
2
3 ## Dependencies
4
5 - A VTE based terminal (like GNOME Terminal and a whole bunch of others)
6 - Google Noto's Color Emoji Font (Fedora: `google-noto-emoji-color-fonts.noarch`)
7
8 ## Keybindings
9
10 hjkl or cursor keys move the snake.
11 r to restart, p to pause, q to quit.
12
13 ## TODO
14
15 - DONE base game: fixed field size, fixed speed
16 - food (unicode)
17 - put 'sprites' into `schemes.h`
18 - snake elongates
19 - unicode chars
20 - timer, score, increasing speed
21 - special items: slower snake, shorter snake, etc.
22 - input buffer (so fast 180° turns get executed)
23
24 ## Notes
25
26 ### terminal compat
27
28 to display emojis, we need a terminal that can handle a color emoji font (no
29 shit, sherlock). mlterm, xterm and urxvt didn't work in my tests (mlterm might
30 work if compiled correctly, the other two use bitmap fonts and i don't think
31 there are any w/ emoji support). konsole will have to be tested in the future.
32 i intend to put bonus items in the game that will only be visible for a short
33 time. when they get near the end of their life, SGI-5 (blink) will make them
34 blink. this is supported in gnome-term 3.28 (vte 0.52) which is supplied with
35 fedora 28. [bug report](https://bugzilla.gnome.org/show_bug.cgi?id=579964)
36
37 ### drawing the snake
38
39 to draw the snake with box chars, we need to know which glyph to draw.
40
41 our current position is X, and our predecessor and successor are on one of
42 `[NESW]` of us (we need to compute the relpos from the absolute). we need to
43 draw a line between them. note that head and tail have `NULL` as pre-/successor.
44
45 ```
46 [N]
47 [W][X][E]
48 [S]
49 ```
50
51 6 combinations (+ reverse):
52 - N-S -> `||`
53 - W-E -> `==`
54 - N-E -> `'=`
55 - E-S -> `,=`
56 - S-W -> `=,`
57 - W-N -> `='`
Imprint / Impressum