Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #27051: No standard gaming APIs

Written by MistaED the 27 Jan 11 at 02:44. Category: Gaming. Related project: Nothing/Others. Status: New
Rationale
The typical GNU/Linux desktop is a smorgasbord of different source code packages and Application Programmer Interfaces (APIs) all rolled up into one neat package called a distribution. This is great but what if a game developer wants to target this platform and its many incarnations? There are many choices, some better and some worse than others but there isn't any focus and I believe that Ubuntu should pave the way forward and support first-grade APIs for game developers.

Currently Ubuntu supplies access to the Simple DirectMedia Library which is currently the most popular way of interfacing with Linux for real-time gaming and interactive media (see Doom 3, Quake 4 as examples). SDL is a high-quality library, but its drawbacks for moving forward is that the library isn't designed for direct hardware access and doesn't involve industry-wide acceptance like, for instance, the Khronos group API family. There isn't any first-grade support from Ubuntu either (it is located in the universe repository for instance).

Another preferred method is to use the Mesa Graphics Library for hardware access to accelerate the Open Graphics Library (OpenGL) however game and interactive media developers use APIs such as the X.Org display server directly by means through GLX/Xlib to get screen access which isn't ideal if Ubuntu chooses to use Wayland in future (and can be tedious to set up). Mesa is also under-developed currently for open source drivers and APIs and needs more time and resources to be fast/stable and feature-complete.

The audio stack in GNU/Linux has been notoriously known for over-engineering with many systems and APIs to access audio. Currently the preferred way is to use PulseAudio, however to my knowledge there is no 3D spacial support nor hardware acceleration through this path and it is a bit obtuse for game developers in particular to use.

This will promote the idea to standardise and focus on one API for Ubuntu to target for games and interactive media and will in-turn attract developers to the Ubuntu platform by simplifying the roadblocks to write high quality game titles and other interactive media which are seen on other operating system platforms.

39
votes
up equal down
Solution #1: First-grade support for Khronos APIs
Written by MistaED the 27 Jan 11 at 02:44.
The Khronos group are in charge of writing the specifications for open APIs which target things such as the Open Graphics Library (OpenGL) for 3D graphics or the Open Sound Library (OpenSL) for audio or OpenKODE for platform-agnostic access.

The current open source stack which follows the 'graphical' and 'compute' standards created by the Khronos group are inside the Mesa 3D graphics library, for instance, OpenGL, Open Vector Graphics (OpenVG) and the Open Compute Library (OpenCL) and are named 'state trackers.' The Embedded-System Graphics Library (EGL) functions as the interface between these APIs and the windowing system which is exactly what the Wayland Display Server is basing itself on.

It would be in Canonical's best interest to consider putting resources and developer time in such a project because currently it is still in the developing phase and not feature-complete especially in the driver stack which provides Mesa and its 'state trackers' hardware accelerated access. For example, the currently highest supported version of OpenGL support is 2.1 with only partial support for 3.x features (the latest OpenGL standard is 4.x).

The alternative for game developers right now is to rely on proprietary drivers coming from Nvidia and AMD to support their hardware to have stable access to OpenGL and OpenCL. Ubuntu has always been about freedom and open source solutions, however as it stands now the open source video drivers are not stable enough and lack features and performance to compete at this stage now.

Mesa will continue to move forward to solve this problem but it seems to not be at a fast enough pace and for Ubuntu to move forward I believe that this needs to be a huge priority not just for games and other interactive media but for the platform moving forward as a whole.

There are also other API standards like OpenKODE which is a platform-agnostic way of interfacing with the operating system for events, file I/O, etc. and plugs in very well with EGL and its family of graphical and audio APIs. This shouldn't be too hard to have official support as it layers over the top of POSIX quite well.

OpenSL seems to be the successor to the Open Audio Library (OpenAL) and Ubuntu would highly benefit from having first-grade support for this library as well, and it supports many profiles (Game, Phone, Music) which covers way more than OpenAL and can interface with other components like OpenMAX to supply hardware-acceleration. As far as I'm aware there are no serious open source projects which cover these APIs currently and I think that this should be changed as well.

These APIs fit very well for Ubuntu's eventual move to the Wayland Display Server as it is based entirely on Mesa and EGL, as well as Ubuntu's venture into mobile platforms, and will make a lot of game developers happy (and most likely other non-game developers too). If the effort is placed right now, I can see 5 years from now that the Ubuntu platform would be a highly compelling platform to develop first-grade interactive applications like games which run perfectly on the hardware.
31
votes
up equal down
Solution #2: Promote SDL to Ubuntu's main repository
Written by MistaED the 28 Jan 11 at 01:36.
The Simple DirectMedia Library (SDL) is a high-quality library and its the most popular library for creating games and interactive media for GNU/Linux systems.

Currently it is located in the universe repository and doesn't have first-grade support offered from Canonical.

It could be in Ubuntu's best interests to promote this library to be supported in the main repository and developed to a state where it is the preferred way of writing games and interactive media.

Some parts of the library aren't directly hardware-accelerated and simply 'wrap around' existing components of the Linux graphics/audio/system stack or are written entirely in software, so there needs to be development efforts to bring this library to have better back-ends. Perhaps it could wrap around the Khronos APIs/Wayland/Mesa if Ubuntu chooses to give first-grade support for that and in-turn directly accelerate existing games and interactive media written for SDL so code doesn't need to be rewritten for these.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
turbolad wrote on the 13 Feb 11 at 12:36
Good idea. I think this should be on the first page.

Lack of games for Linux is one reason why people can't switch over to Linux. You can dual-boot Windows and Linux, but it's inconvenient to boot Windows just to play games and Wine is always "hit and miss".

migueleonm wrote on the 22 Feb 11 at 22:21
Great. you are thinking commercially and that my friend is the way. If canonical wants to make profit this is a good step. Investing in this will bring money in the long term.

naryl wrote on the 10 Nov 11 at 13:00
Desura[1] has encountered a few problems while developing a client for Linux like no standard way to check if a package exists or install it using system's package manager. It's simple to make something for a single distribution but there should be a generic solution which should work on any GNU/Linux.

Since Desura is getting open sourced it has a potential to become a standard platform for distributing commercial games and I believe it's in Canonical's best interests to help Desura with their problems. Software Center is good but it's only for Ubuntu, it doesn't turn Linux into a gaming platform in consumers' minds.

naryl wrote on the 10 Nov 11 at 13:01
[1] http://desura.com


Post your comment