title: Pyton - Pygame - stuck refreshing blitting image on screen
body: <p>Hi there and thank you for your time reading this.</p>
  <p>This is related to the project I'm making. It's a reaction test game. Basically, Arcade buttons with LEDs light up, and players need to press them to score points. Whack-a-Mole style.</p>
  <p>The game is timed, 30 seconds. But instead of using a numerical timer, I'm using a progress bar moving across the screen to indicate the remaining time instead.
  image below:
  <a href="https://i.stack.imgur.com/yktLL.jpg" rel="nofollow noreferrer">game screenshot</a></p>
  <p>I added this as an image blit in the code, but it doesn't refresh correctly. You can see it only at the start of the game, and when players press a button.</p>
  <p>It needs to be constantly blitting across the screen.</p>
  <p>Maybe I'm just missing something or my indentation is wrong?
  Would really appreciate any inputs on this.</p>
  <p>Main game loop code is below:</p>
  <pre><code># MAIN GAME SEQUENCE CODE ---------------------------------------------------------------------------------------------
  # Setup Pygame refresh rate to 120 fps
  clock.tick(60)
  while game_running:
  # Idle Screen
      idle_scrn()
  
  # Instructions
      inst_seq()
  
  # GAME PLAY SECTION --------
      score = 0
      time_Out = 0
      leds.off()
      start_Time = pygame.time.Clock()
      start = int(time.time())
      time_move = -500
      random_num = random.randint(0, 11)
      leds.on(random_num)
      print(random_num)
      while time_Out != 30:
          screen.blit(Timebar, (time_move,1000))
          time_move += 50
          pygame.display.update()
          for event in pygame.event.get():
              print(&quot;For Event started, Game screen started&quot;)
              screen.fill((255,255,255))
              screen.blit(Game_screen[6], (0,0))
              score_textback = score_fontback.render(&quot;00&quot;, 3, (199,199,199))
              score_text = score_font.render(str(score), 3, (255,37,24))
              ctr = 1110
              if score &gt;= 10:
                  ctr -= 155
              center_pos = (ctr, 580)
              score_rect = score_text.get_rect(center = center_pos)
              screen.blit(score_textback, (645, 390))
              screen.blit(score_text, score_rect)
              if event.type == pygame.JOYBUTTONDOWN:
                  print(&quot;If for event JOYBUTTONDOWN&quot;)
                  if event.button == random_num:
                      B = event.button
                      print(B, &quot; button pressed, CORRECT&quot;)
                      leds.off()
                      butt_Sound.play()
                      random_num = random.randint(0, 11)
                      leds.on(random_num)
                      score += 1
                      pygame.display.update()
          current_Time = int(time.time())
          time_Out = current_Time - start
          #pygame.display.update()
          #print(&quot;TIMER: &quot;, time_Out)
          #print(type(start_Time))
          #print(current_Time)
          #print(type(current_Time))
      #pygame.display.update()
      # FINAL SCORE ------------------------
      final_Score()
  exit()
  </code></pre>
  <p>The image is Timebar. in the code, we move it 50 pixels across the screen in every refresh.</p>
  <p>Thank you in advance.</p>