Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

pygame

  1. User8574

    Python How do I remove the background of an image (Pygame)

    I tried using Gimp to make an alpha channel, I tried using convert_alpha(); how do I remove the background of an image on pygame?
  2. User8574

    Python Pygame: screen.fill and screen.blit not working, please help!

    # Modules import pygame, sys # Init / Clock pygame.init() clock = pygame.time.Clock() # Display Setup screen_width = 1920 screen_height = 1080 screen = pygame.display.set_mode((screen_width,screen_height)) pygame.display.set_caption("Coin Collector") # Objects coin =...
  3. User8574

    Python I make a global variable and then it says it isn't defined, wtf? (Python / Pygame)

    def ball_animation(): global player_score player_score = 0 player_score_surf = font.render(str(player_score), False, (10,10,10)) Apparently player score is not defined. Please help! I tried taking it out of the function above it and it still doesn't work.
  4. User8574

    Python 'Function needs at least three arguments' Pygame screen.blit error

    screen.blit(player_score_surf, (200,200)) I get an error that screen.blit requires three arguments. I tried adding centre as the third as the point of which is at 200,200, but that still doesn't work. How do I fix it?
  5. Wolfmann Games

    Python How to continue sound in Pygame?

    I have a sound that I wish to play. My code; [...] if var_camera_flip == 1: if var_camera != 4: pygame.mixer.Channel(2).play(pygame.mixer.Sound(r'audio\camera\camera motor.mp3'), -1) else: pygame.mixer.Channel(2).stop()...
Back
Top Bottom