PDA

View Full Version : Drox Operative on Linux?


Shadow
02-15-2013, 02:00 PM
Please don't take this as a guarantee or anything, but I'm finally seriously exploring a Linux port of Drox Operative and possibly our other games. Our main focus right now is the expansion pack, but this is something I've been making some slow progress on. I don't want everyone to get their hopes up too much, but I also wanted to be able to talk about this every now and then.

Anyway, I finally had an unused and reasonably fast computer available in the house so I decided to install on Linux on it. I did a bunch of research about which version. It looks like Mint might be the most popular one right now, but Ubuntu seems to be a more common target for games especially with Steam initially only supporting Ubuntu. So I installed Ubuntu 12.04 LTS. This was actually easier than I expected. It configured everything fine as far as I can tell. I'm probably not running the graphic drivers that I need to, but I'll look at that later.

I also researched IDEs a while back. There are a lot of them, but I finally settled on Code::Blocks since it sound like it does everything I want and seems to be similar to the Visual Studio stuff that I'm used to.

So yesterday, after patching Drox to 1.003, I sat down to figure out how to install Code::Blocks. This was actually a big pain in the ass. The painful stuff had nothing to do with Code::Blocks though. I had to learn about apt-get (a command line install package tool), repositories, PPAs (Personal Package Archive), Nautilus (the codename for the file manager that the more recent Ubuntu versions use), Precise (the code name for Ubuntu 12.04), and probably a bunch of other tools and code names that I've already forgotten about. Once I figured out what all of this meant, the steps of installing something wasn't too bad and went pretty quick.

I also researched SVN GUI tools and decide to use rabbitvcs. Since I just learned all of the installing headaches, installing this was much easier.

That's pretty much where I am at the moment, not a huge amount of progress, but it's a start. I've also learned quite a bit more about Linux in general.

I'm planning on giving updates as I progress. It will probably be sporadic though since my main focus is still the expansion.

As usual comments, tips, and encouragement are all welcome. :)

Castruccio
02-15-2013, 03:57 PM
Can you say what it is about Linux that attracts you other than the additional market share? I suppose Gabe Newell and others have some fears that the Windows PC might no longer be an open platform one day, so they are preparing for a day when all games run on Linux. Do you think that day is coming?

Shadow
02-15-2013, 04:05 PM
There are a lot of reasons to support Linux that have nothing to do with Windows/Microsoft. I do have some of the same fears that Gabe has though. The Mac is getting more and more locked down and Windows is starting some of the same steps with Metro and its App Store. As a developer and a gamer, the latest steps of both operating systems worries me.

Moonshine Fox
02-15-2013, 05:39 PM
Learning Linux is definitely a bit of work, that's true. I started out on Ubuntu many years ago. One of the 6.xx versions I think. I eventually got annoyed with how obscure and bloated Ubuntu was when compared to other, more free and lightweight distributions and finally settled on a DIY distribution called "ArchLinux", which basically gives you only a console login, a network connection, package manager and a session/service manager. That's pretty much it. It's up to you whatever you want to install from there.

It was definitely a huge step from Ubuntu, which is pretty much "install and it works", even for someone who has never touched Linux (as proven by Shadow above). It sadly does a pretty poor job of teaching Linux to the user though, due to its willingness to be "user friendly" and thus obfuscate its inner workings as much as possible. There are good and bad sides to that, of course.

Regardless, Ubuntu is likely a good starting point, and so far I'd say it's the best distro to go to if you're a Windows user and just "want it to work". Once you get into Linux and start to understand the freedoms you can have access to and the customizability present in the "OS", you'll likely want to look into more "hardcore" distributions and tailor your own experience.

But I'm happy to hear you have started, Shadow! It's always exciting to learn and Linux is no exception. I'm a rather adept Linux user at this point, and Ubuntu has a very well written help-wiki documentation on its site, so feel free to poke me for questions if you can't find what you are looking for on the wiki.

Good luck!

