Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

```py

pygame-ce 2.5.0 (SDL 2.30.3, Python 3.12.3)

Traceback (most recent call last):

  File "/home/axis/Downloads/Galactic-Cruiser/main.py", line 3, in <module>

    from win32api import GetSystemMetrics

ModuleNotFoundError: No module named 'win32api'

```

Nooo, you should have used this to get the screen size to support linux as well :(

https://pyga.me/docs/ref/display.html#pygame.display.get_desktop_sizes


I used this and was able to play it


Cool game! But it was a bit too easy lol, i didnt even have to move my spaceship.

(+1)

ah thank you for the tip. I'm a bit new to pygame so sorry for that. And thank you for playing it. 

I also realised that you could just not move the space ship but i was super close to the deadline haha

(1 edit)

You could maybe ask the event forgerts (durk for example) if you can quickly change the code to support this and not need win32api

But nice game overall! 


Here's what I modified

```py

import pygame, sys, json, os, time, random                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

os.environ['SDL_VIDEO_CENTERED'] = '1'                                                                                                                                

pygame.mixer.pre_init(44100,-16, 2, 512)                                                                                                                              

pygame.init()                                                                                                                                                         

                                                                                                                                                                      

screen_info = pygame.display.Info()                                                                                                                                   

screen_width, screen_height = pygame.display.get_desktop_sizes()[0]

```