0

I tried to update to version 2.0.0dev008, as instructed by this thread: Python Launcher not responding with Pygame

I went into interpreter settings, downloaded and installed the latest version of pygame and this is what appears still -

pygame 1.9.6
Hello from the pygame community.https://www.pygame.org/contribute.html
<Event(1-ActiveEvent {'gain': 0, 'state': 1})>

and then the rocket just bounces on the dock until I force quit with no window opened for the game.

Here is the tutorial game code I was using:

import pygame
pygame.init()
gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption('A bit Racey')
clock = pygame.time.Clock()
crashed = False
while not crashed:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            crashed = True
        print(event)
    pygame.display.update()
    clock.tick(60)
pygame.quit()
quit()

1 Answers1

0

One thing you could try is reduce the clock tick speed to 30:

clock.tick(30)

But if it is the version of pygame that is not right then try:

pip uninstall pygame

then

pip install pygame==2.0.0.dev6

Thats what I could suggest based on what you have shown.

Ethan
  • 5
  • 4
  • Ethan, I tried both of your suggestions with still no luck. After installing pygame 2.0.0.dev6, it still says "pygame 1.9.6" when I run the code. When I go to preferences I am using Python 3.6 as my interpreter and the pygame version 2.0.0.dev6 is listed and then it says latest version in the other column is 1.9.6. I have also tried restarting pycharm after making these changes. – HappyLotus Aug 04 '20 at 04:01
  • Okay I tried to download the latest version of pygame myself and I got the latest version on my system. 1. Delete pygame from your python module folder, it is at this directory (' C:\Program Files (x86)\Python37-32\Lib\site-packages '), in that file directory find pygame and any other version of it and delete it. 2. Then I first installed pygame by doing ( pip install pygame ). 3. Then I did ( pip install pygame==2.0.0.dev6 ) and then it worked for me. Give that a try. – Ethan Aug 04 '20 at 11:38
  • Also make sure that CMD/terminal is in administrator mode. – Ethan Aug 04 '20 at 11:47