Difference between revisions of "StarCraft 2"

From ArchWiki
Jump to: navigation, search
(flag for archive: duplicates work of Wine AppDB community)
 
(48 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
[[Category:Gaming]]
 
[[Category:Gaming]]
 
[[Category:Wine]]
 
[[Category:Wine]]
{{out of date}}
+
[[ja:StarCraft 2]]
 +
{{Archive|This duplicates work of Wine AppDB community, should we have an article on every popular windows application too?|Talk:Wine}}
 +
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].
  
== Environment ==
+
== Installation ==
  
 
==== Packages ====
 
==== Packages ====
  
You need to [[Pacman|install]]:
+
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):
* {{Pkg|wine}}
 
* {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}
 
  
==== Configure Wine ====
+
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015
 +
 
 +
==== Configuration ====
 +
 
 +
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:
  
The sound in Starcraft 2 in Wine versions 1.3.25 and later works out of the box.
 
* Edit the registry
 
 
  $ regedit
 
  $ regedit
Go to HKEY_CURRENT_USER/Software/Wine/Direct3D
 
To create new entries: Right-click on Direct3D, select New -> String Value
 
DirectDrawRenderer      opengl
 
Multisampling          disabled
 
OffscreenRenderingMode  pbuffer
 
PixelShaderMode        enabled
 
RenderTargetLockMode    readtex
 
StrictDrawOrdering      disabled
 
UseGLSL                disabled
 
VertexShaderMode        hardware
 
VideoMemorySize        1536 (Change this to however much memory your card has)
 
* For Map-Editor:
 
** The latest winetricks can be found at [http://winetricks.org/winetricks http://winetricks.org/winetricks], download and start:
 
$ sh winetricks vcrun2005 vcrun2008
 
* To get rid of some warnings that may or may not matter on x86_64, you may want to install {{Pkg|lib32-mpg123}} and {{Pkg|lib32-jack}} available in [[multilib]].
 
  
Also install {{AUR|lib32-audiofile}} and {{AUR|lib32-esound}} from [[AUR]].
+
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).
 +
 
 +
* If the Battle.net App doesn't work, use a new Wine prefix.
 +
* '''If you are asked to install Gecko, then click Install to do so.'''
 +
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.
  
* Don't emulate a virtual desktop for the installer.
+
==== Installing with the Blizzard App (former Battle.net App) ====
* If the installer doesn't work, backup and remove your .wine directory.
 
* If you are asked to install Gecko, then click install to do so.
 
* If the installer hangs while downloading patch 1.03, install ie6, and set the wine version to windows XP:
 
$ sh winetricks ie6
 
$ winecfg
 
or on x64
 
$ WINEPREFIX=~/win32 sh winetricks ie6
 
$ winecfg
 
  
Go to ''Applications'', set ''Windows Version'' to "Windows XP"
+
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)
  
== Installing StarCraft II ==
+
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}
  
 
==== Installing from DVD ====
 
==== Installing from DVD ====
 +
 +
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}
  
 
* Mount DVD/DVD Image, (unhide invisible data), for example:
 
* Mount DVD/DVD Image, (unhide invisible data), for example:
Line 56: Line 41:
 
  $ wine start /unix /media/dvd/Installer.exe
 
  $ wine start /unix /media/dvd/Installer.exe
  
==== Blizzard downloader ====
+
==== Playing StarCraft II ====
  
* Get the downloader from your [http://battle.net battle.net] account (you need to log in).
+
Launch the game from the Battle.net App.  
* You may want to go to ''View > Preferences'' and check "Don't throttle background download".
+
If the game crashes see troubleshooting section.
* During the install, you will need about twice the space of the installed game, since it downloads to a temporary directory (of your choice) before installing. This directory can be deleted after install.
 
  
==== Starcraft 2 demo ====
+
== Hints for Performance Tuning ==
  
https://us.battle.net/account/sc2-demo.html
+
* {{ic|Ctrl+Alt+F}} shows FPS.
The download is 1.56 GB. You need to have a battle.net account.
+
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).
 +
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].
 +
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.
 +
* If you have problems updating the game and see the following in the output:
 +
{{bc|<nowiki>Agent started on port #6882
 +
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"
 +
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.
 +
Registered Event: "shutdown event"
 +
Registered Event: "database flush event"
 +
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch
 +
Post Data:
 +
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version>
 +
DownloadTo failed error: 0 of article:  from:
  
The demo got replaced by [http://us.battle.net/sc2/en/blog/3250656 StarCraft II: Starter Edition].
+
DownloadTo failed error: 0 of article:  from:
  
== Playing StarCraft II ==
+
DownloadTo failed error: 0 of article:  from:</nowiki>}}
 
+
Launch Agent.exe --nohttpauth:
  $ cd .wine/drive_c/Program\ Files/StarCraft\ II/
+
  $ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth
$ wine start StarCraft\ II.exe  
+
You can now restart the Battle.net App. The updater should proceed smoothly.
 
 
Or use the Starcraft II icon, but that'll make it more difficult to troubleshoot in case you have problems.
 
  
== Hints for Performance Tuning ==
+
==== Unit Preloader ====
 +
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.
  
* {{ic|Ctrl+Alt+f}} shows FPS
+
== Hints for advanced hotkeys settings ==
* Launching the game with the -opengl flag has been reported to increase performance. (This may be specific to the mac version.)
 
* Disabling Shader in wine could help, if FPS is too low. (It may also cause the game to not work at all. Again, possibly only mac.)
 
* Make sure that you are not using old graphics drivers. Nvidia drivers should be 256.35 or later (extra/nvidia is up to date).
 
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here]
 
  
== x86_64 ==
+
==== Preliminary ====
 +
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:
 +
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]
 +
* [https://github.com/bobo38/TheCoreLite TheCore Lite]
  
If you are running a 64bit version of Arch Linux, you may have trouble getting the updating done. Since StarCraft 2 uses Internet Explorer to render all the HTML pages, you need to have Internet Explorer installed. However, by the installer of IE6 will warn you that 64bit is not supported. By default, if you have created your wine configuration directory ({{ic|~/.wine}}), it will be set to 64 bit. To overcome this problem, you can either recreate your {{ic|~/.wine}} configuration, or if you wish to keep your current {{ic|~/.wine}} configuration see the alternative method below. If you wish to recreate your {{ic|~/.wine}} configuration simply remove the {{ic|~/.wine}} directory, add {{ic|1=export WINEARCH="win32"}} to your {{ic|~/.bashrc}}, logout of X, login once again and launch wine. It should create a {{ic|~/.wine}} folder. Next install ie6 with
+
Some other unmaintained options:
$ winetricks ie6
+
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].
 +
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]
  
More information can be found [https://bbs.archlinux.org/viewtopic.php?pid=806725#p806725 here].
+
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.
  
=== Alternative method: updating while keeping your 64bit ~/.wine directory ===
+
==== Rapid Fire Hotkey throughput ====
 +
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.
  
This method uses a separate wine directory installed as 32bit.  So the first step is to setup this alternate wine configuratoin.  The easiest way to do this is to install a wine configuration for a separate user. You do not need to logout for this, just open up your terminal of choice and:
+
To apply the settings:
$ login alternateuser
+
  $ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second>
or if you're going to use root:
 
$ su
 
Enter password, remove any already existing wine configuration supposing you do not use wine from this user, then set wine to use 32bit architecture and generate the configuration:
 
$ export WINEARCH="win32"
 
$ winecfg
 
Install/update the wine configuration.  No other settings need to be set after updating so you can just close the wine configuration window. Then use winetricks to install ie6:
 
$ winetricks ie6
 
When that's done, use the new configuration to run Starcraft II.exe from your user's 64bit /home/user/.wine directory where Starcraft 2 is installed:
 
  $ wine /home/user/.wine/drive_c/Program\ Files\ \(x86\)/Starcraft\ II/Starcraft\ II.exe
 
This will run the updater/patcher installing all the patch files to your 64bit ~/.wine directory using the alternate user's 32bit .wine directory containing ie6. Close the updater when it's finished and you can then remove the new 32bit .wine configuration or keep it for later updates.  Now you can go back to playing from your regular user using 64bit wine.
 
  
== Patch 1.5.0 ==
+
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}
 +
{{Tip| {{ic|xset q}} let you know the current X settings}}
  
* Intel HD Graphics 3000 have increased stability and gained around 10FPS, however you have to set
+
==== Enable double-key Rapid Fire Hotkey behaviour ====
$ wine regedit
+
Fancy double-key Rapid Fire Trick are not possible by default for Linux.
Go to HKEY_CURRENT_USER/Software/Wine/Direct3D
+
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.
VideoMemorySize        128
+
{{Warning|This double key repeat usage for RapidFire inject is no longer possible since LoTV release}}
Otherwise it won't run and will exit with errors about too low video VRAM.
 
  
* Problems with updating
+
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====
Start game and wait for updating to start.
+
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.
$ wine "StarCraft II.exe"
+
This does not work by default under Linux.
When agent fails with:
+
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].
{{bc|<nowiki>Agent started on port #6882
+
Hereafter an example with "Backspace" character.
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.1199\Agent.exe" applicationName="Battle.net Update Agent"
+
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.1199\Agent.exe'.
 
Registered Event: "shutdown event"
 
Registered Event: "database flush event"
 
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch
 
Post Data:
 
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version>
 
DownloadTo failed error: 0 of article:  from:
 
  
DownloadTo failed error: 0 of articlefrom:
+
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.
 +
You may consider tune your .SC2Hotkeys file with one of those command lines:
 +
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys                        # replacement of CapsLock by BackSpace
 +
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys                # easy command copy
 +
  $ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys  # this one copies any modifier with CapsLock to equivalent with BackSpace
  
DownloadTo failed error: 0 of article:  from:</nowiki>}}
+
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}
Launch Agent.exe --nohttpauth
 
$ wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth
 
Start StarCraft II again to re-launch updater:
 
$ wine "StarCraft II.exe"
 
  
== Troubleshooting ==
+
==== Use temporary XKB options ====
  
* Game crashes when completing bonus objectives
+
This tip could be used to perform some modifications:
If the game consistently crashes when completing bonus objectives, the reason might be that wine is missing the Arial font (source: http://eu.battle.net/sc2/en/forum/topic/6892929829).
+
* map CapsLock to Backspace with {{ic|1=caps:backspace}}
  $ pacman -S winetricks
+
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}
$ winetricks corefonts
+
* turn CapsLock into an additional Control key with {{ic|1=caps:ctrl_modifier}}
Alternatively, copy Arial.TTF into ~/.wine/drive_c/windows/Fonts.
+
  $ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"
* For some, the game crashes upon exit. (There seems to be more issues with ati cards than nvidia.)
+
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}
* For some, in-gamechange of resolution does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.
+
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}
* Graphics problems (No 3D background in menu, blue non-texturized units and other glitches) launch with the command below. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II
+
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"
force_s3tc_enable=true wine StarCraft II.exe
 
* If updates don't seem to work at all try to apply them manually. You can download European version patches here: http://eu.battle.net/support/en/article/starcraft-ii-patch-information. Check the bottom of that page for other regions. Then you execute the patch with wine.
 
* Be sure to have libjpeg6 installed. Otherwise, the updater won't work.
 
  
* Flickering lights emitted from SCV's thrusters and other light sources (see: http://www.youtube.com/watch?v=tsaEd-dTAlQ) may be because of missing registry entries:
+
==== Enable Scrollclick ====
{{bc|1=[HKEY_CURRENT_USER\Software\Wine\Direct3D]
+
Some scrollclick demo videos:
"DirectDrawRenderer"="opengl"
+
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]
"Multisampling"="disabled"
+
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]
"OffscreenRenderingMode"="fbo"
 
"PixelShaderMode"="enabled"
 
"RenderTargetLockMode"="readtex"
 
"StrictDrawOrdering"="disabled"
 
"UseGLSL"="disabled"
 
"VideoMemorySize"="128"}}
 
  
As told here with explanation for variables:
+
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.
http://wiki.winehq.org/UsefulRegistryKeys
+
First change scroll fonction to "forward mouse button" and "back mouse button":
 +
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"
 +
Then add alternate key SCII hotkeys for:
 +
* Global=>Unit Management=>Choose Ability or AI target
 +
* Global=>Unit Management=>Smart Command
 +
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}
 +
{{Warning|scrollclick applications previously demoed could be better executed with RapidFire Key method}}
 +
{{Tip|you may consider using this tip to use wheel for previous/next subgroup browsing}}
 +
{{Tip|for more 5+ button, you may consider use {{ic|evrouter}} to apply the same tip and map buttons to other usages}}
  
It seems to fix the problem.
+
== Troubleshooting ==
 +
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.
 +
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.
 +
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.
 +
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.
  
 
== See also ==
 
== See also ==
  
* [http://appdb.winehq.org/objectManager.php?sClass=version&iId=20882 StarCraft II: Wings of Liberty (Retail)] (WineHQ AppDB)
+
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)
 
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)
 
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)
 
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)
 
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)
Line 174: Line 156:
 
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)
 
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)
 
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)
 
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)
* There used to be a link here about hotkey customization. Instead, [http://eu.battle.net/sc2/en/forum/topic/443018939#15 here is a link telling us that's not allowed.] (battle.net EU forums)
 

Latest revision as of 19:10, 29 November 2017

Gnome-colors-add-files-to-archive.pngThis article is being considered for archiving.Gnome-colors-add-files-to-archive.png

Reason: This duplicates work of Wine AppDB community, should we have an article on every popular windows application too? (Discuss in Talk:Wine)

StarCraft II is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.

Installation

Packages

You need to install wine, lib32-libjpeg-turbo, lib32-libpng, lib32-gnutls and lib32-libldap. If you are using PulseAudio, install lib32-libpulse and lib32-alsa-plugins available in multilib. Optionally, instead of regular wine, you might prefer wine-staging - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use winetricks and install the following components (to use the Map Editor and avoid crashes on certain system configurations):

$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015

Configuration

If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:

$ regedit

Go to HKEY_CURRENT_USER/Software/Wine/Direct3D (right-click on Wine and New -> Key, Direct3D, Enter, if it doesn't exist) right-click on Direct3D (if such a key doesn't exist, right-click on Wine, New -> Key, Direct3D, OK), select New -> String Value, VideoMemorySize, which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).

  • If the Battle.net App doesn't work, use a new Wine prefix.
  • If you are asked to install Gecko, then click Install to do so.
  • If the Battle.net App window is white, open winecfg, go to Applications and set Windows Version to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.

Installing with the Blizzard App (former Battle.net App)

Recent SC2 versions require the Blizzard App to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)

Note: You need to install lib32-gnutls in order to use the online-mode of the Blizzard App.

Installing from DVD

Note: If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.
  • Mount DVD/DVD Image, (unhide invisible data), for example:
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)
$ mount -o loop,ro,unhide,uid=your_id starcraft.iso /media/dvd (for an image) 
  • Start the installer:
$ wine start /unix /media/dvd/Installer.exe

Playing StarCraft II

Launch the game from the Battle.net App. If the game crashes see troubleshooting section.

Hints for Performance Tuning

  • Ctrl+Alt+F shows FPS.
  • Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).
  • Edit the variables.txt in your My Documents/Starcraft II/ following the guide here.
  • If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.
  • If you have problems updating the game and see the following in the output:
Agent started on port #6882
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.
Registered Event: "shutdown event"
Registered Event: "database flush event"
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch
Post Data:
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version>
DownloadTo failed error: 0 of article:  from:

DownloadTo failed error: 0 of article:  from:

DownloadTo failed error: 0 of article:  from:

Launch Agent.exe --nohttpauth:

$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth

You can now restart the Battle.net App. The updater should proceed smoothly.

Unit Preloader

SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load all units, animations and effects, causing high RAM usage, but prevents loading the data (and massive framerate drops) during multiplayer matches. Open Arcade and search for Unit Preloader. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.

Hints for advanced hotkeys settings

Preliminary

Have a look at projects aiming at creating more ergonomic hotkeys for SCII:

Some other unmaintained options:

Rapid Fire Hotkeys are implemented in those hotkeys settings.

Rapid Fire Hotkey throughput

Xorg keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.

To apply the settings:

$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second>
Tip: xset r rate get X back to default autorepeat settings
Tip: xset q let you know the current X settings

Enable double-key Rapid Fire Hotkey behaviour

Fancy double-key Rapid Fire Trick are not possible by default for Linux. The xkb_repeat git project may help you unlock this behaviour, providing patches to recompile your X server.

Warning: This double key repeat usage for RapidFire inject is no longer possible since LoTV release

Enable CapsLock as a Rapid Fire Hotkey with xmodmap

TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey. This does not work by default under Linux. To make it work, CapsLock key could be remapped to another key with xmodmap. Hereafter an example with "Backspace" character.

$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"

The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used. You may consider tune your .SC2Hotkeys file with one of those command lines:

$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys                         # replacement of CapsLock by BackSpace
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys                # easy command copy
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys   # this one copies any modifier with CapsLock to equivalent with BackSpace
Tip: xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" to get back to default CapsLock behavior, once you exit the game

Use temporary XKB options

This tip could be used to perform some modifications:

  • map CapsLock to Backspace with caps:backspace
  • swap left Control and Alt keys with ctrl:swap_lalt_lctl
  • turn CapsLock into an additional Control key with caps:ctrl_modifier
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"
Tip: All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst
Tip: to get back to the default XKB options, once you exit the game you can use the following code in a script
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"

Enable Scrollclick

Some scrollclick demo videos:

Using Xmodmap, it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick. First change scroll fonction to "forward mouse button" and "back mouse button":

$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"

Then add alternate key SCII hotkeys for:

  • Global=>Unit Management=>Choose Ability or AI target
  • Global=>Unit Management=>Smart Command
Tip: xmodmap -e "pointer = default" resets to default mouse functionality
Warning: scrollclick applications previously demoed could be better executed with RapidFire Key method
Tip: you may consider using this tip to use wheel for previous/next subgroup browsing
Tip: for more 5+ button, you may consider use evrouter to apply the same tip and map buttons to other usages

Troubleshooting

  • You may want to start the game without the launcher: cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support (or Support64 for the 64-bit version) and wine SC2Switcher.exe - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.
  • If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check Launch 32-bit client (instead of 64-bit), or uncheck it if it's already checked.
  • For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.
  • Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: force_s3tc_enable=true wine SC2Switcher.exe. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your ~/.drirc file to enable this setting permanently for all apps. Using driconf, you may just enable this setting with a simple GUI.

See also