Porting my game to Linux

Started by
15 comments, last by dilyan_rusev 9 years, 2 months ago

Recently, I've setup a VM of Linux Mint for the purpouse of porting my game(s) to Linux. My game is already cross platform between Windows Desktop, MacOSX, iOS and Android/Amazon Kindle. Now, I am quite familiar with Linux, but I've never dev'ed anything for it either. So I was hoping to get a bit of advice from those who have done this before.

1. Will g++ suffice as my compiler? My game uses C and C++. I'm also a bit of a noob to makefiles...

2. Since Linux Mint is based off of Ubuntu (and in turn, based off of Debian), what Linux distributions will my game run on then?

3. My game uses GLUT (and I plan on switching to freeglut), do I have to install anything extra or does Mint come with this?

4. Any other helpful bits of advice.

Thanks.

Shogun.

EDIT: Figured out how to install freeglut, and got it working with g++ already. That's a load off so far.

Advertisement

1. Yes

2. It depends, if you stick to the LSB(you have to statically link any non LSB libraries, or replace them with a LSB equivalent) your game will run on all LSB compliant distributions (Using the LSB SDK is highly recommended), if you don't it is pretty difficult to say, it will most likely work on most debian based distributions atleast.

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

1. Will g++ suffice as my compiler? My game uses C and C++. I'm also a bit of a noob to makefiles...

Sure. Clang works well too, I'm not sure which is the default C/C++ compiler on Mint these days.

2. Since Linux Mint is based off of Ubuntu (and in turn, based off of Debian), what Linux distributions will my game run on then?

Technically it will run on any Linux with the same CPU architecture and a compatible set of runtime libraries. In practice, you should be fine on all the Debian variants (primarily Debian, Ubuntu and Mint). Any other distros need to be tested separately.

3. My game uses GLUT (and I plan on switching to freeglut), do I have to install anything extra or does Mint come with this?

You'll need the freeglut3-dev package, as well as a set of OpenGl drivers. Provided you have a supported video card, running sudo apt-get install freeglut3-dev from the command line should pull in all the necessary dependencies.

4. Any other helpful bits of advice.

You'll want to learn how to package your game distribution up as a .deb package. This is by far the friendliest way for your users to install your game on Debian/Ubuntu/Mint.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

2. It depends, if you stick to the LSB(you have to statically link any non LSB libraries, or replace them with a LSB equivalent) your game will run on all LSB compliant distributions (Using the LSB SDK is highly recommended), if you don't it is pretty difficult to say, it will most likely work on most debian based distributions atleast.

Thanks, but what does LSB stand for?


4. Any other helpful bits of advice.

You'll want to learn how to package your game distribution up as a .deb package. This is by far the friendliest way for your users to install your game on Debian/Ubuntu/Mint.

Ah, so it's a .deb that is the package type. I've gotten used to having the all in one functionality of Apple's .app package.

While I'm at it, Ubuntu has an app store, and I hear that it's not working (or harder than it should be to install) on Linux Mint 17. One of my goals is to get this on that distribution channel. Do Mint users commonly have this installed?

Shogun

you can use codeblocks or any other ide, that compiles your object files, and links together the stuff, so you dont need into makefiles, if you dont want makefiles.

also if you dont want to use ides, like the codeblocks, you can just give g++ main.c -o mystuff -lfreeglut -lwhatever.

i dont know, if mint has glut develop files, but usually you find the package with freeglut-devel, or with a name close to that

i dont suggest clang, its buggy like the hell, in reality, it compiles slower binary, and they refuse to even care about bugreports (or at least from my bugreports, they calim its not a bug, i doing it wrong, etc).


i dont suggest clang, its buggy like the hell, in reality, it compiles slower binary,

You do know that clang is the default compiler for Apple, freebsd, and it's likely to be adopted by Debian in the next year or so?

and they refuse to even care about bugreports (or at least from my bugreports, they calim its not a bug, i doing it wrong, etc).

Has it occured to you that they might be right? Link the bug report, and we can confirm/deny.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Has it occured to you that they might be right? Link the bug report, and we can confirm/deny.

its possible in some case of certain financial conditions.

Has it occured to you that they might be right? Link the bug report, and we can confirm/deny.

its possible in some case of certain financial conditions.

Could you link the bug report? Or is this behind an NDA?

Were you by any chance using floating-point numbers to represent currency values?


Will g++ suffice as my compiler? My game uses C and C++. I'm also a bit of a noob to makefiles...

I haven't done any extensive Linux development, but I ported a game to Linux using this IDE: http://codelite.org/

It feels reasonably close to VC++ and Xcode in general.

2. It depends, if you stick to the LSB(you have to statically link any non LSB libraries, or replace them with a LSB equivalent) your game will run on all LSB compliant distributions (Using the LSB SDK is highly recommended), if you don't it is pretty difficult to say, it will most likely work on most debian based distributions atleast.

Thanks, but what does LSB stand for?

LSB = Linux Standard Base, it is a set of standards that most Linux distributions support, most importantly it provides a stable, backwards compatible ABI (which is quite important if you don't want to distribute your sourcecode).

If you do not use it there simply is no guarantee that your binaries will work on other distributions, or even future versions of the same distribution.

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement