title: Python/Pygame How to make my Score Text update itself forever?
body: <p>I am currently creating a game in which (for now) the score gains 1 point every second.</p>
  
  <p>However, with my current code (which I believe DOES change the variable every second) whenever I run the program, the text doesn't change. It just stays at 0.</p>
  
  <p>Here is my code: (I've provided text in this question to explain my code, like comments.)</p>
  
  <p>SECTION 1: Importing PyGame and other standard procedure code.</p>
  
  <pre><code>import sys, pygame
  from pygame.locals import *
  pygame.init()
  size = width, height = 800,500
  screen = pygame.display.set_mode(size)
  </code></pre>
  
  <p>SECTION 2: Setting the window caption and a color variable.</p>
  
  <pre><code>pygame.display.set_caption("One Score (Created by - Not Really Working Lamp Productions:)")
  WHITE = (255,255,255)
  </code></pre>
  
  <p>SECTION 3: Declaring the variable "score". I've given it a separate code sample, because it's heavily involved with the problem.</p>
  
  <pre><code>score = 0
  </code></pre>
  
  <p>SECTION 4: Filling the screen and declaring the default font variable.</p>
  
  <pre><code>screen.fill (WHITE)
  myfont = pygame.font.SysFont("monospace", 16)
  </code></pre>
  
  <p>SECTION 5: Disclaimer Text (Or is it claimer text, I'm not quite sure.)</p>
  
  <pre><code>disclaimertext = myfont.render("Copyright, 2013, Not Really Working Lamp Productions.", 1, (0,0,0))
  screen.blit(disclaimertext, (5, 480))
  </code></pre>
  
  <p>SECTION 6: Adding the score text (POSSIBLY THE MOST CRUCIAL PART.)</p>
  
  <pre><code>scoretext = myfont.render("Score = "+str(score), 1, (0,0,0))
  screen.blit(scoretext, (5, 10))
  </code></pre>
  
  <p>SECTION 7: The while loop (POSSIBLY THE MOST CRUCIAL PART.)</p>
  
  <pre><code>while 1:         
      for event in pygame.event.get():
          pygame.display.flip()
          if event.type == pygame.QUIT:sys.exit()
          pygame.time.wait(100)
          score = score + 1
  </code></pre>
  
  <p>So where in my code do I put what? (I need the screen to constantly update the score as it changes every second from the "while 1:" loop.)</p>
  
  <p>Thank you.</p>