0
How do you Install Pygame on Pydriod 3?
Pygame Game
13 Respostas
+ 5
Thank you guys!
+ 1
Open app
Tap the menu in top left corner
Tap the "pip" option
Search for pygame and install
+ 1
Then pls how do you import it?
+ 1
Is it with this line of code ? :
import pygame_sdl2
pygame_sdl2.import as pygame
?
Pls help me..
+ 1
This should be one of your first lines:
import pygame
+ 1
Pls did it work for either of you? Pls give me an instance to check if it worked coz i created a width and height then added a caption i expected it was going to show at the top of my screen but it didn't pls what can i do to check if it worked?
+ 1
Pls give me an instance to check if it works.. Thank you.
+ 1
# opens a blank window
import pygame
pygame.init()
surface_sz = 480
main_surface = pygame.display.set_mode((surface_sz, surface_sz))
while True:
ev = pygame.event.poll()
if ev.type == pygame.QUIT:
break
+ 1
Pls guys python still displayed an error saying i should rather use 'pygame sdl2 rather than pygame'
for instance:
pygame_sdl2.display.set_mode((5, 5))
I'm confused what can i do?
+ 1
The warning came from the Graphical program output..
+ 1
And when i run that code as a script in pydriod 3 it just show me Grasshopper app from play store with this i'm i assured that the pygame installion was successful?
+ 1
On Pydroid pygame should be preinstalled, just import it to your program as pygame_sdl2 and you should be able to use it.
+ 1
Go on www.python.org