diff --git a/constants.py b/constants.py index fe7c879..15d255a 100644 --- a/constants.py +++ b/constants.py @@ -1,8 +1,16 @@ from pygame import Color +import platform +from win32api import EnumDisplayDevices, EnumDisplaySettings # pygame stuff WIDTH, HEIGHT = 1280, 720 -FRAMERATE = 75 # todo change this to windows default or 60 default when game released +FRAMERATE = 60 # change this to your monitor refresh rate if using windows, dont have a linux or mac to test it on +if platform.system() == "Windows": # windows + FRAMERATE = EnumDisplaySettings(EnumDisplayDevices().DeviceName, -1).DisplayFrequency +if platform.system() == "Linux": # linux + pass +if platform.system() == "Darwin": # mac + pass # game colors BG_COLOR = Color(255, 255, 255) # white diff --git a/main.py b/main.py index 42ebe7f..210dbc0 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,6 @@ screen = pygame.display.set_mode([WIDTH, HEIGHT]) pygame.display.set_caption("Conveyor Belt Attack") -# todo: make an icon for the game font = pygame.font.Font(get_path("assets", "font.ttf"), 36) bigger_font = pygame.font.Font(get_path("assets", "font.ttf"), 48) timer_font = pygame.font.Font(get_path("assets", "timer.ttf"), 48)