+/tetris
my tetris implementation
git clone https://git.julia.blue/+/tetris
8d71d71
wasm
1// reserved keys: 2// "q" / ctrl+c: quit 3// "r": restart 4bindings { 5left "left" 6right "right" 7soft "down" 8cw "x" 9ccw "z" 10hard "up" 11flip "a" 12hold "shift" 13} 14 15// bindings { 16// right "l" 17// soft "k" 18// left "j" 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 { 28das 6 29arr 0 30gravity 60 31soft-drop 1 32ghost #true 33// these mirror the 3 jstris lock delays 34lock 30 35extended 300 36timeout 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 { 47volume 0.3 48meta { 49ready #null 50 go #null 51 lose"https://s.jezevec10.com/res/se0/topout.wav" 52// win "path/to/win.wav" 53} 54action { 55move "https://s.jezevec10.com/res/se0/move.wav" 56rotate #null 57lock "https://s.jezevec10.com/res/se0/lock.wav" 58hold "https://s.jezevec10.com/res/se0/hold.wav" 59} 60clear { 61single "https://s.jezevec10.com/res/se0/linefall.wav" 62} 63}