Beispiel #1
0
        pos_y = map_height


try:

    # init window
    pygame.init()
    font = pygame.font.SysFont("consolas", 10)
    clock = pygame.time.Clock()
    window = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
    window.fill((255, 255, 255))
    window.blit(font.render("Loading...", 1, (0, 0, 0)), (WINDOW_WIDTH / 2 - 10, WINDOW_HEIGHT / 2))
    rank = Rank(window, WINDOW_WIDTH - 150, 0)
    # Menu rendering
    menu = Menu(window, WINDOW_WIDTH, WINDOW_HEIGHT)
    nick_name, element, ip, port = menu.display()
    port = int(port)
    # connect and get fits data
    conn = client.Client(ip, port)
    # data taking from start screen later
    map_width, map_height, player_id, pos_x, pos_y = conn.connect(nick_name, element)
    player_id = str(player_id)
    real_r = 0
    SCALE = WINDOW_HEIGHT / map_height
    end_game = EndGame(window, WINDOW_WIDTH, WINDOW_HEIGHT)
    play_flag = True

    while True:

        clock.tick(FPS)