gaudiatech / pyved-engine

cool game engine written in Python<3, built around pygame. Can be used in various projects!
https://kata.games
GNU Lesser General Public License v3.0
61 stars 6 forks source link

compat problem with pygame.time.get_tick(...) #2

Closed wkta closed 6 months ago

wkta commented 2 years ago

typical crash:

my_katagame.run_game()
  File http://127.0.0.1:8000/main.py line 112, in run_game
    manager = SceneManager(TitleScene(P_Prefs))
  File http://127.0.0.1:8000/data/scripts/scenes.py line 47, in __init__
    self.bob_timer = pygame.time.get_ticks()
TypeError: get_ticks() missing 1 positional argument: t
wkta commented 6 months ago

the bug no longer exists in versions >23.9a5: (the snippet below is extracted from a gamedef.py file) Because of how the update function is tied to the game engine…

@pyv.declare_update
def update_game(infotime=None):
    ...

... We no longer need to call get_ticks() to retrieve information about time. I consider the bug fixed