-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
83 lines (49 loc) · 2.36 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
# The story of development
This contains bugs, ideas, changes, issues etc. it's somewhat chronological from top to bottom.
DONE
* Death of actors
#1
Tried to make sure dead actors are removed and won't attack back.
1. In GameLoop.hpp:
After each action(), loop through the ACTORS and see if an Actor is_dead.
If so, remove it.
2. Created failing test case of 1.
3. Fixed said test case and found another bug in the meantime.
Dead enemies should always have zero hp. Not overflow.
#2
1. Crashes when more than one rabbit gets killed.
=> Got a segmentation violation when trying to access a previously not dead rabbit.
This means that Actors don't get removed properly.
2. Implemented a really ugly way to keep track of dead enemies.
I use a vector to store iterators to dead-flagged actors and then erase them after having found all of them.
This allows for death messages / events to happen before the actual delete.
Look in "GameLoop.hpp".
* Crocodiles
1. How do crocodiles differ from rabbits?
a. They hurt a lot more, like twice as much. They are a lot slower.
Let's introduce speeds:
- FAST, means moves every second tick
- NORMAL, means moves every third tick
b. They live in a different environment, the swamp.
They are pretty damn fast in the swamp.
Let's add that to the SmallGameMap.
c. Added more speeds.
- PRETTY_DAMN_FAST, same as player speed.
- SLOW, slower than normal. Rabbits are slow in the swamp.
** SwampEnvironment
1. Added EnvironmentType so we can differentiate between environments.
* Memory leaks?
1. The principle of keeping 'new' and 'delete' as close as possible is violated a bit throughout this project.
Especially with Actors.
2. Fixed this with two global vectors from which the objects gets deleted at appropriate times such as death and quit.
* Boss Rabbidile
1. Protects the "candy mountain".
Is a combination of a Crocodile and a Rabbit.
- Combine speeds?
- Rage when attacked.
* Items
1. Rabbits should drop paws or sticks
2. Crocodiles should drop teeth
3. Items are stored in global vector ITEMS and a global std::map of
GameObject.id => vector<Item*> called INVENTORIES.
4. Items can decay after a fixed amount of ticks. Carry weight is improved with number of kills made.