PyGame Basics: Game Window

by | Oct 1, 2019 | PyGame Basics | 0 comments

In this guide, we will be creating the PyGame game window. If you don’t have a PyGame project setup yet, you can learn how to set one up here. In your main game file, you can add the following two lines to create our game window:

display = pygame.display.set_mode((800, 600))
pygame.display.set_caption('My Window Title')

When you run the game, you should see a window appear for a couple seconds, then disappear. Take a look at this part of the series, where we add the game loop. After adding the game loop, your game window will no longer disappear.

Now you know how to create a PyGame game window! If you found this guide helpful, you may consider checking out the rest of this series. To receive news regarding our future tutorials and courses, you can subscribe to our newsletter.

Sharing this guide on your favorite social media platform would be much appreciated, if you found this tutorial valuable.

Looking for custom WordPress solutions

for your business?


Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news regarding tutorials and courses we publish!

Please check your inbox to confirm your subscription.

Share This