Questions tagged [pygame-tick]

39 questions
0
votes
1 answer

pygame - constant frame rate

I would like to achieve a frame rate as constant as possible in my Pygame game. This answer (Setting a fixed FPS in Pygame, Python 3) explains how to give a fluent and frame-rate-independant result, but this is not the same as a constant frame…
Big Bro
  • 797
  • 3
  • 12
0
votes
1 answer

Why do I get a constant 0 fps in pygame

I am not getting any frames even though I have set my clock tick to 60 and it is in the right space. I also know its not my computer because I have run larger games with better frames. Also it cant be the indentation because I have it intended…
Elfed
  • 23
  • 4
0
votes
1 answer

I have created hitboxes for my flappy dragon but the hitboxes are either not colliding or doesn't produce an output. How do i fix that?

I'm trying to make a flappybird game for my Python programming class and I used cues like drag.hit() that causes them to print("hit") everytime the hitboxes supposedly collides. However, the collision of dragon and stumpy hitbox are not working and…
iZLaPrix
  • 25
  • 1
  • 4
0
votes
2 answers

how do you display time in the format 00:00? Currently, it displays the time in a decimal format

the timer works but i am having trouble displaying it in the format 00:00 - Currently, it displays the time in a decimal format for exapmle: 2.547959356:688.9846939 while True: # main game loop mouseClicked = False …
Nneoma
  • 11
  • 3
0
votes
1 answer

Trying to control the speed of my loop for Pong

I'm trying to get my pong game to run the loop at a certain fps, but I've tried a couple things and it hasn't worked and I wasn't taught how to use pygame speed/clock so I gotta figure it out on my own I'm trying to make the loop run at a certain…
IJH
  • 107
  • 1
  • 7
0
votes
0 answers

pygame freezes in limited for loop

pygame freezes in this loop at around cycle 150. The loop continues, but pygame stops updating here's my code: import pygame from cv2 import imread # the only one needed! (to get image size) could of used pygame though... image =…
thomask
  • 1
  • 1
0
votes
1 answer

How to move Sprite image with cursor movement in pygame?

Now below what i did is simply created a sprite as shown.. futher to do something interesting,thought of threading i added a thread which will check the cursor position, hence update global x & y resulting in change of sprite position that is…
0
votes
1 answer

inconsistent motion with pygame

I am having a problem where i am trying to get a circle to go to the same spot every time i execute the program. But each time I run the code, the dot doesn't always line up. I have a test circle in the same place to compare run to run. The Red…
Ben Kiang
  • 23
  • 7
0
votes
1 answer

Cannot make my pause function work in Pygame 3.4

I am making a Pong game but no matter what I try I just cannot implement a pause system that stops when CTRL + C is pressed. I tried: elif event.key == K_SPACE: try: hello = pygame.time.delay(1000) except KeyboardInterrupt: …
Will
  • 67
  • 7
1 2
3