Saturday, October 9

A way for Linux to succeed as a gaming platform

If there's one thing where I have to concede the superiority of Windows to Linux, it is in the gaming world.  Not because DirectX is so much better than OpenGL or because the engines are better or anything fundamental to technology.  It's a 100% business decision, no one is willing to spend millions of extra dollars in game development, possibly to the detriment of gameplay, for the game to be cross-platform for the 1% of their population it will serve.  It's the same reason a lot of software and native hardware drivers are not available for Linux.  In most cases, the open source community writes the drivers they need for hardware and the projects are small enough that most hardware ends up getting support by people who need to do it in order to make their equipment work.  However, for large, complex software such as big title games, it's tough for open source developers to product equivalent products.  So for the most part, the gaming landscape for linux pretty much stinks.

There are a few major issues.  The number of different distributions is one of them.  With differences in dependencies and the fractured nature of the way linux is distributed, it is tough for a gaming vendor to predict all the different dependencies available to them.  There needs to be an abstraction layer that takes care of all this, but such an abstraction layer could definitely hinder performance.

Another issue is cohesiveness.  Just as there are lots of different dependencies on different distributions, there are lots of different choices as far as window and display managers.

There is, however, a way for Linux to succeed as a gaming platform and that's for hardware vendors like Nvidia and ATI to use the open source nature of Linux to their advantage and write their own "console" that runs on Linux.  They have already started doing this in a lot of the quick-boot media only distros that ship with some laptops.  You may be familiar with these if you have a computer where you can pop in a DVD and bring up a player without booting the entire operating system.  These players are often embedded into the chipsets and, more often than not, there's a Linux kernel running somewhere under the covers there.  Why not take that idea and give users a way to suspend their currently running session(regardless of hardware) to disk, and reboot their system in the "console" giving the user the opportunity to install and run gaming software titles.  This could work regardless of operating system, provide gaming vendors with the same consistency they now get with DirectX on Windows, give users nearly bare-metal performance since the system is devoting almost all its resources to the gaming environment with no interruption for overhead from OS services, and give all  users access to the full gambit of gaming titles regardless of operating system they are using.

I know what you're going to say, technically this is not gaming on Linux in the same way you may have thought about it previously.  But it is using the Linux kernel to provide a working system for a hardware vendor to work from that already provides a massive amount of hardware support, is low on resource consumption, inherently secure, and proven to work well in environments where optimum performance is a must.  It's already proven that it can work as a quick booting, media environment on numerous PCs, and everyone knows that the fact that it is open source means that game developers can optimize their code to the environment rather than having to guess at how Windows is doing something behind the scenes.

2 comments:

Mark A. Graybill said...

The way I see it is as a two-part problem. One part is the OS, and the need to get other processes out of the way when the user wants to turn the system over to a game or other high performance task.

The other part is a development environment that supports this lightweight section of the OS--doesn't rely on half a dozen scripting classes, high level frameworks, etc. to run the code. Yet still allows programmers the sort of features the high level tools give.

Many Linux distros have gotten really fat to stay in a features race with other OSes. What's needed for a lot of games is something like an embedded Linux with tools specifically for creating games to run on that, including tools for packaging it all up together. Then the user would just see it as booting to the game. Hardware detection would have to be robust, but then there's no Solla Salloo solution. ;)

Michael Nishizawa said...

Mark,
Agreed on both points. I actually think you have much more concisely described the issues. I think your first observation can be solved by a "suspend to disk and restart in gaming platform" idea. This gives the user the ability to stay working on whatever they were doing but still start a game.

As for the OS that runs the platform, something along the lines of Wubi would be perfect. It's not a true disk partition, it's installable via package or other installer, and you can restart into it and run like it's the regular machine.

As for booting straight into the game, I'm not sure that's necessary. It depends on how you represent it where it is launched. When I turn on my PS3 I don't necessarily expect it to go straight to the game. A navigation environment something like that wouldn't be so terrible but I agree that it makes sense to provide that sort of functionality in at some point for the sake of convenience.