pygame-surface

Pygame image transparency confusion [duplicate]

五迷三道 提交于 2021-02-02 09:51:06
问题 This question already has answers here : How can I make an Image with a transparent Backround in Pygame? (2 answers) How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate] (4 answers) pygame image background does not match main background (1 answer) How to make a surface with a transparent background in pygame (3 answers) Closed 3 months ago . I have read the top 20 posts relating to this issue here, read many examples on Google, tried using .convert() , .convert

Pygame image transparency confusion [duplicate]

荒凉一梦 提交于 2021-02-02 09:48:35
问题 This question already has answers here : How can I make an Image with a transparent Backround in Pygame? (2 answers) How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate] (4 answers) pygame image background does not match main background (1 answer) How to make a surface with a transparent background in pygame (3 answers) Closed 3 months ago . I have read the top 20 posts relating to this issue here, read many examples on Google, tried using .convert() , .convert

Pygame image transparency confusion [duplicate]

人盡茶涼 提交于 2021-02-02 09:47:25
问题 This question already has answers here : How can I make an Image with a transparent Backround in Pygame? (2 answers) How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate] (4 answers) pygame image background does not match main background (1 answer) How to make a surface with a transparent background in pygame (3 answers) Closed 3 months ago . I have read the top 20 posts relating to this issue here, read many examples on Google, tried using .convert() , .convert

Why does my game made with Pygame suddenly lag for a few seconds? [duplicate]

杀马特。学长 韩版系。学妹 提交于 2021-02-02 03:44:05
问题 This question already has an answer here : Lag when win.blit() background pygame (1 answer) Closed 4 months ago . I made a little space invaders game with pygame, I noticed that the game lags for a few seconds periodically. I do not know what the problem is. I am a beginner. Can you tell me why this happens? Is there any fix to this? Also, why does everything slow down once you add the background image in the main game loop? import pygame from pygame import mixer import random import math #

Why does my game made with Pygame suddenly lag for a few seconds? [duplicate]

不羁岁月 提交于 2021-02-02 03:43:42
问题 This question already has an answer here : Lag when win.blit() background pygame (1 answer) Closed 4 months ago . I made a little space invaders game with pygame, I noticed that the game lags for a few seconds periodically. I do not know what the problem is. I am a beginner. Can you tell me why this happens? Is there any fix to this? Also, why does everything slow down once you add the background image in the main game loop? import pygame from pygame import mixer import random import math #

Why does my game made with Pygame suddenly lag for a few seconds? [duplicate]

删除回忆录丶 提交于 2021-02-02 03:43:33
问题 This question already has an answer here : Lag when win.blit() background pygame (1 answer) Closed 4 months ago . I made a little space invaders game with pygame, I noticed that the game lags for a few seconds periodically. I do not know what the problem is. I am a beginner. Can you tell me why this happens? Is there any fix to this? Also, why does everything slow down once you add the background image in the main game loop? import pygame from pygame import mixer import random import math #

pygame image background does not match main background

自闭症网瘾萝莉.ら 提交于 2021-01-30 04:48:51
问题 I have an image with a transparent background. When I blit the image on to the background of my game the transparent background appears on the screen (see image below) here is my code: import sys import pygame def runGame(): """ Function for running pygame """ pygame.init() screen = pygame.display.set_mode((1200, 800)) pygame.display.set_caption("Car Simulator") image = pygame.image.load('./car1.bmp').convert() bg_color = (230,230,230) # Start main loop for the game while True: for event in

pygame image background does not match main background

廉价感情. 提交于 2021-01-30 04:48:47
问题 I have an image with a transparent background. When I blit the image on to the background of my game the transparent background appears on the screen (see image below) here is my code: import sys import pygame def runGame(): """ Function for running pygame """ pygame.init() screen = pygame.display.set_mode((1200, 800)) pygame.display.set_caption("Car Simulator") image = pygame.image.load('./car1.bmp').convert() bg_color = (230,230,230) # Start main loop for the game while True: for event in

pygame image background does not match main background

你。 提交于 2021-01-30 04:47:31
问题 I have an image with a transparent background. When I blit the image on to the background of my game the transparent background appears on the screen (see image below) here is my code: import sys import pygame def runGame(): """ Function for running pygame """ pygame.init() screen = pygame.display.set_mode((1200, 800)) pygame.display.set_caption("Car Simulator") image = pygame.image.load('./car1.bmp').convert() bg_color = (230,230,230) # Start main loop for the game while True: for event in

Is there any other way to load a resource like an image, sound, or font into Pygame? [closed]

大城市里の小女人 提交于 2021-01-29 22:30:24
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 months ago . Improve this question I am working on a game in pygame and I published some of my previous games on itch.io. When I am loading image I used to do it like this: player = pygame.image.load(r"C:\Users\user\folder\folder1\player.png") But when I publish the game, other people can't run the game. How