-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathtodo
110 lines (87 loc) · 3.44 KB
/
todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
;;-----------------------------------------------------------------------
;; game
;;-----------------------------------------------------------------------
X create state of current piece
- :piece :J
- :position {:x 0 :y 0}
X add color
- change write-piece to write the piece's keyword to the board cell
- (for coloring/texturing per piece)
X repaint when relevant state changes
- create (drawable-board) from current piece and board
X move piece
- ignore if piece is nil
- key listener modifies :position
- create try-move!
X rotate piece
- ignore if piece is nil
- rename functions "collide" -> "fits", and "occupied" -> "empty"
- create try-rotate!
X hard drop
- get-drop-pos
- debug by drawing the ghost piece
X gravity step
- implement as go-routine
- wait on blink
- drop (lower position over time)
- lock (write piece to board if can't go any lower)
- spawn (reset current position and randomize piece)
X row collapse
- get-full-rows (indices)
- blink
- collapse full rows
;;-----------------------------------------------------------------------
;; stats graph
;;-----------------------------------------------------------------------
- build live graph of the game
- x-axis = piece number
- y-axis = height of the board after piece was dropped
- highlight rows that were collapsed
- shade cells above to indicate:
- a general sense of time it took to drop the piece
- where the piece was hard-dropped
- important to make beautiful to beckon exploration
- treat the graph as a map to be navigated
- mouse over a column to explain the data
- column rotates to a front view of the board (eager to show)
- revealing that the original column was in fact a side view of the board (aha)
- piece animates to show where it was hard-dropped
;;-----------------------------------------------------------------------
;; multiplayer
;;-----------------------------------------------------------------------
- before game
- show lobby
- during game
- render all views (since we recieve all board states)
- update layout order by scores
- after game
- show everyone's stats graph
;;-----------------------------------------------------------------------
;; fixes
;;-----------------------------------------------------------------------
- Fix implementation inefficiencies:
- make piece nil once we lock it into position
- check if piece is nil on drawable board.
- check if piece is nil on gravity routine.
- hook requestAnimFrame to draw if relevant state differs from previous frame
- remove draw from atom watcher (because multiple changes happen per frame)
- Fix control potential annoyances
- nudge piece when rotating while flush with edge?
- grant more time for t-spinning and general shifting?
- reset gravity timeout when key is down
- "fan" timeout and down key channels in gravity routine
- if down key comes first, recur?
- if at drop pos, also "fan" a global timeout to keep piece from shifting forever.
;;-----------------------------------------------------------------------
;; juice
;;-----------------------------------------------------------------------
- Emotionally connect player to actions:
- when piece is locked in, either...
- body blink
- border blink
- shockwave border
- when piece is hard-dropped:
- show trail
- when blocks collapse:
- when piece enters:
- "Casino" sounds (don't clash when everyone's speakers are on)