Does Linux Have Game? 729
kwpulliam writes "Tom's Hardware has an interesting writeup, discussing the difficulties in bringing games to Linux, and the dilemmas faced by the graphics card developers."
interlard - vt., to intersperse; diversify -- Webster's New World Dictionary Of The American Language
ATI video drivers (Score:5, Informative)
For productivity, I'm using OpenOffice, FireFox and Thunderbird amongst other open source applications. For games, I play Savage (http://www.s2games.com) which has a native Linux binary. I also play some other games like BattleField 1942 and Vietnam that run under Linux through an emulator.
The rate limiting step here is the ATI video drivers. It's the only thing keeping me running Windows XP instead of Linux.
Re:Direct3D on Linux? (Score:5, Informative)
Well, with Cedega [transgaming.com] (formerly WineX), they basically have...
Still, with porting to OpenGL, you get the benefit of not having to use a runtime Direct3D-to-OpenGL translator (which is essentially what Wine/WineX/Cedega uses), and you're also a step closer to the OpenGL-only Mac.
ET runs well (Score:5, Informative)
Re:Tried & failed already. (Score:5, Informative)
Loki closed almost four years ago. The market today is significantly different then it was then. Linux is used significantly more, on the server and the desktop. Id say with ALSA, and Winelib, the effort required to do source code porting today would be significantly less then it was back when Loki was alive. Also with broadband connections being far more popular as well, a modern Loki could sell direct to users.
So a modern Loki would have more customers. The porting would be easier - cheaper. And they would have higher margins if doing direct-download sales. The economics are compleatly different.
Re:Direct3D on Linux? (Score:3, Informative)
Re:ET runs well (Score:4, Informative)
For those of us unfortunate enought to have a 9500 or greater, using DRI is not an option, we have to use ATI's pitful excuse for a driver. My 9600 Pro gets slaughtered by a GF4MX in glxgears , yes I know glxgears is not much of a bench but still..
We're also still waiting for official Xorg support. This was promised by mid-December but that's now been put back until mid-January.
Re:Exactly the problem that a lot of people have (Score:3, Informative)
well, ut2k4 has a native linux version. Believe me, my crack is Diablo 2, and it runs great under cedega (wineX, from transgaming.com). HL2 is well supported (they even released an intermediate version for the sole purpose of working around some steam breakage). It looks like GR is not supported by Transgaming, but works well (the wiki node is a little out of date, though. I don't have it to report directly, thought).
Additionally, transgaming supports popular games pretty well, releasing versions to support them fairly quickly after (or even synchronously with) their release.
Re:call me stupid (Score:3, Informative)
Very hard. Since most games rely heavily on libraries of code the compiler would have to be able to recognise the functions and either translate Windows DLL calls to Linux .so calls or synthesise new code for routines which are not supported on Linux.
This is in the realm of possible but not the realm of even moderately difficult. Otherwise, as you say, it would already have been done.
TWW
Re:Exactly the problem that a lot of people have (Score:2, Informative)
Re:Direct3D on Linux? (Score:3, Informative)
Having said that, I still use OpenGL, as I run Linux, and don't like the closedness of Direct3D.
~phil
Re:Yes... (Score:1, Informative)
If you people dont reconize this, this is from a video Red vs Blue did. Insanely funny.
"DirectSound" equivalent is already on Linux (Score:2, Informative)
Re:Exactly the problem that a lot of people have (Score:2, Informative)
Re:It's the "video" drivers stupid (Score:4, Informative)
RTFA [tomshardware.com].
Article Text (Score:3, Informative)
---------------
Does Linux Have Game
Introduction
[IMAGE]
Live out your Unreal 2004 midnight adventures on Linux.
Earlier this year, our Linux Comes to the Desktop article caused a stir, when we stated that gaming on a Linux platform remained a limited proposition. Now it is time to detail why this is the case. We will explore what is the best you can hope for when you opt for the penguin to play Unreal and Doom III. We will also look at why Linux lovers must be contented with the state of things -- for the time being, that is, because things are looking up for the Linux gaming crowd.
So why is wide-scale gaming support for Linux not 100% there? A better question may be: why would game developers spend the money to add Linux functionality to games for a limited number of users? The answer is not that simple, especially since Linux desktop use continues to grow.
There are many reasons why you might want to shift from Windows to a Linux OS. We won't cover what those reasons might be in detail here, but will note that users routinely complain of Windows instability, high prices and many layers of software that impede performance. For others, there are ethical considerations for avoiding Windows, such as decisions by courts of law in the U.S. and Europe holding that Microsoft has illegally wielded its monopolistic influence in the marketplace. On the other hand, there are magazines out there, backed by now-a-word-from-our-sponsor Microsoft ads, that claim Windows XP deserves your money.
According to a report issued this month by analyst firm IDC, Linux "is no longer a niche phenomenon." The overall Linux marketplace revenues for server and PC hardware and packaged software are expected to reach $35.7 billion by 2008, IDC says. Packaged software revenue is the fastest growing market segment within the Linux marketplace, growing 44% annually to over $14 billion in 2008.
On the desktop, IDC says Linux PC shipments are expected to almost triple from six million units this year to 17 million units in 2008. Percentages of PCs shipped with Linux increase from about 3.8% in 2004 to about 7% in 2008. However, these numbers do not take into account the PC units shipped with Windows, to which Linux is subsequently added.
As you can see, the evidence suggests that Linux on the desktop is growing, and that means more PC gamers who will want to be able to frag at will in Linux. In the game console sector, hackers already know that Microsoft's Xbox and Sony's Playstation II also support Linux.
Until Linux does become as pervasive as IDC and other analysts claim it will, what is a gamer who wants to play Halo on a Linux platform do? And why is it such an issue to begin with? Without detailing differences based on benchmarks, we offer a look at the connection between graphics card drivers and the APIs that developers use for their games, and how the interface between the two works and doesn't work with Linux.
Direct3D Vs. OpenGL
[IMAGE]
Doom III shows OpenGL can rock
Whether game developers use Direct3D or OpenGL as their API is the main determinant of whether a game will run on Linux or not. Both APIs are used to create games' 3D imagery, including lines and other shapes, smoke, shadows and all the other good imagery games offer. It has been said that Direct3D is superior to OpenGL, but this is not really the case. While Direct3D is indeed the predominant game API, superior graphics have more to do with the creative skills of the game developers than the choice of API.
Direct3D falls under the brought-to-you-by-Microsoft umbrella, and is geared for the Windows-only world. Because Windows is the main OS in the PC world, graphics card makers have only one OS with which to contend when configuring their drivers for Direct3D games.
OpenGL, meanwhile, is everywhere - it is compatible with Linux, Windows, Unix and Mac OS. But
Re:Direct3D on Linux? (Score:4, Informative)
Why can't someone port the Direct3D API to Linux? This would save a lot of hassle of porting the games to OpenGL.
It's not so much that no one can...just that it's way too much trouble for the benefits you'd get. Specifically, D3D relies heavily on a lot of the rest of the Win32 API. If you want D3D, you'll need either a Win32 API, or to rewrite all those calls. This makes sense in the context of wine, which is why cedega/winex have basically done all this. Not perfectly, mind you...but this is their goal.
Of course, you can add to this the fact that Linux already has perfectly good API's for this sort of thing in the form of OpenGL and SDL. And the fact that Microsoft has kept D3D a moving target.
And finally, there's the fact that porting D3D wouldn't necessarily solve all the problems; presumably, games that use D3D also make a bunch of other Win32 system calls. So, you're back to needing both D3D and Win32.
In other words, you might as well have said, "why doesn't somebody just port Windows to Linux so we can forget about all this bullshit?"
Re:Exactly the problem that a lot of people have (Score:2, Informative)
With the success that is DirectX, Microsoft has also been pushing companies to use it for audio and video in their games. Effectively, in addition to DX, they're locking games in with Windows Media Player now, as well.
Even if you're able to get a DirectX game working under WINE or Cedega, for instance, you may be stuck if you're unable to get the in-game movies working. I'm not certain if modern versions of WMP can be installed via WINE, but it just tacks on to the burden of the Linux gamer -- or should I say another nail in the Linux-as-a-Gaming-Platform's coffin; that is, until it becomes popular enough for developers to take notice and change.
As a little example, I found myself in this situation a few months ago. A certain game I wanted to play had installed fine, but once launched it ran a little in-game movie that required WMP. I can't recall now if I was able to install a copy of it or not, but I remember having to do some mouse clicking voodoo every time I started it as to keep the movie from playing, in order to play.
When it comes right down to it, Microsoft has itself another little monopoly. It's yet another reason the XboX is doing so well. Perhaps Apple will come along and save us, with an iBox or something, someday. That, or Linux might actually catch on as a desktop pla-- oh, never mind.
I just long for the day VMware gets a working DX API. Now that will be the day.
/.'ed... (Score:3, Informative)
Re:Direct3D on Linux? (Score:3, Informative)
That said, the reviews I've read about Doom3 on Linux say its performance is not as good as on Windows.
Re:Direct3D on Linux? (Score:3, Informative)
Yep. D3D and OpenGL both do more or less the same thing...
Not quite. D3D is a much fuller-featured development framework, rather than just a graphics description language. More like OpenGL+SDL.
Re:"DirectSound" equivalent is already on Linux (Score:2, Informative)
Re:Direct3D on Linux? (Score:5, Informative)
3D Hardware Accelerator Card Required - 100% DirectX® 9.0b compatible 64MB Hardware Accelerated video card and the latest drivers*.
English version of Microsoft® Windows® 2000/XP
Pentium® IV 1.5 GHz or Athlon® XP 1500+ processor or higher
384MB RAM
8x Speed CD-ROM drive (1200KB/sec sustained transfer rate) and latest drivers
2.2GB of uncompressed free hard disk space (plus 400MB for Windows® swap file)
100% DirectX® 9.0b compatible 16-bit sound card and latest drivers
100% Windows® 2000/XP compatible mouse, keyboard and latest drivers
DirectX® 9.0b (included)
Linux:
GNU/Linux system,
Pentium III, 1Ghz
256Mb RAM
Kernel 2.4, 2.6 is recommended
glibc 2.2.4 and up
3D card:
NV10 or R200 minimum hardware
OpenGL hardware acceleration
64 MB VRAM
sound card, OSS or Alsa, stereo sound and 5.1 are supported with both APIs
Alsa version 1.0.6 or above is required
I got both of these from the respective download sites. The only difference being the Linux version is the demo release, which should cause minimal concern since they are going by how well the engine itself runs on the platform.
My system is an AMD XP2100+ 512MB & ATI9700Pro @ 4x AGP. The Windows version runs great, the Linux version runs so-so. It is playable, but not much fun. I think this has more to do with needing to upgrade to something in the FX53 range than being any blame of ethier operating system.
Let's face it, performance isn't nearly as much of an issue as developer support at this point.
Re:Big releases (Score:1, Informative)
The Halo ports weren't big releases anywhere except for the Xbox. (Except in terms of hype.) It sucks that the Linux port was nixed, but Halo was no great shakes as far as PC games go. Gamespy stats [gamespy.com] says there are ~700 people playing Halo currently, which is respectable but also pretty much indicates that the game failed to captivate online gamers - eg, there are ~100,000 Half-Life players playing online currently. Call of Duty, a game that was released exactly one month after Halo PC, has ~20,000 players online now...
Just saying, it wasn't the be-all end-all game; to Xbox gamers, a multiplayer FPS was revolutionary, to PC gamers it was just more of the same. I bought it strictly out of Marathon: Infinity nostalgia, not because it was a groundbreaking effort. Linux gamers didn't miss much.
That all changed when Bungie was bought out. Honestly given the consolidation within the game industry, I don't see much hope for games on Linux for a few years yet
I think the best hope for Linux gaming is in the hands of Indie game developers, and Emulator (or fooglebarg layer, or whatever you want to call it today) devs as well. As far as I can tell right now, those are very good hands.
Re:Direct3D on Linux? (Score:2, Informative)
One problem is that OpenGL (pre 2.0, haven't looked at that yet) is horrible to work with if you actually want to get stuff done.
Then dammit, use a real game API instead of just a graphics language. Might I suggest SDL [libsdl.org]?
(p.s. Sorry if I'm beating a dead SDL horse in this discussion...but seriously, this is the answer, and it just seems like no one is paying attention.)
Re:Direct3D on Linux? (Score:2, Informative)
Just something I'd like to note: Most FPSes these days aren't being ported to linux/mac by their dev team. this guy [icculus.org] does it for them.
Re:ATI video drivers (Score:3, Informative)
While their drivers contain a substantial binary only component, your statement is not entirely true.
The layer of their drivers that interfaces with the kernel has sources available, and with some efford it can be adapted to newer kernels when it breaks (which it doesn't do that often)
They also provide drivers for FreeBSD and seem to be taking this idea of supporting such open source platforms very serious, despite their non-free drivers.
Re:Yes... (Score:2, Informative)
Re:Direct3D on Linux? (Score:4, Informative)
It's really not all that difficult if you use something like wxWidgets [wxwidgets.org] (formerly wxWindows). Slashdot has covered [slashdot.org] the MFC and wxWidgets comparison before. If your interested, IBM has written an article on Porting MFC applications to Linux [ibm.com]. Just let it be known, it is something being done. I've personally converted applications directly from MFC to wxWidgets with very little difficulty and really very little code change. However, none of the apps had non-standard interfaces.
MFC is history anyway. Just something to think about.
Re:Need Game Boxes and Mac to Run Linux (Score:3, Informative)
Re:Direct3D on Linux? (Score:2, Informative)
Perhaps if by D3D, you mean DirectX. Direct 3D is the graphics component only, which offers far less than what OpenGL+SDL might.
It's better now than it's EVER been. (Score:2, Informative)
People cry that it's too hard to get your video to work; I'm really sorry you were too cheap to get the GeForce Go 5200 and got the Intel "Extreme" integrated graphics and now your pixel shader games look crappy. Nevertheless, UT2004 and the UT2004 DEMO play under linux with the DRI drivers.
Stop complaining, Loki is gone, but http://icculus.org/ [icculus.org] is still around, and several of those guys WORKED for loki. If you want it EASY, you want GAMES then either USE WINDOWS or buy an X-Box. If you prefer Linux and are willing to expend the time and energy (and reap the rewards of what you learn) then USE LINUX and play the games that work well, there are a bloody AWFUL lot of games that work, work well and aren't that difficult to set up.
Take a little time, subscribe to http://www.transgaming.com/ [transgaming.com], make a little donation to http://liflg.org/ [liflg.org], buy products from http://www.nvidia.com/ [nvidia.com] and shut up & enjoy the games!
Re:Direct3D on Linux? (Score:3, Informative)
In D3D you need to check caps bits for feature, OpenGL you need to check if the extension is supported, seems about the same to me.
I don't understand your comment about OpenGL being Stateful, D3D also stores its own internal state and it maybe more than one copy, one for the DX runtime and another in the driver proper.
About the extensions, nothing stops a Radeon (or anyone else) implementing the NVidia extension (which I think they do). OpenGL allows you just to call the new features (if supported). In D3D access the new feature means you will need to move all your calls to the new interface.
Vertex Arrays do the same sort of job as Vertex Buffers in D3D, plus you have display lists so you can combine geometry and state change into a single call.
In the end to support cards with different features sets you are still going to have different codepaths.
article summary (Score:3, Informative)
Re:Direct3D on Linux? (Score:3, Informative)
~phil
Re:Direct3D on Linux? (Score:5, Informative)
Direct3D is exactly like OpenGL. You can argue features (vertex shaders integral or an add-on, etc.), but they are both graphics APIs.
Your point is valid, but you are thinking of DirectX. DirectX contains Direct3D (graphics), DirectSound (um... sound ;), DirectInput (keyboard, mouse, joystick, whatever), DirectPlay (or at least it used to, networking code), and others (I think).
So your right. I doubt many games use just Direct3D. If you are going to use D3D, why not use DirectSound and DirectInput too? They are much better than just programming Win32 for that stuff (I would imagine). Even Quake2/3 used DirectX for everything but graphics (I think).
As the parrent said, there is more to the problem than just Direct3D, there is all of DirectX (which WineX/Cedega/whatever is working on alongside D3D). If more games were written with OpenGL+SDL (or any other cross platform combination that may exist) things would be easier to port.
Re:games on Linus is fact... ho ho ho my first pos (Score:1, Informative)
PS2 Linux can be though of as a game running on the PS2.
The PS2 DOES NOT NORMALLY have an OS.
Wanker.
Re:Direct3D on Linux? (Score:1, Informative)
Everything works as it should, the install can be a bit messy, and lots of people (including myself) have some weird problems, but after a restart that all cleared up, now I have Steam and CS icons on my desktop ready to launch.
Steam runs about 10x faster than on Windows (seriously) but that may in part be to do with the fact that Windows trashes itself after a couple months of abuse.
CS 1.6 is definately playable, only thing is it feels "delicate" when you're using it, you don't want to click HERE and THERE while THIS is loading etc, but I'm sure I'll get rougher as it as time goes on (had it installed about 2 weeks).
Oh, also I only get around 50fps, whereas I got 101 (max) on XP, this is more to do with the nvidia drivers than Cedega itself, though, and I'm sure if I actually bother to tweak the settings around I can maximize its performance.
Re:"DirectSound" equivalent is already on Linux (Score:3, Informative)
Doom3 does not use openal, and DOES use alsa, and I get 6 speaker positional sound out of it without any problems. Sounds great too
That said, for openal-based games, there's already a fast hardware-accelerated emu10k1-based implementation of openal at http://www.lost.org.uk/openal.html [lost.org.uk]
it's been a bit quiet recently, development-wise, but it works nicely with ut2004, and supports everything but earphones at the moment. According to my friends it's also given them a noticable FPS boost, although i haven't benchmarked it myself (mostly because i've got the ut2004 demo only, which it also works with but is a pain to benchmark)
you can even configure it to a non-standard speaker orientation if you're able to understand the math, but it has many pre-rolled configurations that suit common setups.
ashridah
Re:Direct3D on Linux? (Score:3, Informative)
Statefulness: For example, functions that operate on a texture of a certain stage in the multitexturing pipeline operate on the *current* one, whichever that may be. So you have to set the current texture stage of the API, do all your state changes, move to the next stage, etc. The changing of the current stage only affects the state of the API, it doesn't actually affect rendering in any way.
In D3D the SetTexture() and SetTextureStageState() functions take a texture stage number argument, so the same call, called at any point, will always do the same thing. This isn't the case for OpenGL!
Extensions: Nothing stops them from implementing them, no, but it just so happens that they don't, for the most part. In particular, anything shader-related is not implemented by the competitor. (NV_register_combiner, for example)
Vertex buffers: Vertex arrays do the same thing as DrawPrimitiveUP() (or so). Vertex buffers store the vertex data in the most convenient location for the hardware. In OpenGL, this might be ARB_vertex_buffer_objects, NV_vertex_array_range (older drivers), ATI_vertex_array_object (again, older drivers, plus some other extensions that build on this as well), compiled vertex arrays, and so on. They're all ever so slightly different, the drivers have their unpublished implementation quirks in different versions, etc. I hear OpenGL 2.0 improves this, which sounds good.
Another example are render-to-texture operations. In Direct3D you simply set the render target to something. In OpenGL, it depends whether you're in Windows/WGL, X11/GLX, or MacOS/AGL, plus there are extensions (WGL_ARB_render_texture, GLX_ATI_render_texture) in addition to the basic P-buffer extensions, which accelerate render target switches on certain hardware. So I have different renderpaths for different OSes, for different hardware. Lovely. Yeah, you can conditionally compile the OS-specific stuff, but it shouldn't be necessary.
Codepaths: yes, but in Direct3D those different codepaths share quite a bit of code, whereas the codepaths in my current OpenGL code are completely separate, because vertex submission, shading, etc. have to be handled differently for everything.
OpenGL might be lovely for Hollywood CGI type stuff where you have ONE set of hardware and need the finest-grained control possible, but for games which are supposed to suppord a vast array of hardware, Direct3D is just nicer.
~phil
Somethings haven't changed (Score:4, Informative)
You mean keep doing what the mass majority of gamers have been doing for years? Its that kind of attitude why Linux is so heavily shunned by casual gamers. Most people are not willing to expend the time and energy and reap the rewards of what you learn just to get UT2004 running in Linux when they can use the auto-installing and play it on Windows. People want EASY. People don't like having to change their video settings everytime they want to play a certain game.
The masses don't like to get told, 'you should learn our complex and difficult methods to achieve the same results using your simplicitic and traditional ways.' Its like telling the American people that the electorial college is inferior (and in a way it is) but even if its true, people aren't going to go along with it for the sake of ease. (Do you REALLY want to spend the time and effort necessary to constantly remain updated and educated on what goes on in the government while having a job/family/school/social life/playing video games/reading Slashdot/etc.?)
Re: ATI video drivers (Score:2, Informative)
A year or so ago, I got ~1300FPS with a 9200SE; with the current version, it's around ~750FPS (running on the same 800MHz P3 box).
Re:Direct3D on Linux? (Score:3, Informative)
The trouble with them is, because they store state information and such, they tend to be very bad for multi-pass operations, as you pretty much have to keep multiple copies of the same geometry around. I've already got more geometry than I'd like to have, so storing distinct copies of it for cel shading and shadowing/lighting is just not an option.
~phil
Re:Linux does not have game. (Score:3, Informative)
I don't want to dick around with a machine that I use basically as a gaming console - and you cannot tell me that my framerate will be as good under Linux - because it will not be.
I want to play my game and NOT take the extra "20" min involved - for each game I play that is 20 min too long. Not worth my time. I prefer to use the right tool for the right job. Linux is not the right tool for gaming. Sorry to burst your bubble.
Get your facts straight before posting... (Score:3, Informative)
What you're referring to is DirectX which is the framework comprising:
DirectPlay (networking), DirectInput (keyboard/mouse/joysticks), DirectSound (sound (duh...)), and DirectGraphics (2D rendering).
In each of these there's an analogous or similar platform under Linux and MacOS (which, amazingly enough, are the same things...).
Re:of course not (Score:3, Informative)
Re:Direct3D on Linux? (Score:3, Informative)
OpenGL is stateful because 3D hardware is, and OpenGL always tried to be a thin layer on top of the hardware. Unfortunately, as you've noticed, state leakage becomes a real problem as soon as you start trying to build anything beyond a single static scene. It's just too much bother to keep track of all the state variables you have to save and restore as you traverse render nodes, particularly when the traversal order isn't predetermined. That is why SGI developed Inventor, which takes care of managing the details of state variables so you don't have to. You specify which state you want to carry over between render nodes and Inventor takes care of making sure that's the only state that carries over. Inventor isn't open source, but Coin [coin3d.org] is, sort of (the license seems to imply the GPLed version can't be sold, which would be an "additional restriction", incompatible with GPL).
Anyway, there's Open Scene Graph [openscenegraph.org] which is entirely open, and considerably advanced beyond Inventor.
Re:Direct3D on Linux? (Score:1, Informative)
Re:Direct3D on Linux? (Score:3, Informative)
Re:games on Linus is fact... ho ho ho my first pos (Score:2, Informative)
That happened 4 years ago
"PS games == Linux games"
This is only PS games that YOU write== linux games.
Re:OpenGL is the Future (Score:1, Informative)
There are very few things you can do with DX90 and can't with OpenGL extensions [opengl.org]. And yes, OpenGL, and OpenGL extensions ARE a standard. DirectX is not.
You can actually find full-featured multi-platform 3D engines such as OGRE [ogre3d.org], that lets you choose between D3D or OpenGL at runtime. No 3D API dependence anymore.