Difference between revisions of "Gaming"

From ArchWiki
Jump to: navigation, search
(Getting games: Arch-Games is dead https://bbs.archlinux.org/viewtopic.php?pid=995702#p995702)
(merge some information from moved "Games" article, clean up a bit)
Line 2: Line 2:
 
{{i18n|Gaming}}
 
{{i18n|Gaming}}
  
==Running games in Arch==
+
{{Article summary start}}
 +
{{Article summary text|Provides a list of popular GNU/Linux games, categorized by genre.}}
 +
{{Article summary heading|Related}}
 +
{{Article summary wiki|Common Applications/Games}}
 +
{{Article summary wiki|Netbook Games}}
 +
{{Article summary end}}
  
For the most part, games will work right out of the box in Arch Linux with possibly better performance than on other distributions due to compile time optimizations. However, some special setups may require a bit of configuration or scripting to make games run as smoothly as desired. For instance, running a multi-screen setup may lead to problems with fullscreen games. In such a case, [[#Starting_games_in_a_seperate_X_server|running a second X server]] is one possible solution. Another solution may be found in the [[NVIDIA#Gaming_using_Twinview|NVIDIA article]] (may also apply to non-NVIDIA users).
+
This page only contains information about running games and related system configuration tips. For lists of popular games for GNU/Linux see [[Common Applications/Games]] and [[Netbook Games]].
  
=== Keyboard Grabbing ===
+
== Game Environments ==
Some games grab the keyboard, noticeably preventing you from switching windows (also known as alt-tabbing). Download [http://aur.archlinux.org/packages.php?ID=23052 sdl-nokeyboardgrab] to gain the ability to use keyboard commands while in SDL games. If you wish to turn it up to 11, you can disable keyboard grabbing at X11 level using [http://aur.archlinux.org/packages.php?ID=39351 libx11-nokeyboardgrab].
+
  
{{Note | SDL is known to sometimes not be able to grab the input system. In such a case, it may succeed in grabbing it after a few seconds of waiting.}}
+
Different environments exist to play games in Linux:
  
==Getting games==
+
* Native – Games written for Linux (usually Free & Open Source).
 +
* Browser – you need only browser and Internet connection to play this games.
 +
** Plugin-based – you need to install plugin to play.
 +
*** [[Java]] Webstart – to install cross-platform games very easily.
 +
*** [[Flash]] games are very common on the Web.
 +
*** Unity – specialized plugin for browser, currently works only in [[Google Chrome]]. Most games are commercial.
 +
** '''HTML 5''' games use brand new canvas and WebGL technologies and work in all modern browsers but can be '''very''' slow on weak machines.
 +
* Specialized environments (software emulators) – you should first install emulator, then find games yourself (most are protected by Copyright!)
 +
** [[Wine]] – allows running of some Windows games.
 +
** [http://www.codeweavers.com/ Crossover Games] - members of the Codeweavers team are prime supporters of Wine. Using Crossover Games makes the installation & setting up of some games easier, more reliable & even possible, when compared to using other methods.  Crossover is an inexpensive commercial product, which also provides a [http://www.codeweavers.com/support/forums/ forum] where the developers are very much involved in the community. 
 +
** [[Cedega]] – game-oriented Wine derivative. Its packaged version is not free of charge unlike its CVS version.
 +
** [[DosBox]] – DOS games
 +
** [[ScummVM]] – lots of old adventure games
 +
* Hardware emulators – emulate the whole device instead of software environment. The same thing about Copyright here.
  
While a lot of games can currently be found in the official repositories, not all current Linux games are packaged there. Some of them can only be found on [[AUR]].
+
== Getting games ==
 +
=== Native ===
 +
A good number are available in the [[Official repositories]] or in the [[AUR]].  [[Loki]] provides installers for several games. [[Desura]] can be considered good source of games (if you don't care about security and bugs too much).
  
== Executing Games ==
+
=== Wine ===
 +
* Centralized source of information about running games (and other applications) in Wine is [http://appdb.winehq.org/%7CWine AppDB].
 +
* See also [[Category:Wine_(English)]].
  
 +
=== Flash ===
 +
Several huge flash games portals exists, among them are:
 +
* https://armorgames.com/
 +
* https://www.kongregate.com/
 +
* https://www.newgrounds.com/
 +
 +
=== Java ===
 +
* Lots of games smaller than 4kb (some are real masterpieces of game design) can be found at http://www.java4k.com.
 +
* https://www.pogo.com/ – biggest casual Java gaming portal
 +
* [http://www.javagametome.com/ The Java Game Tome] - huge database of primarily casual games
 +
 +
== Running games in Arch ==
 
Certain games or game types may need special configuration to run or to run as expected.
 
Certain games or game types may need special configuration to run or to run as expected.
 +
For the most part, games will work right out of the box in Arch Linux with possibly better performance than on other distributions due to compile time optimizations. However, some special setups may require a bit of configuration or scripting to make games run as smoothly as desired.
  
=== Starting games in a separate X server ===
+
=== Multi-screen setups ===
 +
Running a multi-screen setup may lead to problems with fullscreen games. In such a case, [[#Starting_games_in_a_seperate_X_server|running a second X server]] is one possible solution. Another solution may be found in the [[NVIDIA#Gaming_using_Twinview|NVIDIA article]] (may also apply to non-NVIDIA users).
  
 +
=== Keyboard Grabbing ===
 +
Some games grab the keyboard, noticeably preventing you from switching windows (also known as alt-tabbing). Download [http://aur.archlinux.org/packages.php?ID=23052 sdl-nokeyboardgrab] to gain the ability to use keyboard commands while in SDL games. If you wish to turn it up to 11, you can disable keyboard grabbing at X11 level using [http://aur.archlinux.org/packages.php?ID=39351 libx11-nokeyboardgrab].
 +
 +
{{Note | SDL is known to sometimes not be able to grab the input system. In such a case, it may succeed in grabbing it after a few seconds of waiting.}}
 +
 +
=== Starting games in a separate X server ===
 
In some cases like those mentioned above, it may be necessary or desired to run a second X server. Running a second X server has multiple advantages such as better performance, the ability to "tab" our of your game by using CTRL-ALT-F7 / CTRL-ALT-F8, no crashing your primary X session (which may have open work) in case a game conflicts with the graphics driver. To start a second X server (using [http://alientrap.org/nexuiz/ Nexuiz] as an example) you can simply do:  
 
In some cases like those mentioned above, it may be necessary or desired to run a second X server. Running a second X server has multiple advantages such as better performance, the ability to "tab" our of your game by using CTRL-ALT-F7 / CTRL-ALT-F8, no crashing your primary X session (which may have open work) in case a game conflicts with the graphics driver. To start a second X server (using [http://alientrap.org/nexuiz/ Nexuiz] as an example) you can simply do:  
 
  xinit /usr/bin/nexuiz-glx -- :1
 
  xinit /usr/bin/nexuiz-glx -- :1
Line 44: Line 85:
 
  $ ~/game.sh nexuiz-glx
 
  $ ~/game.sh nexuiz-glx
  
== Adjusting mouse detections ==
+
=== Adjusting mouse detections ===
 
+
 
For games that require exceptional amount of mouse skill, adjusting the response rate can help improve accuracy.  Read more [[Mouse_Polling_Rate|here]].
 
For games that require exceptional amount of mouse skill, adjusting the response rate can help improve accuracy.  Read more [[Mouse_Polling_Rate|here]].
  
 
== See also ==
 
== See also ==
 
 
* [[Games]]
 
* [[Games]]
 
* [[Xorg]]
 
* [[Xorg]]
 
* [[NVIDIA#Gaming_using_Twinview]]
 
* [[NVIDIA#Gaming_using_Twinview]]
 +
 +
== External links ==
 +
* [http://www.freegamer.blogspot.com/ Free Games] - Excellent blog about FOSS games
 +
* [http://www.linuxgames.com/ LinuxGames] - News on linux games
 +
* [http://freegamer.blogspot.com/ Free Gamer] - Open source games blog
 +
* [http://forum.freegamedev.net/ FreeGameDev] - Free/open source game development community
 +
* [http://libregamewiki.org/ Libregamewiki] - Free software games wiki
 +
* [https://fedoraproject.org/wiki/SIGs/Games#Gaming_News_sites SIG/Games] - OS/Linux gaming news sites and lists at Fedora's wiki
 +
* [http://live.linux-gamers.net live.linux-gamers] - Arch-based live gaming distro

Revision as of 12:13, 21 January 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

This page only contains information about running games and related system configuration tips. For lists of popular games for GNU/Linux see Common Applications/Games and Netbook Games.

Game Environments

Different environments exist to play games in Linux:

  • Native – Games written for Linux (usually Free & Open Source).
  • Browser – you need only browser and Internet connection to play this games.
    • Plugin-based – you need to install plugin to play.
      • Java Webstart – to install cross-platform games very easily.
      • Flash games are very common on the Web.
      • Unity – specialized plugin for browser, currently works only in Google Chrome. Most games are commercial.
    • HTML 5 games use brand new canvas and WebGL technologies and work in all modern browsers but can be very slow on weak machines.
  • Specialized environments (software emulators) – you should first install emulator, then find games yourself (most are protected by Copyright!)
    • Wine – allows running of some Windows games.
    • Crossover Games - members of the Codeweavers team are prime supporters of Wine. Using Crossover Games makes the installation & setting up of some games easier, more reliable & even possible, when compared to using other methods. Crossover is an inexpensive commercial product, which also provides a forum where the developers are very much involved in the community.
    • Cedega – game-oriented Wine derivative. Its packaged version is not free of charge unlike its CVS version.
    • DosBox – DOS games
    • ScummVM – lots of old adventure games
  • Hardware emulators – emulate the whole device instead of software environment. The same thing about Copyright here.

Getting games

Native

A good number are available in the Official repositories or in the AUR. Loki provides installers for several games. Desura can be considered good source of games (if you don't care about security and bugs too much).

Wine

  • Centralized source of information about running games (and other applications) in Wine is AppDB.
  • See also.

Flash

Several huge flash games portals exists, among them are:

Java

Running games in Arch

Certain games or game types may need special configuration to run or to run as expected. For the most part, games will work right out of the box in Arch Linux with possibly better performance than on other distributions due to compile time optimizations. However, some special setups may require a bit of configuration or scripting to make games run as smoothly as desired.

Multi-screen setups

Running a multi-screen setup may lead to problems with fullscreen games. In such a case, running a second X server is one possible solution. Another solution may be found in the NVIDIA article (may also apply to non-NVIDIA users).

Keyboard Grabbing

Some games grab the keyboard, noticeably preventing you from switching windows (also known as alt-tabbing). Download sdl-nokeyboardgrab to gain the ability to use keyboard commands while in SDL games. If you wish to turn it up to 11, you can disable keyboard grabbing at X11 level using libx11-nokeyboardgrab.

Note: SDL is known to sometimes not be able to grab the input system. In such a case, it may succeed in grabbing it after a few seconds of waiting.

Starting games in a separate X server

In some cases like those mentioned above, it may be necessary or desired to run a second X server. Running a second X server has multiple advantages such as better performance, the ability to "tab" our of your game by using CTRL-ALT-F7 / CTRL-ALT-F8, no crashing your primary X session (which may have open work) in case a game conflicts with the graphics driver. To start a second X server (using Nexuiz as an example) you can simply do:

xinit /usr/bin/nexuiz-glx -- :1

This can further be spiced up by using a seperate X configuration file:

xinit /usr/bin/nexuiz-glx -- :1 -xf86config xorg-game.conf 

A good reason to provide an alternative xorg.conf here may be that your primary configuration makes use of NVIDIA's Twinview which would render your 3D games like Nexuiz in the middle of your multiscreen setup, spanned across all screens. This is undesirable, thus starting a second X with an alternative config where the second screen is disabled is advised.

A game starting script making use of Openbox for your home directory or /usr/local/bin may look like this:

$ cat ~/game.sh
if [ $# -ge 1 ]; then
  game="`which $1`"
  openbox="`which openbox`"
  tmpgame="/tmp/tmpgame.sh"
  DISPLAY=:1.0
  echo -e "${openbox} &\n${game}" > ${tmpgame}
  echo "starting ${game}"
  xinit ${tmpgame} -- :1 -xf86config xorg-game.conf || exit 1
else
  echo "not a valid argument"
fi

So after a chmod +x you would be able to use this script like:

$ ~/game.sh nexuiz-glx

Adjusting mouse detections

For games that require exceptional amount of mouse skill, adjusting the response rate can help improve accuracy. Read more here.

See also

External links