Ejemplo n.º 1
0
def main(width: float, height: float) -> None:
    pygame.display.set_caption("River Hell")

    screen = pygame.display.set_mode((width, height))

    game = Game(screen, width, height)

    # Puts a big ass river in the middle of the screen

    for x in range(int(width * 0.15), int(width * 0.85), 25):
        for y in range(0, height, 25):
            game.register_object(River(x, y))

    player = Player(50, 50)

    game.register_object(player)

    while True:
        game.tick()
        game.clear()

        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()

        game.update()
        pygame.display.update()
Ejemplo n.º 2
0
def main():
    print('welcome to deween game development')
    print('Game version 0.1.0')
    print('Capglass Studio 2019')

    # create the game
    game = Game(TITLE, WIDTH, HEIGHT, False)
    # init the game
    game.start()
    # game loop
    while (game.is_running is True):
        game.handle_events()
        game.update()
        game.render()
        game.clear()
    game.quit()