Why Apple Should Port Games
DanTheMan writes "For every great game there is for Mac OS X, there are at least two for Windows. It's sad, but it's a fact. This article proposes a solution, and it's for Apple to port games. By the way, since the XBox 2 will use the PowerPC G5, it shouldn't be that difficult to port future XBox games to the Power Mac G5 and the iMac, both of which are 64-bit now. Would you buy a Mac if you could play Counterstrike Source and Half-Life 2? What other games are missing from Mac OS X?"
"With the things that x.org and friends are doing, is there some technical hurdle that opengl et al cannot compete on?"
Yes, very much so. Nvidia and ATI refuse to release full featured OpenGL drivers on the linux platform. DoomIII runs about 20% slower on linux because of nvididia drivers, ATI cards won't even PLAY doom3. UT2k4 is on linux, but it rusn slower because yet again, nvidia's poor quality drivers.
Ati BTW doesn't even have released versions of opengl drivers for linux, so they are even farther behind.
So far today, the only games coming out for linux are the ones who have authors who write cross platform games anyway. You won't start seeing ANY type of reasonable effort put into porting to linux from other game manufacturers until there is a reliable and fast driver for both ATI and nVidia cards.
Your ignorance is infinitely greater than you realize.
I unfortunately have to wonder what type of crack this guy was smoking. First of all, the XBox 2, is a Windows based PPC970 system. The developers kit is actually a version of Windows XP running on Power PC. This is not a miracle or surprising. If you remember, Windows NT ran just fine on PPC, MIPS, Alpha, x86 and originally on i860. XP is portable and should be no problem for Microsoft to port to anything they want to. It was designed for that in the first place.
.NET more than likely needed to be modified to support JIT PPC970 support, no big deal.
.NET code will need to be ported to something local on the OS X platform or they'll have to use an open source .NET implementation such as Mono and port all the other .NET features to Mono that are missing.
.NET, etc...
The key issue for porting Windows XP to another platform is the availability of PPC970 compilers. This is still a bit of an issue, but Microsoft does in fact employ one of the best non-multiprocessing compiler development teams on the market and has managed to make excellent compilers for x86, StrongARM/XScale, MIPS, Hitachi, and others. 64-bit Power PC should be quite simple compared to some others. Also, since Apple has released source to their 64-bit GCC, the basic PPC970 optimizations should be readily available to borrow and Microsoft can focus on further optimizations.
So, let's think for a moment what it would take to port a Windows based XBox game to the Mac OS X PowerMac G5.
First, the game would have to use a Windows emulation layer, or reimplement all the DirectX code to OpenGL.
Second,
Third, all Windows API code will need to be ported to Carbon or Cocoa. Maybe they can use Qt or something else to make the job a little easier.
Audio code will have to be ported from DirectX to CoreSound or another tool kit.
Or... wait....
If they port from XBox 2 to Windows XP, they keep Direct X, Direct Sound, Direct Show, Windows API,
There's no difference between porting from XBox 1 to Mac OS X and XBox 2. In fact, it's probably the same.
Porting from XBox to Windows makes sense, but really, who would bother porting from XBox to OS X when the Mac market just doesn't pay for games anyway. (It costs a lot more to port to X unless you used OpenGL than you can possibly profit)
Ahem, perhaps you didn't check very hard:
http://www.coderus.com/
This has been out for a while, for porters only granted; but that is a big step.
Stop and think for a long moment...
DirectX compatibility is only needed if you're simply recompiling for a new target. Most games abstract out the DirectX layer for their engine so they're not dealing with it directly (You'd be stupid to do anything else, really...) therefore it's only a small effort to provide a comparable OpenGL specific layer. Once you've done that, that's one less thing. Typically, most games are using FMOD, Miles, or SDL/OpenAL for their sound. That means the sound is taken care of. It's a minimal effort to make a version of user input code for SDL (your Linux and MacOS X choice...) to replace your DirectInput code. There's several cross-platform choices for network support and while it's an effort to make something work as a replacement for DirectPlay code, it's been done (I know, I've done it myself and helped produce a minimal wrapper layer to allow several pieces of code simply recompile for Linux.) What you speak of simply isn't really much of an impediment for anything except the smallest development studios producing valueware as they're coding strictly to DirectX because it costs them nothing at all.
The biggest impediment for most studios, typically, for going to PPC is that most games make assumptions about the order of bytes, etc. that are far, far removed from best practices. Assumptions that make for difficult migration of code. The same goes for going from 32 to 64 bits- many developers do things like assume pointers are the same size as ints and proceed to interchange them liberally.
If you're making a game for PPC64, those impediments go bye-bye for making a MacOSX game- and since MS is going to probably be suggesting that the games be made available for XP on x86, the code's probably going to be endian neutral as well.
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas