-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.txt
205 lines (163 loc) · 7.92 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
============================================
DONE
============================================
/!\ add context (procedural not object) +
/!\ add presentation of game loop and calls to functions init() setup() update() draw() etc...
Stories
============================================
TODO
============================================
/!\ update utils to make the particle effect use filterColored texture
/!\ create documentation for utils.py (add into PDF ?)
/!\ add install of environment (pycharm, retrieve files from zip, install arcade, 1st run)
/!\ add description of sprites objects (fields and methods)
/!\ add description for sounds (play method)
/!\ add documentation on onKeyEvent/onButtonEvent/onAxisEvent data (names of axis or buttons, ...)
/!\ add description for parallax
set_texture field for "freezed" AnimatedSprite (do not use update_animation)
can_reap for burst particle emitter
============================================
MAIN
============================================
- Doc containing sizes of each image sprites
- Installation of tools (PyCharm + Initial code + running first)
- Presentation of the environment (process.py : __init__, setup, update, draw) + game loop
- Presentation of the Class fields (access to these variables in all the process.py file) + self keywoard
- Presentation of the Sprites objects, creation + members (center_x,center_y,scale_x,_scale_y, draw(), update_animation())
- Information on creating new methods for each functionality (creation, draw, update, ...)
- Information on keeping a list of all the variables (types, names, descriptions, ...)
- Follow steps to create the game
============================================
SINGLE SPRITE MOVE
============================================
1 ) single sprite + draw (creation + draw)
> constants size of char(W,H)
> createCharacter()
> drawCharacter()
2 ) add position variable + update center_x/center_y
- key event to update position + update sprite onto position + draw sprite
> add position
> add key pressed (move is not smooth)
> add moves booleans + SPEED + deltaTime parameter
> add update position and update keypress code
3 ) add limitation on screen borders
> update updateCharacter function
4 ) controller event to update position
> just update gamepad event function using axis "X" and analog value > 0.5
============================================
BACKGROUND DISPLAY
============================================
5 ) add background sprite (HD ratio)
> Create sprite and display it (create/draw)
============================================
ANIMATED CHARACTER
============================================
6 - load animation 'run'
> just change parameter object and call to animated function
> add update_animation sprite in updatecharacter method
7 - load animation idle and store both in memory : update one of them according to movement
> modify updateCharacter function to do that
8 - add variable to store last move direction
> Load also flipped_horizontal animations in memory
> modify last direction when moving in one direction
> use last direction and moving variables to select correct animation (1 out of 4)
============================================
ITEMS
============================================
9 - Item creations and display
> add init function to create list
> add generation function to create random position on top of the window and random speed
> create anim sprite
> use set_texture for the animated sprite to choose image
> draw function to draw all the sprites from list
10 - Item moving and destruction
> update function to make the item goes down (@speed)
> remove item when leaving area (bottom)
11 - Item automatic generation
> add counter variable for generation
> add constant for generation interval
> Update method that is called when pressing SPACE (give deltatime in parameter)
> generate items regularly (add timer)
============================================
BOX COLLISION
============================================
12 - box collisions between items and character
> creat box/box collision function
> create variables for item and char sizes (or ratio from sprite sizes)
> add function that checks collisions and remove items when colliding with player
============================================
SCORE and LIFE
============================================
13 - Score management
> add score variable
> update score when player catches items (when collision is ok)
> add score text display
14 - Life Management
> add Life variable + init life constant
> update life when item leaves area
> add life text display
============================================
END OF GAME
============================================
15 - end management
> state variable with 3 states "ready/running/finished"
> create isRunning, isReady, isFinished, startGame, stopGame, rewindGame functions
> Function that checks any key press or any button pressed to switch from "finished" state to "ready" state
> start button or ENTER to go from "ready" to "running"
> only generates items if game is running and not ended
> only catch items if in running state
16 - display HUD (text)
> display start message when "ready" to play (waiting for start button)
> display end message (with score) when finished
> make the start message blink using the system time (e.g. one second period)
============================================
SOUNDS
============================================
18 - handle sounds
> Create and play sound when catching an item
> Create and play sound when missing an item
============================================
HIGH SCORES
============================================
17 - Handle high scores
> read a file to get high scores (use of pickle)
> display high scores at game start
> save high scores in file when a game is ended (use pickle)
> only keep the 10 greatest values
============================================
DISPLAY FEATURES
============================================
101 - Make the items turn
> use the angle property of the sprite object to make the items turn
102 - Visual effects
> create particle effect or sprite animation when catching an item
> create particle effect or sprite animation when missing an item
> create particle effect when character is moving
103 - Use of sprites to display a life bar
> add life bar sprites
> function to display bar according to life variable
> modify color according to life using "filterColor" (e.g. from red to green)
103 - Create parallax background
> compute offset for each layer
> display layers in correct order + exclude some displays depending on game play (front layer displayed after character, ...)
> modify item positions according to parallax offset (each item must have a xRef value) + bursts
104 - Add some random clouds
> function to generate clouds periodically
> each cloud has a different appearance and a speed value
> each cloud has to be parallax-compatible (x position reference)
============================================
GAME FEATURES
============================================
201 + Make the items go up and down
> make the items first go up while the collision is not enabled
> the item may be darker or more transparent
> when the item reached the top of the screen it goes back down (and collision is now enabled to catch it)
> speed of the item is still used
> use of an additional variable (boolean) or time reference (float) to know if the item has to go up or down
202 - make the player goes fast
> enabled when holding key/button (e.g. SPACE or any button, but not MENU button nor ENTER key)
> when enabled, changing direction is not possible anymore
203 - Use of pseudo random
> code your own pseudo random number generator
> use it to generate item X reference positions in always the same order
>