width = 320 height = 240 size = [width, height] pygame.init() screen = pygame.display.set_mode(size) background = pygame.Surface(screen.get_size()) # always start with no assets clean_dir() ####################################### # 3 different modes for getting assets ####################################### s = Socket_Handler('localhost', 30000, 'client') s.create() # 0 - Download each asset individually # 1 - Download a zip file and extract assets # 2 - Download an asset list and download each asset as needed download_method = 0 # Method 1: Download each asset individually if download_method == 0: ball_img = 'ball.png' paddle_img = 'paddle.png' download_file(s, ball_img)
from socket_handler import Socket_Handler s = Socket_Handler("localhost", 30000, "server") s.create() s.listen()