0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

pygame テンプレート

Last updated at Posted at 2024-01-21

pygameのテンプレート

import pygame

pygame.init()
BG = (50,50,50)
SCREEN_WIDTH = 1200
SCREEN_HEIGHT = 678
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))

# clock
clock = pygame.time.Clock()
FPS = 120

run = True
while run:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False
        # handle_event
    # update
    screen.fill(skyblue_color)
    # draw
    pygame.display.flip()
    clock.tick(FPS)
pygame.quit()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?