Welcome!

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

SignUp Now!

Recent content by User8574

  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!

    By the way, how do I make it so that the point of the coin that is at, say (200,200) is the centre point of it? And how do I change the size of it?
  3. User8574

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

    Howver, I was trying to fill the background white and make the coin appear on the screen
  4. 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 =...
  5. User8574

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

    I tried doing that and this came up. pygame 2.1.2 (SDL 2.0.18, Python 3.10.9) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "C:\Users\qwegef\PycharmProjects\pygamegames\reference.py", line 78, in <module> ball_animation()...
  6. User8574

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

    import random import pygame, sys def ball_restart(): global ball_speed_x, ball_speed_y ball.center = (screen_width/2, screen_height/2) ball_speed_y *= random.choice((1,-1)) ball_speed_x *= random.choice((1,-1)) def ball_animation(): global ball_speed_x, ball_speed_y...
  7. 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.
  8. User8574

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

    No need to reply, ignore the thread - it was another thing that needed 3 arguments.
  9. 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?
  10. User8574

    Python Pygame text error

    I enter this code but all that appears is a black rectangle. What do I do to make it output the player_score variable in text? font = pygame.font.Font("LEMONMILK-Regular.otf", 30) player_score = 0 player_score_text = font.render(str(player_score), True, pygame.Color("black")...
Back
Top Bottom