Best Way to Port a Windows Game to Linux?
cliffski asks: "I have a Windows game that may benefit from a port to Linux. It's a complex politics sim based on a neural network, (think NationStates with complexity) and is probably right up the street of many Linux gamers. The problem right now is that I don't have the knowledge or the time to handle a Linux port, myself. What's the best way to arrange for a commercial port of games software to the Linux platform? Is it worth talking to lone enthusiastic hackers about collaborating? Would I save myself a lot of hassle by selling the porting rights to an established Linux games company?"
Part of porting software is writing with portability in mind. What language did you write it in? What types of backends and libraries did you use?
What little porting knowledge I have, I know that writing (or re-writing as the case may be) using open libraries will take you a long way, and then seperate your functionality out well and use lots of commenting. Then if you need to port to Linux, if you don't do it in-house you can at least hand off something that is ledgable.
For example, if you've made heavy use of directx, fork your code off and try using an SDL display and input model instead. If that works, then you've gone a long way to getting the work done. Are you using assembler to speed up portions of the code?
Karma: Chameleon (mostly due to the fact that you come and go).
if your not looking to make money off of it, or dont mind other people using your code, the best way may just be to open source it
However you do it, you'd do well to distribute the game as a boot cd. You can have common content, an autorun-powered Windows installer, and a bootable Linux environment for those who don't want to install it, or have disk space, or like Windows, or want to wait to boot it.
Of course, you'd also want a Linux installer to pull the game off the CD, but that (obviously) needn't be autorun, or even very sophisticated. You'll probably end up being supported by the distros themselves anyway, if it's a good game.
Don't thank God, thank a doctor!
Well, I'm assuming the submitter linked to Positech Games' website for a reason...so I downloaded and installed the demo using WINE, and it seemed to work nicely.
When I run Democracy.exe, it makes some very cool noises, violently freezes up, stops responding to all my input, and then forces me to 'killall wine' and start over fresh after a while.
Not a bad start really, but you might want to simulate stupid politicians, taxes, and some oppressive patent laws, too. ; )
Then release a Dictator.exe that can't even be pkill'd!!
More information would help, such as what language/environment you used to develop your game.
Since you've not given much details why not look at this previous ask slashdot:
(A previous discussion about finding a porter for a Windows game).
Step 1) Don't let average joe user do it, he doesn't actually have a clue about the difficulty involved in porting a game. So many times I've seen John Q. Linuxguy think he can go off and make the most awesomest counter-strike clone EVER. What he usually ends up making is a random arcade game clone starring Tux, and breaking the next rule many times over.
Step 2) By the same line of thought, investigate what this person has done before. A simple rule of thumb is: Blue supernova effects in any game they've worked on, indicate that they are horrible horrible people who figured out how to make a game based on the gimp's supernova effect. Unless this person is Bill Kendrick, who is an excellent coder besides his lack of creativity in the art department, the code skills follow the effort in the art.
Step 3) If you want it done right... learn SDL and make your next game with SDL handling the input/window/etc. Even if you don't port your next game yourself, the SDL stuff is great for porters.
Similarly, you'll notice that most people who licensed the Quake 3 engine almost immediately switched to OpenAL for sound output. Next to zlib, this is probably the second piece of open-source most widely used in the non-indie game industry.
Step 4) Stay the heck away from fmod and other per-platform licensed things. They'll charge you a second time when you want to release your game on any other platform.
Step 5) Google for articles on writing portable code. Especially those by Brian Hook and Ryan Gordon.
Step 6) Post on your regular website that you're looking for someone to port your game to Linux. They'll come if your game is popular at all, and you're more likely to get the people who are really interested and will follow through. Even if it is the friend of somebody who is really interested.
Step 7) ???
Step 8) Profit!
Check out ioquake3.org for a great, free, First-Person Shooter engine!
WINE
Having zero personal experience with this (but hey, it's an Ask Slashdot), I think a porting house would also be able to help you distribute it. Once it's ported it doesn't do you any good if you can't find the market for it, and the way that you reach your Windows demographic may not work for the Linux market.
That aside, it will also be important to know how complicated it is and how soon you want to deliver it. If it'd take one guy a year, but 5 guys 3 mos, maybe it's more important to get it out sooner, so that'll dictate using more of a porting house.
btw: don't forget the Mac market. If you want to take it to Linux, anyways, you're looking at converting to OpenGL, so you may as well get it on the Mac too. Another advantage of the Mac market is that it has a dedicated consumer demographic and attendant distribution marketing channel, so that part would be easier, I think. I think some of the porting houses will do both Linux and Mac porting too.
--
$tar -xvf
It doesn't hurt that it already used a multi-platform interface, OpenGL. In any case, it is a multi-OS flight sim with Mac, Windows, and more recently, Linux ports. I seem to recall that the latter was helped by one or a few volunteers.
Something tells me they've just got free advertisement...
You are more than the sum of what you consume. Desire is not an occupation.
(Background: I've got my name on six published games, four of them cross-platform - I've written code for games that run on Xbox, PS2, Gamecube, Windows and the Mac).
Short answer: Make sure that the game runs correctly under Wine. Fix your Windows code to be Wine friendly.
Long answers:
I don't have the knowledge or the time to handle a Linux port, myself.
If you're not willing to commit time or resources, then I guess you won't care if it ends up being a shitty port.
What's the best way to arrange for a commercial port of games software to the Linux platform?
The best way is to have the same team that built the Windows version make the Linux version at the same time as the Windows one.
They should try and get the game working on each target platform from as early in the development cycle as possible - ideally from day 1. At least one developer should be working on each platform full-time as their main development workstation. And they should do at least one full build and brief play test per week - to ensure the different platforms don't get out of sync - AND they should check code in often so that cross-platform issues are caught as early as possible.
At the start of the project, abstract the platform-specific code to the edge of the codebase. Once the platform-specific code is solid, the developers should transition to building the game on top of the platform code - each being focused on game features, but fixing platform-specific issues as they arise. As you go, you'll probably build up a core library of cross-platform functions that are needed when dealing with multiple platforms and compilers.
And that, IMHO, is the best way to ship a multiplatform game with a limited team.
Is it worth talking to lone enthusiastic hackers about collaborating?
No. I personally would avoid this from the administrative issues alone. Besides trusting them with your codebase + assets. Then there are legal / non-disclosure issues, plus whatever "creative urges" they have to differ from what you were expecting them to be doing.
Would I save myself a lot of hassle by selling the porting rights to an established Linux games company?
No. As has happened with other game ports - the porting company would then produce a separate product. Users would then have to purchase it separately from the Windows version - meaning that existing customers would have to buy the game multple times if they were expecting to be able to run the game on another platform. As both a gamer and developer, I think that's unfair.
And the autobooting Linux CD (with a Windows launcher) is just about the dumbest idea ever - if there's a Windows version, users are going to want to run that - not the Linux version. It changes the focus from the product (the game), to Linux (an OS). Good for Linux zealots, bad for commerce.
Give Ryan "icculus" Gordon a call.. http://www.icculus.org/. He has worked on many ports over the years including America's Army, Medal of Honor, Postal 2, and plenty of others. He gained alot of experience working at Loki back in the day. I'm sure he wouldn't be opposed to helping you out.
In linux libertas
I have ported a number of games between platforms including to Linux. You are welcome to e-mail me questions via techsupport at wyrmkeep.com. Joe Pearce The Wyrmkeep Entertainment Co.
"Unless this person is Bill Kendrick, who is an excellent coder besides his lack of creativity in the art department, the code skills follow the effort in the art."
Dude, no offense, but I hope you do realize that artistic talent and coding talent are _completely_ unrelated skills. Most coders I know, myself included, are awful at drawing anything, and viceversa people who have a love and skill for arts, tend to be less interested in coding or Linux.
Like any skill that takes not only natural talent, but also lots of practice, _very_ few people are interested equally in both and spend equal time pracing both. There are only so many hours in a day, and someone interested in coding will spend those coding, not drawing.
So judging someone's coding skill by how well they draw is just bogus. It's like judging someone's ability to drive by their skill at poker, or viceversa. It's simply unrelated skills.
So, yes, a lot of freeware or OSS games have sucky art, because that's the best that a coder could whip up. Coder nerds are many, artists interested in working for free to stick it to MS or to make a statement about how evil IP is, are very very few. Unless you're willing to pay someone, and as a lone coder making a freeware game you probably don't want to pay for it, yeah, you're stuck with whatever sucky graphics you can whip-up in Gimp.
A polar bear is a cartesian bear after a coordinate transform.
I downloaded the demo, and it seems to be a total policy wonkage. Very pretty, and some good ideas, but apparently flawed. For example, the *absence* of Policy does not appear to have detrimental effects to any group of voters (I just killed the NHS, because the slider told me that would piss the least number of people off!)
It also doesn't have a very good financial component; no granularity for income tax / personal allowances, etc (policies I'd like to tweak would be 'personal allowances' and tax bands, for example - the BBC has a budget simulator that does this). And the sliders are biased : the choices range from 'very fair' to 'scandalous'. Mmm yeah. Well, if you're a Socialist, a really high tax on rich folks wouldn't be considered scandalous.
So, to conlude : Absence of policy should impact voter groups, much, much better handling of the economy, and less bias in the slider descriptions. "very low" to "very high" would probably work fine for most things.
-EvilMagnus
I would contact this guy. I saw him give a talk at the IndieGamesCon and he seemed to be knowledge about the linux games porting scene. His resume drives it home.
A Multiplayer Strategy Game for Mac OS X, Windows, and Linux
On how many times you can bare to hear "ZOMGWTFGPL!" ;)
SDL.
If you do end up porting it, you'll instantly become a faggot zealot who likes to suck dick and take it up the ass. Eventually, the grand-pubah faggot zealot linus whorevalds himself will come around and make you his personal bitch. You'll take it in the ass all day long, swallowing load after load of his steaming pile of crappy codecum.
Wow, your game's simulation of the results of Red State education policies is spot on!
All that's missing from the lame gay-baiting is a rambling denunciation of about "Derwenean EVIL-lution"!
Opinions on the Twiddler2 hand-held keyboard?
n.
1. The sensation that you've read this very article before.
2. The sensation that slashdot is losing it's edge.
Deja Vu
n. 1. The sensation that you've read this very article before.
There are a number of cross-platform libraries which handle pretty much everything that can be platform dependant: Graphics, audio, networking, file-system, GUI; find the best one for you (sufficient platform abstraction, enough support for the platforms you want) and port to them first (keeps you on the platform you're familiar with).
For the rest of the code not supported by standard platform independant libraries, try to create your own library-like structure so the platform-dependant stuff is seperated from the generic code.
Porting the whole thing should now be a lot easier.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Where can I find Linux porters?
I don't read your sig, why do you read mine?
So... do you really want to convert to another platform or was this just some nicely disguised Slashvertising?
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
What's the best way to arrange for a commercial port of games software to the Linux platform?
Loki Entertainment Software contracts with successful computer entertainment software companies to port their best selling titles to Linux.
Is it worth talking to lone enthusiastic hackers about collaborating?
No.
Would I save myself a lot of hassle by selling the porting rights to an established Linux games company?
Yes.
Karma: Positive (probably because of superiour intellect)
... and you'll get Linux and OS X ports for the cost of a recompile.
From all the pictures on their main site this game looks like it would have a tendency to favor the socialists amoug us. Let me give you these points about the pictures I saw:
:)
The first picture shows the canidate as a socialist.
The second picture unemployement is high and car usage is low.
The third picture Socialist is topping out at the top of the chart.
The fouth picture is about gay marriage and gives a week argument about the church wouldn't like it and a good strong argument for it. In addition the mouse is hovering over the "allow it" button.
The fifth picture is the best out of all five where they show you raising the taxes, like all good socialists do.
I guess some would argue that it fits well with Linux, because Linux is Communism. Of course I am kidding guys.
The concept is great, don't get me wrong. But the demo I downloaded a few months ago shows poor execution. The interface is difficult to understand and confusing at times (Example: I have a left-handed mouse configuration, and the game reversed it on its own). The included scenario with the demo was also numbingly difficult (two turns and everyone stops paying their taxes? What kind of country is this?). Hardly the type of thing that will make me want to buy the game, although if I had enough time to play around in a less limited version I might have a different opinion. Ultimately, you're not going to go very far on Linux wanting to charge money for a closed-code program. If you're unwilling to make a sacrifice in the arena, the time and effort to port it will probably be wasted.
(It's never too late to join the Renaissance)
Maybe it seems a bit too obvious to me, but why not develope games in Java so that they don't have to be ported. Virtual machines are ideal because of this very situation.
Or you could help to fix or identify the parts of Wine that still need some work (Like Corel did for their port) or you could use winelib like Borland have done.
Currently, support for games under Wine is a little bit mixed but there's a lot of heavy development going into Gaming at the moment so expect things to improve at a rapid rate.
Using Wine to port the game would, in theory, be the fastest way and performance and stability should be very close to a native Linux application. It's also very good for the comunity because it will help Wine come up-to scratch for gaming support allowing more native Windows games to be played on Linux which can only be good for everyone (well unless you want to port to Linux because of lack of competition!)
The guys at codeweavers provide commercial support for applications under Wine, so it may be worth dropping them an Email
thank God the internet isn't a human right.
too good
Try compiling it under WineLib.
"Compiling apps under Winelib should theoretically involve only makefile changes."
- Preferences: Solaris 10 (servers), Ubuntu (desktops), Solaris 11 (personal servers) -
http://www.positech.co.uk/democracy/postmortem.htm l
There is the postmortem of what they did and how they did it.