-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
119 lines (90 loc) · 4.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
111
112
113
114
115
116
117
118
119
-------------
HIGH PRIORITY
-------------
* remove as many Z* classes as possible and just use
Foldable/Traversable/Monoid/Etc.
* Switch Portal to non-empty list
* Add pickupItem and pickAllItemsOnGround function
* make Distribution a * -> * kind and make Damage use a Distribution Int
make sample return m a instead of m Double
Mostly we will have Distribution Int, but some Doubles may be required
------------
LOW PRIORITY
------------
* Add ConfirmDropSelectedItems port
Simple yes/no display, with a list of to-be-dropped items underneath.
* Make map bigger and find performance bottleneck(s)
- Hopefully it won't be Brick itself (looks like it is)
* Use Data.Coerce to speed up newtype wrapping/unwrapping of lists in some cases?
need to better understand if this is necessary
* remove Log newtype (not needed, sequence of messages just fine)
* comment unused Z* class instances
* Make function to select Menu focus by matching 'shortcut'
* make a printEntity function for debugging
* add HasCallStack to more contexts
* Add system to auto-explore by pressing the 'Tab' key
This will be difficult.
- Add A* path-finding algorithm (DONE)
- Add function to choose next tile to explore towards
- How to choose that tile?
- Recursively sub-divide level into blocks until one block has X% more
unexplored (void) tiles than the rest.
- Then pick N random visible open tiles in that area
- Compute A* path/distance to these N open tiles and pick smallest
distance
- Save this path as a player component and begin following it
- Stop following when:
- Encountered Enemy, Door, Shop, etc.
- Saw item that isn't AlwaysPickup type
- Level is fully explored (might be unreachable areas)
- Check situation after other entity events are processed
and clear auto-explore path if any of the above conditions met
* Add system to auto-attack to reduce early game monotony
* Add 'entitiesInVisionOf' function will be useful in many future contexts
--------
FINISHED
--------
:: Default Components
Make a function that takes EntityType as argument, and adds *only* the
100% essential default components.
This is one way to help guard against the problem of forgetting to update
every generator when a new component is added.
:: breakdown of Glyph
separate Glyph into GlyphBasic and Glyph (which is just two GlyphBasic's,
one for player visible and one for out of player vision range (fog))
:: Stack trace in ZError
add StackTrace to ZError (only in GHC 8.2.X ? Nope, it is in )
:: Create a Menu variant where you can select/deselect groups of items
Maybe call it MenuGroupSelect?
type MenuGroupSelect a = Menu (Bool, a)
with a pair of new mark/unmarkFocus functions
and a 'getAllSelected' function
:: Fix InventoryView port
It should simply display a list of all items (don't worry about grouping all identical items),
but with one additional feature: mark items for drop with 'd' then drop all with D.
:: Remove exceptions from code!
Handle errors explicitely and log messages to describe things that shouldn't have happened.
For fatal errors that should never happen, log dramatic message and do some sort of default
behavior just to keep the program running for debugging purposes.
It would be more fun for the end users any way if the game just got really weird after it broke,
rather than simply exiting immediately.
:: convert GlyphMap to GridMap and re-do vision system
Don't keep enemy glyphs in the fog
:: FOV algorithm and fog of war
Keep a separate GridMap Glyph of the last visible tile state for the whole level,
where we store the highest priority INANIMATE glyph last seen,
so basically anything that is not an enemy. This will be used to
assign a glyph to the tiles outside of visible range
Furthermore, keep a separate GridMap Bool that is updated each player turn
that keeps track of visibility
and a GridMap Bool that keeps track of which tiles are vision-blocking
Potentially this could be isolated to some ST/IO mutable hash table
instead of a GridMap,
and computed in the handleEventZwerg function (which is MonadIO context)
Make a function to return the full Glyph for a player-visible tile,
and call this in the relevant UIBuiler
* modify glyphMap to VTY conversion so that individual char Images are only created when
the color changes.
* Fix color setup to use triples of Word8's
* Clean up glyph fog vs. visible data structures and GlyphMap
* Add PickupItem and DropItem events