3

I have tried everything I can think of to get this background to work, this is the closest I have gotten as it breaks no other bits of my code. I am unsure why get_size() doesn't work.

gameDisplay = pygame.display.set_mode = ((display_width, display_height))
myFont = pygame.font.SysFont("monospace", 15)
pygame.display.set_caption("Catastrophee")
background = pygame.Surface(gameDisplay.get_size())
background = background.convert()

This is only a snippet of the code. I have all variables properly defined.

Please help, thanks, Cam.

3 Answers 3

3
gameDisplay = pygame.display.set_mode((display_width, display_height))

Just delete second = from that line

Sign up to request clarification or add additional context in comments.

Comments

2

Maybe this helps?

gameDisplay = pygame.display.set_mode((display_width, display_height)) #removed =
myFont = pygame.font.SysFont("monospace", 15)
pygame.display.set_caption("Catastrophee")
background = pygame.Surface(gameDisplay.get_size())
background = background.convert()

Comments

1

You should :

gameDisplay=pygame.display.set_mode([screen_width,screen_height])

Not

gameDisplay = pygame.display.set_mode = ((display_width, display_height)) 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.