Hi, im trying to add a slapsh screen before my game. It will display a png and the use can either press "e" to continue or "q" to quit. when i run this in my game is says that pygame.display.update() is the problem. Please help thanks.

def game_intro():

intro = True
while intro :
for event in pygame.event.get():
    if even.type == pygame.Quit:
        pygame.quit()
        quit()
    if event.type == pygame.KEYDOWN:
        if event.key == pygame.K_e:
            intro = False
        if event.key == pygame.K_q:
            pygame.quit()
            quit()

intro_background = pygame.image.load("rock floor.png") #Load the image file
intro_background = pygame.transform.scale(intro_background,(display_width,display_height)) #Make it the same size as the screen

gameDisplay.blit(intro_background(0,0))

pygame.display.update()
clock.tick(15)

Recommended Answers

All 2 Replies

I can't find how many times you've posted this. All of them suffer from formatting issues with your post as the code is both in and outside of the code block.

Anyhow, I will have some time next weekend to try this out. Can you share how to set this up for a look see on a plain jane W10 machine?
Or is there an online "fiddle" that we can use?

its ok i just fixed it , but thanks anyway.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.