pygame frame rate

How To Set Background Color In Pygame

import pygame,sys from pygame.locals import* pygame.init() screen=pygame.display.set_mode((600,400)) game_running=True while game_running: for event in pygame.event.get(): if event.type==QUIT: pygame.quit() sys.exit() screen.fill((255,250,240)) pygame.display.update() Copy Lets write the step by step full code and explanation First import necessary library And then initiate the pygame Set the our game display resolution Set the game in a loop so it will […]