Draxis
02-18-2013, 03:56 PM
Porting a big game to linux is something I am very interested in hearing about, I dont see it discussed much. It would be great to know if its mostly a case of 'dont include windows.h anywhere, except the few files that need to interface with the system', or if it is a lot more involved than just good project structuring. Did the compiler complain about non-issues, or did it find errors in your code that the VS compilers missed? How much effort is involved in porting a multi-project solution from 'sln' format to 'make' files? What were the most aggravating / time-sinkish parts of the process? That kind of thing :D

Dark_Oppressor
02-22-2013, 06:57 PM
I just recently started seriously working on getting a Linux version of my previously Windows-only engine up and running. I found this series of articles tremendously helpful:

http://www.gamedev.net/page/resources/_/technical/game-programming/linux-game-development-part-1-r2372

http://www.gamedev.net/page/resources/_/technical/game-programming/linux-game-development-part-2-r2377

http://www.gamedev.net/page/resources/_/technical/game-programming/linux-game-development-part-3-r2389

http://www.gamedev.net/page/resources/_/technical/game-programming/linux-game-development-part-4-r2400

http://www.gamedev.net/page/resources/_/technical/game-programming/linux-game-development-part-5-r2421

Depending on your code, it can be surprisingly easy to pull this off. I think I lucked out with a pretty much best case scenario, as all of the libraries I use are already cross-platform, all of my own code is platform independent, and I already used MinGW (gcc for Windows) for compiling. I also use Code::Blocks; it's a great IDE!

My current game is a commercial project, but I plan on releasing the source code, so that allows me to statically link all of the libraries that I use (one or two have licenses that disallow static linking with closed source), which means I now have a binary that can run on (as far as I know) any Linux distro from the past 2-3 years or so.

If you need to dynamically link libraries instead, those articles I linked to cover that, and it doesn't seem too difficult either, really. It kind of ends up being like providing dlls, but explicitly telling the binary to use them with a "start the game" script.

One thing that I found while working on this was that a distro's glibc version is very important. I compiled my first test binary on Linux Mint 14. It would not run on an old install of Ubuntu (can't recall what version, but ~2 years old). The reason was that the binary compiled on Mint used symbols from a newer version of glibc than the old Ubuntu install had, so it just flat out would not run. glibc is backwards compatible, but not forwards compatible, so I think basically whatever glibc you have on your "build distro" is what will be required by the binary. I have since setup a build system on Debian Squeeze (in a nice portable virtual machine), which has a much older version of glibc. My binary now runs on any distro I have tried it on so far, including that old Ubuntu install.

If you get to the point where you need Linux test machines to see if a binary will run or whatever, let me know! I've got a few different distros of varying age lying about. Debian Squeeze (~2 years old) -> Arch Linux (~2 weeks old)

P.S. Hello Moonshine Fox, fellow Arch Linux-er! :-) I actually just started using Arch recently. I put it on an old computer I got ahold of and turned it into a fileserver. I want to stick Fluxbox on it soon and play with a GUI though.

Bearro
02-28-2013, 04:29 AM
It's great you're looking into this, especially with steambox which is going to run linux! I can't wait for a chance of playing e.g. Din's curse on a console :)

Shadow
02-28-2013, 05:46 PM
I made a lot of progress getting the game compiling in Linux today.

Bearro
03-01-2013, 08:55 PM
Have a look at this, another indie showing their Linux sales stats :)

http://www.gamasutra.com/blogs/LarsDoucet/20130228/187569/Defenders_Quest__Our_Steam_Linux_Sale_Results.php

( Tchey )
08-16-2013, 01:55 AM
Is it going to happen ? Did i miss something ?

I'm playing with PlayOnLinux and it's quite OK but it's still always better to have a real Linux version.

Shadow
08-16-2013, 12:32 PM
I stopped working on the Linux stuff to get the IotA expansion finished. Going back and forth was kind of a pain. I'm planning on getting back to it soon though.

tiagocc0
10-30-2013, 12:56 PM
You could consider using something that could happily compile on Windows/Linux/Mac using the same code (with probably a few hacks) instead of duplicating the code for each (probably having a lot of hacks).

I myself use Qt, people are flocking to Unity3D for this reason as well.

If you need any help with Qt I can help you.
Qt 5.1 works with opengl, the windows version can either use pure opengl or use opengl with angle. In this case opengl calls are redirected to directx.