-
Notifications
You must be signed in to change notification settings - Fork 1
/
todo.txt
169 lines (160 loc) · 6.82 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
To do file for red-green web-based game.
= tips =
- Should change the admin id each year, so people can't log in and review
the questions ahead of the game (after the data goes live)
- Use "observer" user when doing hybrid (online AND in-person) games
- overall process:
- use start-uwsgi, stop-uwsgi and restart-uwsgi whenever the
data changes
= to do =
- add registered user count, and still-in count to user status bar
- add single-user mode = regular timed trivia game, without moderator
- use per-user game data
- make a new directory: user-game-data
- have a game data file per user
- modify read_game_data/write_game-data
- make link so user can move ahead when they are ready
- don't put timer on show_answer page (so user can stop and get a sandwhich)
- make it so that in regular mode, only admin can change game state
- get rid of "still-in" logic for single-user mode
- add score for top data bar instead
- add link so user can use the first available guest account
- make a help page?
- work on performance:
- change to use UNIX socket, instead of 127.0.0.1:3031, for interface between
nginx and uwsgi
- use static pages
- generate static pages for each state transition
- Javascript to load static page
- do minimal processing in rg.cgi, and send back user_id,
still_in status, and name of static page to load
- Javascript should load static page via nginx
- make multiple pages per question/round
- every combination answers, indicators, and result messages
- add 'key' to question data (so users can't guess the next form
and load the static html page)
- don't import stuff that's not needed
- only import valid_user_ids on registration
- only import trivia or rps when being used
- use shortcut to find next last_game_file_name
- don't scan directory every time
- use a global variable, and just check one filename ahead
- fall back to directory scan if that doesn't work
- remove answers from user files - ??
- eliminate: clear_user_answers()
- check places where user file is read/written and remove last_answer field
- get rid of last_answer field in:
- read_user()
- clear_user_answers()
- update_user_status()
- save_answer()
- move users to faster (in-memory) storage
- need to support read from disk, in case script relaunches
- avoid reading some or all user data on every client refresh
- read data for admin stats using in-memory dictionary
- could put user alias in cookie, and only read status from still_in_dir
- avoid writing to all user data
- remove last_answer (see above)
- remove status?? (no, only admin writes to all users)
- show stats on show_answers and show_results page:
- number of users with correct/incorrect answers
- number of users eliminated this round, number still-in
- make a stats file that can be read by all users
- have admin write to the file
- have everyone else only read the file
- show number of each answer on the qwaiting and rwaiting pages, for admin
- remove all FIXTHIS items
- fix all bugs (see below)
- add notice message when user is eliminated
- make the player screen pretty
- change page colors
- add graphics
- user nicer layout
- add score to user, and display on "done" page.
- add score to user file?
- it's read on every page load anyway
- requires writing the score on each question (could be 1000 writes
for each question)
- we write 'still_in' to user file on each answer, so adding score
adds no significant overhead
- could score at end, by processing all answer files, instead of as-you-go
- in admin controls: if still_in_count > 15, disable declare_winners
- add alternate options to rps:
- rock, paper, scissors, lizard, spock
- windows, linux, mac
- Linus, Greg, Andrew
- Intel, Arm, RiscV
- add additional (optional) text to rps game
- use answer value as answer code, instead of 'red', 'green', or 'both'
- use a flag to indicate game mode:
- red-green vs. multiple-choice trivia
- coalesce trivia and rps into a single state machine
- use mode to alter behavior of pages
- use question/round, answer/result
- designate first rps round in trivia/rps data file
- use a markup language for the question pages, instead of pure html
- use wiki page to create content, then user a generator to convert
into trivia.py file
- hand editing the trivia.py is a major pain point
- create page converter (trivia.py generator)
- write documentation
- create standalone mode (not controlled by admin)
- use timeout feature
- automatically advance to each question, after a timeout
- need to put phase and state per-user (in a cookie?)
- add timeout for question
- write javascript timer to submit form if user doesn't do it in time
- put timeout value per question in trivia data
== rejected todos ==
- add 'logout' link for users
- prevent someone from taking over another person's session
- all you have to do is know the confirmation number, and then you put it
in a cookie as your user_id, and it causes mayhem
- could validate IP address?
- too much for now
== fix bugs ==
- sometimes, the test server and client browser get stuck
- I have to ctrl-C the server and restart it
- when running single-process python local cgi server
== game outline ==
- game phases (multiplayer):
- registration
- do registration while doing announcements and thank-yous
- red-green game
- rock-paper-scissors (RPS)
- done
- have 2 interfaces:
- player interface
- player interface:
- shows always:
- player alias
- eliminated status (still in or not)
- question page:
- current question
- answer selection form:
- red, green, both radio buttons
or
- rps options
- waiting page:
- player answer/throw (red, green, both indicator)
- answer page:
- player answer/throw (red, green, both indicator)
- indication of correct answer/host throw
- admin interface
- shows page that users see
- also shows:
- game stats
- number voted, number still-in
- question number, round number
- game controls
- reveal answer
- go to next question
- reset voters
- declare winners
- registration page
- form to request info used for winners (and create user_id)
- validate user_id against conference registration numbers
- server keeps track of players still alive in a round
- game is played in 'rounds'
- admin decides when to make next question visible
- admin decides when the number still-in is small enough to "declare_winners"