0

I'm trying to make a timing based thing in a game (I have under a week of pygame experience), and I was wondering how to delay something a certain number of ticks, for example end lag in things like fighting games.

I would use pygame.time.delay(), but I want it to be based on ticks, not IRL time.

  • Simplistically, you can create a frame counter that you increment with each frame. When your event occurs you set the event time to the current count and then when the event recurs you check that a minimum number of *ticks* have passed before handling the event. – import random Dec 20 '22 at 05:04

0 Answers0