Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game screen is not shown #6

Closed
KevinPedroza opened this issue Mar 15, 2020 · 3 comments
Closed

Game screen is not shown #6

KevinPedroza opened this issue Mar 15, 2020 · 3 comments

Comments

@KevinPedroza
Copy link

When I run the game, it displays the window but the game does not show up the graphics. Just stay black.

I am on Mac

@maurock
Copy link
Owner

maurock commented Mar 16, 2020

I set the display=True and the correct speed by default.

From a different issue, a user suggested:

This seems to be a OSX specific problem. To fix this problem, in update_screen(), add this line.

def update_screen():
pygame.display.update()
pygame.event.get() # <--- Add this line:

Please let me know if this helps

@bar-2
Copy link

bar-2 commented Apr 2, 2020

I tried adding the additional line into the update_screen() method, but I'm getting still the same error.
I'm also on a Mac.

Python Version 3.7.4
MacOS Version: Mojave 10.14.6

The other stuff seems to work, I can see output on the console, after setting up the parameters for training.

@cheng10
Copy link

cheng10 commented Apr 4, 2020

@KevinPedroza @maurock @bar-2
on macOS Mojave 10.14.6 (18G87), I got this issue fixed by simply(no need to add pygame.event.get() line):
pip install pygame==2.0.0.dev4

It turns out that the default version installed by pip which is pygame 1.9.6 has some compatible issue with macOS mojave.
check this thread here: pygame/pygame#555

@maurock maurock closed this as completed Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants