Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Linux Business Programming Entertainment Games Technology

Best Way to Port a Windows Game to Linux? 67

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?"
This discussion has been archived. No new comments can be posted.

Best Way to Port a Windows Game to Linux?

Comments Filter:
  • How is it written? (Score:5, Informative)

    by numbski ( 515011 ) * <numbski&hksilver,net> on Wednesday September 07, 2005 @10:12PM (#13505636) Homepage Journal
    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?
  • open source (Score:2, Insightful)

    by voot ( 609611 )
    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
    • He pretty clearly is [positech.co.uk] attempting to make money off it though, so OSS is out of the question (or, at least, with the current business model, and I don't think that games are quite the same as utilities in terms of being paid to work on them...).
  • Boot CD. (Score:4, Interesting)

    by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Wednesday September 07, 2005 @10:19PM (#13505680) Journal
    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.
    • This is ridiculous, boot cd games are a total failure. To my knowledge none are being made, and it doesn't help with a Linux port at all. People who are in Windows should be running the Windows version of the game, people who are in Linux will want the Linux version.
      • This is ridiculous, boot cd games are a total failure. To my knowledge none are being made, and it doesn't help with a Linux port at all.

        But they are Linux ports! As to there being none, you [scummlinux.org] didn't [distrowatch.com] look [sourceforge.net] very [gentoo.org] hard [big.or.jp].

        • No, none are being made with commercial, full games, from the original developers and not some new guys. You'll note that the gentoo boot cd games haven't been updated in over a year. No activision, EA, or even Linux Game Publishing titles come out on boot cds. Computers aren't consoles, and nobody gives a damn about booting into Linux just for one game.
          • No, none are being made with commercial, full games, from the original developers and not some new guys.

            Now you qualify your statement! ;-)

            You'll note that the gentoo boot cd games haven't been updated in over a year.

            Do they need to be, if the game included still works on current hardware?

            No activision, EA, or even Linux Game Publishing titles come out on boot cds. Computers aren't consoles, and nobody gives a damn about booting into Linux just for one game.

            It's not a selling point for the users,

            • The gentoo cd games don't currently work, for example: their america's army cd isn't compatable with the newest versions of america's army. Modern graphics cards aren't as well supported, if at all, with the older nvidia drivers on the cd, etc.
    • Re:Boot CD. (Score:5, Insightful)

      by NanoGator ( 522640 ) on Wednesday September 07, 2005 @11:12PM (#13505999) Homepage Journal
      "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.
      • I can't speak for anybody else, but I'm unlikely to play a game I have to reboot my computer for.

        Same here. My PC is theoretically dual boot, so that I can still play Windows games. In practice, I find I rarely bother.
      • Indeed. I'd thought we'd got beyond the days of having to reboot... using a boot floppy disc with different autoexec.bat and config.sys files, just so That Game would run.
    • Re:Boot CD. (Score:5, Insightful)

      by vga_init ( 589198 ) on Thursday September 08, 2005 @01:21AM (#13506695) Journal

      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.

      • In this case, Linux would boot before the game and auto-detect the hardware, knoppix style. It could work, but I doubt anyone would bother to do it.
    • I have a system that I use solely for what you describe. It is called X-Box.
    • Only one problem; there's a really cool new thing I heard they're working on, called a multitasking operating system. Now, if it's a bootable CD, how can people multitask when playing a game? ;)

      Yeah, okay, I am being a little mocking but, really, if I wanted to use my whol entire computer just to play the game, I would get a Playstation or something. I don't want the game on a boot cd, and, in general, I do not like consoles either. Why?
      a) the game isn't as modifiable (especially on a console, even if you d
  • WINE (Score:4, Funny)

    by kngthdn ( 820601 ) on Wednesday September 07, 2005 @10:33PM (#13505766)
    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!!
    • I see the animated title/menu screen as it's probably supposed to appear and I hear music. The volume is erratic and it renders at about a frame every 10 seconds. Nothing freezes up. It responds to input, but it'll take at least another 5 minutes for me to get the mouse cursor down to the "New Game" menu item, because it's only moving a few pixels a frame.
    • Don't try to run it under wine, port it using wine. Think Port Wine!
  • More information ... (Score:2, Informative)

    by stevey ( 64018 )

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

  • Getting a Port Done (Score:5, Informative)

    by Time Doctor ( 79352 ) <zjs@zacharyjackslater.com> on Wednesday September 07, 2005 @10:44PM (#13505832) Homepage Journal
    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!
    • i second step 6 - we have a game that was fairly popular in a certain crowd (won an award at the indie games festival this year) - and had volunteers step up to offer to port the engine & game to Linux

      not only volunteers, but extremely talented coders that were able to not only port the game, but improve the codebase by fixing compiler-specific issues that were not apparently until trying to compile under gcc.

      what it comes down to is - if you have written your game using directx (anything) then the game
      • The fact that you had that much trouble getting the nvidia driver to work makes me wonder about the quality of your game. I mean it took me all of 17 seconds.

        however, you are right on one thing. If you do not know anything about linux, get some exp before you port it.
      • what it comes down to is - if you have written your game using directx (anything) then the game is most likely NOT going to be able to ported to anything but windows - unless you use wine or something similar (and this isn't really porting, it's just hacking until your game runs).

        Not true. DirectX will typically be a fairly small subset of the game code. As long as the game is modular and the graphics, sound and controls are toptally different systems from the gameplay code, it's just a matter of conve
    • Huh? (Score:5, Insightful)

      by Moraelin ( 679338 ) on Thursday September 08, 2005 @12:50AM (#13506557) Journal
      "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.

  • 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

  • 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.
  • I don't know... (Score:5, Insightful)

    by Neurotoxic666 ( 679255 ) <neurotoxic666.hotmail@com> on Wednesday September 07, 2005 @11:32PM (#13506127) Homepage
    Something [forumer.com] tells me they've just got free advertisement...
  • by Anonymous Coward on Wednesday September 07, 2005 @11:36PM (#13506152)
    (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.
    • 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
  • Icculus (Score:5, Informative)

    by sirmikester ( 634831 ) on Wednesday September 07, 2005 @11:49PM (#13506233) Homepage Journal
    Give Ryan "icculus" Gordon a call.. http://www.icculus.org/ [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.
  • by EvilMagnus ( 32878 ) on Thursday September 08, 2005 @01:36AM (#13506741)

    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.
  • I would contact this guy [icculus.org]. 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.
  • Comment removed based on user account deletion
  • Deja Vu (Score:1, Funny)

    by bleaknik ( 780571 )
    n.
    1. The sensation that you've read this very article before.
    2. The sensation that slashdot is losing it's edge.
  • by mwvdlee ( 775178 ) on Thursday September 08, 2005 @05:33AM (#13507508) Homepage
    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.
  • So... do you really want to convert to another platform or was this just some nicely disguised Slashvertising?
  • 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. [lokigames.com]

    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.
  • 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 [positech.co.uk] shows the canidate as a socialist.
    The second picture [positech.co.uk] unemployement is high and car usage is low.
    The third picture [positech.co.uk] Socialist is topping out at the top of the chart.
    The fouth picture [positech.co.uk] 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 mou
  • 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 p
  • 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.

  • Try compiling it under WineLib [winehq.com].
    "Compiling apps under Winelib should theoretically involve only makefile changes."
  • http://www.positech.co.uk/democracy/postmortem.htm l [positech.co.uk] There is the postmortem of what they did and how they did it.

"What man has done, man can aspire to do." -- Jerry Pournelle, about space flight

Working...