Rearranged game loop so erase and draw are happening in the same timestep

This commit is contained in:
Rob McMullen 2017-04-26 15:24:54 -07:00
parent 0738436902
commit 6ea88566fd

View File

@ -952,13 +952,6 @@ def game_loop():
num_sprites_drawn = 0
while True:
game_log.debug("Turn %d" % count)
erase_sprites()
check_boxes()
update_background()
draw_enemies()
draw_players()
show_screen()
time.sleep(.02)
read_user_input()
if config_quit:
return
@ -972,6 +965,15 @@ def game_loop():
move_player(i)
check_dots(i)
check_boxes()
erase_sprites()
update_background()
draw_enemies()
draw_players()
show_screen()
time.sleep(.02)
count += 1