Jump to content
  • Advertisement
Sign in to follow this  
blueshogun96

Porting my game to Linux

This topic is 1220 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Edited by blueshogun96

Share this post


Link to post
Share on other sites
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.

Edited by SimonForsman

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

 

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?

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!