-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for computers running Linux #4
Comments
Thanks for your feedback! Yes I do plan on making this game Linux compatible in the future. Before that can be done, however, I need to make some major changes to the code once again so that the game is not using the poorly optimized turtle library. I would have done that this summer, but felt that working on code organization was more important. Once this change is made, I can begin working towards Linux compatibility. |
I'd like to follow up. @Christian2147 and I have done some work on getting this to run on Linux. I've managed to get it to run on my machine, but only when deviating from the instructions a bit. I'll outline this below. As of this commit e328eac, Linux instructions for setting up the env are accurate and work. However, some instructions are unclear, particularly around removing win32 dependencies. It tells us to use Here are the instructions for what I did: source/setup/WindowSetup.py
source/utils/PreventSleep.py
source/textures/lasers/Player_laser.gif
source/textures/interface/Icons/
monitor properties
From here, running |
@yosoyducc Thanks for the follow up! I have added most of these to the instructions page. The rest of these procedures I plan on implementing in the games code through a Hotfix update coming up later in the week! All of these commands not working have to do with improper naming or Linux incompatibility. I am not sure why the scaling is working incorrectly. Try implementing the solution that I gave and see if it scales correctly when on fullscreen mode. Windowed mode scaling has not been implemented yet. |
@yosoyducc I have just released a new update which addresses some of the requirements for porting the game to Linux. Linux compatibility is possible if you follow the instructions on the instructions page. In the future, I plan on making this a fully automated process. Thank you for your help! |
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.
The text was updated successfully, but these errors were encountered: