Skip to content

Few issues with python2 on linux #2

Description

@ivand58

Hi Christian
there are few issues on python27/ linux:

  • missing HS_FILE (Fix: an empty file must be created at the very first start of the game)
  • "SyntaxError: only named arguments may follow *expression"
  • "Fatal Python error: PyEval_SaveThread: NULL tstate"
    the following patch fixes last two issues:
    diff --git a/game.py b/game.py
            index 7ba1802..226d749 100644
                    --- a/game.py
                    +++ b/game.py
                    @@ -10,7 +10,7 @@ class Game:
                             # Initialize game window
                             pygame.mixer.pre_init(44100, -16, 2, 2048) # Prevents delay in jumping sound
                             pygame.init()
                    -        pygame.mixer.init()
                    +        pygame.mixer.init(frequency=44100)^M
                             self.monitor_size = [pygame.display.Info().current_w,pygame.display.Info().current_h]
                             environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (self.monitor_size[0] / 2 - SCREEN_WIDTH/2, self.monitor_size[1] / 2 - SCREEN_HEIGHT/2)
                             self.screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
                    @@ -56,7 +56,7 @@ class Game:
                             self.all_Sprites.add(self.player)
                     
                             for plat in platform_list:
                    -            p = Platform(self,*plat, self.platforms, self.all_Sprites) # * explodes the list
                    +            p = Platform(self,plat[0], plat[1], self.platforms, self.all_Sprites) # * explodes the list^M
                                 self.last_spawn = p
                     
                             pygame.mixer.music.load(path.join(self.sound_dir, "theme.ogg"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions