Slashdot Mirror


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?"

14 of 67 comments (clear)

  1. How is it written? by numbski · · Score: 4, Informative

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

  2. Boot CD. by SanityInAnarchy · · Score: 3, Interesting

    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!
    1. Re:Boot CD. by NanoGator · · Score: 4, Insightful

      "However you do it, you'd do well to distribute the game as a boot cd."

      I can't speak for anybody else, but I'm unlikely to play a game I have to reboot my computer for.

      --
      "Derp de derp."
    2. Re:Boot CD. by vga_init · · Score: 4, Insightful

      I'd like to speak in your defense against the slightly-inflammatory responses you are getting.

      If you stop and think about it, why do we have operating systems? Simply put, every machine is different, and the same code cannot power two unique devices.

      Bootable games is a great idea, but the first problem you hit is this: "What is the program going to tell the hardware?" If the hardware is not the same on every device, it won't know what to say! If you try to tackle this program yourself, you'll have written an operating system before you know it. Your operating system will veritably do less hardware support and fewer features than, say, linux. :-)

      Game consoles can handle bootable games because they are designed to make everyone's life easy; every unit is usually identical and almost always compatible. We PC users don't have the luxury.

      It's not that you have a horrible idea. You have a good idea, but just not a realistic one.

  3. WINE by kngthdn · · Score: 3, Funny

    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!!

    1. Re:WINE by AvitarX · · Score: 3, Funny

      It is clearly working too fast to be a political simlator.

      Must be a problem with WINE.

      --
      Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
  4. Getting a Port Done by Time+Doctor · · Score: 4, Informative

    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!
  5. I don't know... by Neurotoxic666 · · Score: 4, Insightful

    Something tells me they've just got free advertisement...

    --
    You are more than the sum of what you consume. Desire is not an occupation.
  6. Please don't do another bad port. by Anonymous Coward · · Score: 5, Insightful

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

  7. Icculus by sirmikester · · Score: 4, Informative

    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
  8. Huh? by Moraelin · · Score: 4, Insightful

    "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.
  9. Slightly off-topic, but anyone played the game? by EvilMagnus · · Score: 3, Interesting


    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
  10. Use cross-platform libraries by mwvdlee · · Score: 3, Interesting

    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?
  11. You might be interested in this previous /. thread by dan+dan+the+dna+man · · Score: 3, Informative
    --
    I don't read your sig, why do you read mine?