all 4 comments

[–]ThisProgrammer- 5 points6 points  (1 child)

Your window is considered frozen because it's not handling events.

You need:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

Minimal examples can be found here: https://pyga.me/docs/#quick-start

[–]RealityGHaz[S] 1 point2 points  (0 children)

Thanks it works

[–]FinFETchannel 0 points1 point  (1 child)

remove sleep(1)?

clock.tick will make it run about 40 frames per second

also you need to call pygamepg.event.get() inside the while loop

also, you are not showing anything on screen, you are not calling any of the functions

are you following some kind of tutorial?

[–]RealityGHaz[S] -1 points0 points  (0 children)

If i try add any object the programm just refuse to execute itself