pygame (2) 썸네일형 리스트형 PYTHON -Pygame 똥피하기 게임을 손쉽게 만들어 보았습니다 코드 포함 import pygame import random ################################################################ # 기본 초기화 (반드시 해야함) pygame.init() # 화면 크기 설정 screen_width = 480 # 가로 크기 screen_height = 640 # 세로 크기 screen = pygame.display.set_mode((screen_width, screen_height)) # 화면 타이틀 설정 pygame.display.set_caption("Avoiding poop Game") # FPS clock = pygame.time.Clock() ###############################################.. VScode PyGame 설치 방법, 틀 형성 코드 및 Linting 설정 pip3 install pygame 파일 -> 기본설정 -> 설정 -> 검색창에 linting 검색 -> Python > Linting : Enabled 체크 해제 이렇게 해야 파이게임이 문제 없이 실행 됩니다. 간단한 코드로 pygame 화면을 생성해 봅시다. import pygame pygame.init() # 초기화 반드시 필요 # 화면 크기 설정 screen_width = 480 # 가로크기 screen_height = 640 # 세로크기 screen = pygame.display.set_mode((screen_width, screen_height)) # 화면 타이틀 설정 pygame.display.set_caption("Joonho Game") # 이벤트 루프 running = True # 게임.. 이전 1 다음