Christian2147/Laser-Fighter

Support for computers running Linux

オープン

#4 opened on 2024/07/22

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Python (0 件のフォーク)auto 404
featuregood first issue

Repository metrics

Stars
 (3 個のスター)
PR merge metrics
 (PR metrics pending)

説明

I can see in the README that there are plans to port the game to Linux. That's awesome! I'm opening this issue to highlight the things that need to be done to port the game.

Laser Fighter currently makes some system calls to the Windows API. The head culprit is ScreenSetup.py which manages screen initialization. This file imports win32api and win32con to achieve this. While this approach works on Windows, it means other operating systems cannot run this game natively. This is the main reason the game will not run outside of a Windows environment. A possible solution is to use a more OS-agnostic approach to these windowing functions, like getting the monitor dimensions. I'm not aware of anything of this nature for Python at the moment, I'd have to look more into this.

Another thing to notice is this game also imports the font "Courier" from the system, which is not commonly found on OSes other than Windows. This can result in fallback to some really awful-looking default system font. We can see this in effect when running the game in WINE on Linux, which does not have the Courier font installed by default. A solution is to just include the font file with the game, but it's possible that the Courier font has a proprietary license, causing trouble with redistribution.

Aside from these two points, there shouldn't be much else that needs to be changed to port the game. I'd be interested in opening a pull request to work on this.

コントリビューターガイド