Pygame setup and fps label

This commit is contained in:
2026-05-11 23:36:37 +02:00
parent 9ba19fa40b
commit cc0a92060b
7 changed files with 120 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import pygame as pg
import pygame_gui
from constants import Config
from game.game import Game
def main():
running = True
pg.init()
# pygame.mixer.init()
pg.display.set_caption('Portal')
screen = pg.display.set_mode(Config.WINDOW_SIZE)
manager = pygame_gui.UIManager(Config.WINDOW_SIZE, theme_path="data/theme/theme.json")
clock = pg.time.Clock()
# implement game
game = Game(screen, clock, manager)
while running:
running = game.run()
pg.quit()
if __name__ == "__main__":
main()