[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] placement of graphics code



Thanks SB for your example, it helped a little. To help me organize my
thoughts I came up with this sample timeline. The steps in between
born and alive would be where the object is fading in or moving into
the screen. Going from dying to dead is where they are fading out or
moving out of the screen. There is some overlap... when you press a
key to make your guess, the prompt message begins to fade out while
the user's answer simultaneously appears and begins to move. I'm still
a little fuzzy on how I'm going to keep track of it.

[fixed-width font]

P = prompt message
A = user's answer
H = too high message
W = winning message

   P          A            H           W           num of currently
   -------    --------     --------    --------    drawn objects
   
 0        ( begin game )                            0
 1 P born                                           1
 2    |                                             1
 3    |                                             1
 4 P alive                                          1
 5    |   ( wait for input )                        1
 6    |   ( user guesses too high )                 1
 7 P dying    A born                                2
 8    |       A alive      H born                   3
 9 P dead     A dying      H dying                  2
10               |            |                     2
11 P born        |            |                     3
12    |          |            |                     3
13    |       A dead       H dead                   3
14 P alive                                          1
15    |   ( wait for input )                        1
16    |                                             1
17    |                                             1
18    |                                             1
19    |                                             1
20    |   ( user guesses correct )                  1
21 P dying    A born                                2
22    |       A winning                W born       3
23 P dead         |                       |         3
24                |                       |         2
25                |                       |         2
26            A alive                  W alive      2
27            A dying                  W dying      2
28                |                       |         2
29                |                       |         2
30                |                       |         2
31            A dead                   W dead       2
32        ( game over )                             0