-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
36 lines (27 loc) · 1.6 KB
/
todo.txt
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
TODO:
random levels
Refactor code:
Make it easier to add new blocks by creating a JSON? maybe, that then filters through into the level editor HTML, the Hoppers object and the drawGameBoard function (and any others that need it)
Game ideas:
Moveable arrow blocks
Bad hopper
UI:
Generally improve UI, maybe use Vue
End game:
Make it so ppl can save and share levels, social aspects
// During init() we log all movable blocks and create an array of objects that stores the block's home address
// and current address. Initially home and current are the same.
// When user first drags a block, its home address is stored in this selector object.
// Then when user drags the block to another location, we search the 'addresses' array
// for an object that matches the home address stored in this selector.
// Its new location is then stored in 'current'.
// The implication of this is that when the user goes to drag the block again, we loop through this process
// Only this time, the current address is different to the home address.
// The home address is referenced when dragging the block around, so that we can't pull the block
// more than one square away in any direction.
// Doing things this way means we don't have to have an object for every block, which
// gives primacy to the level map.
// This makes life easier when it comes to being able to edit levels etc.
// We also don't have to loop through a list of block objects every frame, because collisions are handled by
// the hopper object which only checks for collisions within one square of itself,
// and the loops in this object are only called when we drag a block.