I am using the easy-to-use Python library pgzero
for programming games.
How can I center the game window? )It always opens at a random position...
import pgzrun
TITLE = "Hello World"
WIDTH = 800
HEIGHT = 600
pgzrun.go()
Note: I am using the runtime helper lib pgzrun
to make the game executable without an OS shell command... It implicitly imports the pgzero
lib...
Edit: pgzero
uses pygame
internally, perhaps there is a way to center the window using the pygame
API...