If we want to put the window in the centre of the screen we can use this:
Most of the pygame windows is made by :
import os os.environ['SDL_VIDEO_CENTERED'] = '1'
This will create this window:
def main(): background_colour = (25,25,255) screen = pygame.display.set_mode((320,240)) screen.fill(background_colour)
Now if you don't need a title window , like the next image...
... then you need to use this source code :
screen = pygame.display.set_mode((320,240),NOFRAME)