+/tetris

my tetris implementation

git clone https://git.julia.blue/+/tetris

Julia RyanDownload assets from urls19928ec

change-origin
1.3 KiB57 linesraw
1// reserved keys:
2// "q" / ctrl+c: quit
3// "r": restart
4// bindings {
5//     left "left"
6//     right "right"
7//     cw "x"
8//     ccw "z"
9//     flip "a"
10//     hard "up"
11//     soft "down"
12//     hold "shift"
13// }
14
15bindings {
16    left "j"
17    right "l"
18    soft "k"
19    hard "space"
20    cw "f"
21    ccw "d"
22    flip "s"
23    hold "a"
24}
25
26// all values are specified in frames, fractions are allowed
27config {
28    das 6
29    arr 0
30    gravity 60
31    soft_drop 1
32    ghost #true
33    // these mirror the 3 jstris lock delays
34    lock 30
35    extended 300
36    timeout 1200
37}
38
39// these settings are closer to a standard guideline tetris game:
40// config {das 10; arr 2; gravity 60; soft_drop 4; ghost true; lock_delay 30 300 1200;}
41
42// TODO: implement line clear delay and ARE
43// TODO: add tetris 99 example config (12f das, 2f arr, 6f are)
44// TODO: add puyo-puyo tetris example config (9f das, 2f arr, variable are/line delay)
45
46sound {
47    volume 0.3
48    ready #null
49    move "https://s.jezevec10.com/res/se0/move.wav"
50    rotate #null
51    lock "https://s.jezevec10.com/res/se0/lock.wav"
52    line "https://s.jezevec10.com/res/se0/linefall.wav"
53    hold "https://s.jezevec10.com/res/se0/hold.wav"
54    lose "https://s.jezevec10.com/res/se0/topout.wav"
55    // win "path/to/win.wav"
56    go #null
57}