What do you want to save?
Add Code snippet
New code examples
-
Other 2022-01-31 05:37:03
how to make a game in pygame for beginners
import pygame pygame.init() screen = pygame.display.set_mode((400, 300)) done = False is_blue = True x = 30 y = 30 while not done: &nbs... Add solution -
Python 2021-11-01 18:54:15
pygame rect follower
import pygame import random import math # --- constants --- (UPPER_CASE_NAMES) SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 FPS = 25 # for more than 220 it has no time to update screen BLACK = (0, 0, 0) WHITE = (255, 255, 255) # --- classes --- (CamelCaseN... Add solution -
Python 2021-10-04 02:33:03
jump logic in pygame
import pygame pygame.init() win = pygame.display.set_mode((500, 500)) pygame.display.set_caption("My First Game") clock = pygame.time.Clock() x = 0 y = 300 width = 40 height = 60 vel = 5 j_vel = 10 ## The Velocity of the jump run = True isJump =... Add solution -
Python 2021-10-01 04:27:02
python pygame tutorial coderslegacy
#Setting up FPS FPS = 60 FramePerSec = pygame.time.Clock() #Creating colors BLUE = (0, 0, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLACK = (0, 0, 0) WHITE = (255, 255, 255) #Other Variables for use in the program SCREEN_... Add solution