From e34d53fdd4963e540b13fdabf5c7066f6d2f14f3 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 12 May 2015 15:01:08 +0100 Subject: [PATCH] updated FPS. Global variables are really messing up here... --- game.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/game.py b/game.py index 7594a2b..d2c9d7d 100644 --- a/game.py +++ b/game.py @@ -10,7 +10,6 @@ from target import Target PLAYING_GAME = False WINDOW_SIZE = (640,480) -FPS = 120 def update_score(window, score): @@ -29,7 +28,6 @@ def initialise(menu, options): pygame.mixer.pre_init(44100, -16, 2, 2048) pygame.init() init_sounds() - options["Difficulty"] = FPS window = pygame.display.set_mode(WINDOW_SIZE) exit_code = play(window, options) # Run main game loop @@ -92,6 +90,7 @@ def play(window, options): bullet_group = pygame.sprite.Group() clock = pygame.time.Clock() + FPS = player.options["Difficulty"] timeouts = { "Target Movement":[FPS*0.5,FPS*0.5],