Pygame Window not Responding after few seconds

The below code makes the window not respond when started.. I wanted to make hangman game and I got the logic done and I was just trying to make the window pop up and its not responding. Also when I run the program, when I type in the letter and type another one then it erases the previous letter a writes the new letter with the underscores. How can I make it so that it keeps the previous letter and prints it with the new letter?

How to create bullets in pygame?

I know there have been several topics on this but I still can’t figure out how to make my ship shoot bullets.. I want to add to my MOUSEBUTTONDOWN bullets shooting from the ship as the sound effect plays. thanks for the help! import sys, pygame, pygame.mixer from pygame.locals import * pygame.init() size = width, … Read more

How to make a string’s content appears on screen as we type on keyboard?

I have this function, where player can type his name, but I want each letter to appear on the screen as he types them. Here is my function : def input_player_name(): player_name_screen = True name = "" win.blit(player_name_bg, (0, 0)) while player_name_screen: for event in pygame.event.get(): if event.type == pygame.KEYDOWN: if event.key == pygame.K_RETURN: print(name) … Read more