blit

How to save an image after changing its resolution in Pygame?

How to save an image after changing its resolution in Pygame? Question: Currently, I am a beginner when it comes to Pygame, and have been trying to allow the user to hand-draw digits into a canvas. I have managed to get the code to draw and clear the canvas to work. However, the pictures I …

Total answers: 1

Image not printing to screen using 'Blit' Pygame

Image not printing to screen using 'Blit' Pygame Question: I am trying to make an Undertale like game in python – However I have a problem. When I try to ‘blit’ an image to the screen it doesn’t show. I am ‘blitting’ a heart and I have rescaled it to an appropriate size in a …

Total answers: 2

how can we get rid of the blur in pygame image?

how can we get rid of the blur in pygame image? Question: import pygame as pygame , sys pygame.init() size = (700,500) window_game = pygame.display.set_mode(size) print(pygame.mouse.get_cursor()) _run_ = True class mySprite(pygame.sprite.Sprite): def __init__ (self,width,height,cord_x,cord_y,color): super().__init__() self.image = pygame.Surface([width,height]) self.image.fill(color) self.rect = self.image.get_rect() self.rect.center = [cord_x,cord_y] #my background image bgimg = pygame.image.load("download.jpg") bgimg = pygame.transform.smoothscale(bgimg, size) …

Total answers: 1

What type of animation file should I add to a pygame game?

What type of animation file should I add to a pygame game? Question: I want to make complex animation for my game but I don’t know how to. I first thought that you have to add an animation file to the game and blit it. For example my game, every time you shoot and it …

Total answers: 1

A bit confused with blitting (Pygame)

A bit confused with blitting (Pygame) Question: I’ve just started learning some pygame (quite new to programming overall), and I have some very basic questions about how it works. I haven’t found a place yet that explains when I need to blit or not to include a certain surface on the screen. For example, when …

Total answers: 3