About 7,640,000 results
Open links in new tab
  1. python - How to get keyboard input in pygame? - Stack Overflow

    pygame.key.get_pressed() returns a list with the state of each key. If a key is held down, the state for the key is 1, otherwise 0. It is a snapshot of the keys at that very moment The new state of …

  2. How to import pygame in visual studio code? - Stack Overflow

    Jan 26, 2019 · To elaborate on @Mehrdad's suggestion: There's a section on installing matplotlib in the Install and use packages section of the Visual Studio Code Get Started Tutorial. …

  3. python - How to display text in pygame? - Stack Overflow

    Dec 30, 2013 · There's also the pygame.freetype module which is more modern, works with more fonts and offers additional functionality. Create a font object with pygame.freetype.SysFont() or …

  4. pygame.error: video system not initialized - Stack Overflow

    pygame.init() This will attempt to initialize all the pygame modules for you. Not all pygame modules need to be initialized, but this will automatically initialize the ones that do. You can …

  5. python - Pygame Display Position - Stack Overflow

    There is a pygame.display.get_wm_info() call that gets you the Window handler -- from then on, it is using either X11 or Windows API32 to get information from the window through this handler.

  6. How do I get the size (width x height) of my pygame window

    8 You can get the windows size by first getting the display surface. pygame.display.get_surface (), then calling get_width () / get_height () on the surface.

  7. How do I maximize the display screen in PyGame? - Stack Overflow

    Jul 21, 2015 · To make the window resizeable, add the pygame.RESIZABLE parameter when seting the mode. You can set the mode of the screen surface multiple times but you might …

  8. ImportError: No module named 'pygame' - Stack Overflow

    Aug 19, 2013 · For this you have to install pygame package from the cmd (on Windows) or from terminal (on mac). Just type pip install pygame .If it doesn't work for you, then try using this …

  9. python - How to Center Text in Pygame - Stack Overflow

    text_rect = text.get_rect(center = pygame.display.get_surface().get_rect().center) A Surface can be drawn on another Surface using the blit method. The second argument is either a tuple (x, …

  10. i can't import pygame in visual studio code - Stack Overflow

    Dec 7, 2019 · I installed Pygame Snippets in my Visual Studio Code and then i wrote import pygame, i always got an error