summaryrefslogtreecommitdiff
path: root/notes.txt
blob: 502710f8df237be3c4f4c3df565803293003391f (plain)
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
initial memory usage: 5704 bytes

after int type changes: 5180 bytes

after basic bitmask: 3580 bytes

change color into u8: 1944 bytes

move color into bitmask: 1908 bytes

remove lock_tick from slot: 788 bytes

change some enums and make piece_matrix samller: 606 bytes

optimize piece_queue: 530 bytes

add das: 936 bytes

000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6

00000000
00000111

INIT = 0
ONCE_RIGHT = 1
TWICE = 2
ONCE_LEFT = 3

clockwise:
- 0 -> 1, 0
- 1 -> 2, 2
- 2 -> 3, 4
- 3 -> 0, 6

counter clockwise:
- 1 -> 0, 1
- 2 -> 1, 3
- 3 -> 2, 5
- 0 -> 3, 7

gl optimization notes:
- store board pieces in an array of vaos
- make a structured clear even in the gameplay code
  use this to update the vao array as well as animations
- stuctued lock event for animation in gl frontend
- store static skin elements in a seperate vao array
  update on screen resize
- make ui element for the current piece which is copied
  the board array on a lock event which leaves time to
  edit the vertex buffer before copying it if it needs an
  animation

FIXES:
- hold needs to trigger update
- restarting needs to update the board drawable

MUTEX:
- give timer a mutex and move game update to another thread

TODO:
- make scene system, then generic tetris board seperate
- fix ordering of main scene
- more structured event system in the core lib
- add more sounds/skin elements and match them up to the new events
- new minimal skin