]> Skullheadx's Git Forge - Pygame-Jam.git/commitdiff
quadrupled FPS
authorSkullheadx <704277@pdsb.net>
Tue, 12 Jul 2022 01:03:55 +0000 (21:03 -0400)
committerSkullheadx <704277@pdsb.net>
Tue, 12 Jul 2022 01:03:55 +0000 (21:03 -0400)
credit to Starbuck!

Game.py

diff --git a/Game.py b/Game.py
index a5ff4f358116ee0d30acaa73ec7deacd961622ef..46878c8c42c719d00406a4a5127d5ada8017806a 100644 (file)
--- a/Game.py
+++ b/Game.py
@@ -27,6 +27,9 @@ class Game:
 
         # self.load_world(level)
 
+        self.sky = pg.image.load("Assets/world/VOID.png").convert()
+
+
         self.world = World(self.collision_layer)
 
         enemy_positions, player_position, self.portal_position = self.world.load_world(level)
@@ -80,8 +83,7 @@ class Game:
 
         # screen.fill((0, 191, 255))
         # screen.fill((255,255,255))
-        sky = pg.image.load("Assets/world/VOID.png")
-        surf.blit(sky,(0,0))
+        surf.blit(self.sky,(0,0))
 
         if (self.level == 1):
             self.dialogue.draw(surf, self.enemies[0], "enemy dialogue")