Category : pygame

I am trying to draw a line in pygame that has a rounded cap unlike the image below. Is there a way I can do this. Ideally I would want a smooth line with no breaks and a rounded edge as opposed to the flat edge it currently has. My current code for drawing a ..

Read more

I want to make breakout with pygame. But I dont know how to make multiple blocks. I have already a block with collision and lifes. But when I try to create multiple blocks the game is a single bug. The collision does not work properly, the lives are not properly deducted, the points are not ..

Read more

I am facing three problems right now and i want to get there answer seprately, First question had already been asked you can also answer that first…. import pygame, sys from random import randint pygame.init() screen_size = (350,674) screen = pygame.display.set_mode(screen_size) pygame.display.set_caption("First Game") x_poss = randint(0,350) y_poss = randint(0,675) width = 20 height = 20 ..

Read more

I am making a platform game, so platforms are obviously important, but I have arrived at a problem. I am trying to make my character jump on my platform. I have managed to make it jump onto the platform and move left and right and fall off but once I am on the platform I ..

Read more

I was messing around with pygame and tried to make a line spin around its starting point, the problem is that for some reason I have to use negative degrees to make them work in an expected way, otherwise it seems like there’s a "delay". Here’s the code: import pygame import time import math import ..

Read more