Crysis 2 (1.9) on Linux

Table of contents

Note

This document provides all technical details to play Crysis 2 (patched with 1.9) on Linux. Tests were done on Ubuntu Precise 12.04.4 LTS. I did my tests using the Crysis2.exe 1.9 crack provided by Skidrow.

1   Youtube video

See 'http://youtu.be/39e-bGW5z6M' to see that the game is playable.

2   Build Wine 1.7.15

2.1   Wine 1.7.15

  • Download wine 1.7.15 sources

    wget http://prdownloads.sourceforge.net/wine/wine-1.7.15.tar.bz2
    
  • Decompress the downloaded tarball:

    tar xjf wine-1.7.15.tar.bz2
    
  • Go to wine directory:

    cd wine-1.7.15
    
  • Apply the following patches

    • Apply the well-known double buffer patch:

      wget http://www.davidgis.fr/download/wine/patches/double_buffer.patch -O - |  patch -p1
      
    • A changeset has to be reversed. We have to apply the patch below else there will be issues (black screen, flickering screen...):

      wget http://www.davidgis.fr/download/wine/patches/reversed_pixel.patch -O - | patch -p1 -R
      
  • Now build wine. Choose a new prefix if another version of wine is still installed on your PC.:

    ./configure --prefix=/opt/wine/apps/Crysis_2
    make
    make install
    
  • If you set a new prefix for wine then update your PATH. Write the following file:

    cat << _EOF_ > Crysis_2.cfg
    # Replace '/opt/wine/apps/Crysis_2/bin' by the /patch/where/wine/1.7.15/is/installed (refer to prefix above)
    export PATH=/opt/wine/apps/Crysis_2/bin:$PATH
    # Replace the path below by the path where you want to install Crysis 2
    export WINEPREFIX=/opt/wine/data/Crysis_2
    export LD_LIBRARY_PATH=/opt/wine/apps/Crysis_2/lib:$LD_LIBRARY_PATH
    _EOF_
    
  • Source this file:

    source Crysis_2.cfg
    

2.2   Winetricks

  • If you don't have winetricks then download it:

    wget http://winetricks.org/winetricks
    chmod +x winetricks
    
  • Install Visual C++ 2008 and Visual C++ 2010:

    ./winetricks -q vcrun2008 vcrun2010
    

3   Install Crysis 2 + patch 1.9

4   Skips intro, Load save game

You can't load save game if your resolution settings are too high. The workaround is to lower resolution settings. Your save game are located in the (linked/virtual) folder My Documents/Crysis2. For wine the virtual folder My Documents is your $HOME folder. Using winecfg you can bypass this value. I set My Documents to /opt/wine/data/Crysis_2. For this case the expected folder My Documents/Crysis2 is /opt/wine/data/Crysis_2/Crysis_2

winecfg.png

Note

Steps listed above could be easily done by writting a shell script (see below). You mave have to update it for your own needs.

Here is the its content:

# Where wine binaries are located
#/opt/wine/apps/Crysis/bin
# So I put it at the beginning of my PATH
export PATH=/opt/wine/apps/Crysis/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
export LD_LIBRARY_PATH=/opt/wine/apps/Crysis/lib:/usr/local/lib:/usr/lib
# My Wineprefix -- where Crysis 2 is located/installed
# You may have to update this path below
export WINEPREFIX=/opt/wine/data/Crysis

# We need to keep low settings for resolution help it is not doable to load save games
# Resolutions can be set to highest values later ingame while playing
#  content was downloaded from "http://www.crydev.net/viewtopic.php?f=311&t=70529&view=previous"
cat << _EOF_ > /opt/wine/data/Crysis/Crysis2/game.cfg
-- [Game-Configuration]
-- Attention: This file is re-generated by the system! Editing is not recommended!
r_Driver = "DX9"
r_fullscreen = 1
r_VSync = 1
r_Height = 1280
r_Width = 1024
--sys_spec = 1
------------------------------------------------- INTRO, CONTROLS, FOV
g_enableInitialLoginScreen = 0
g_skipIntro = 1
cl_crouchtoggle = 1
cl_zoomToggle = 1
i_mouse_smooth = 0
cl_fov = 72
pl_movement.power_sprint_targetFov = 76
------------------------------------------------- ANTI-ALIASING
r_FSAA = 0 / 1
-- FSAA 8x 8xQ 16x 16xQ
r_FSAA_quality = 2 8 4 8
r_FSAA_samples = 4 0 4 2
-- FSAA Dx10 8x 8xQ 16x 16xQ
r_FSAA_quality = 4 8 4 8
r_FSAA_samples = 8 8 16 16
-- MSAA OFF 2x 4x
r_PostMSAA = 0 1 2
-- MSAA Mode OFF Linear Repro
r_PostMSAAMode = 0 1 2
-- FXAA / NVidia Edge FXAA NVidia
r_PostMSAAEdgeFilterNV = 0 1
-- Edge AA OFF Blur AA Laplace
r_UseEdgeAA = 0 1 2 3
sys_flash_edgeaa = 0 / 1
-- CommandVariables Low Med High VeryHigh
------------------------------------------------- SYS_SPEC
sys_spec = 1 2 3 4
sys_spec_full = 1 2 3 4
sys_spec_gameeffects = 1 2 3 4
sys_spec_objectdetail = 1 2 3 4
sys_spec_particles = 1 2 3 4
sys_spec_physics = 1 2 3 4
sys_spec_postprocessing = 1 2 3 4
sys_spec_Quality = 1 2 3 4
sys_spec_shading = 1 2 3 4
sys_spec_shadows = 1 2 3 4
sys_spec_sound = 1 2 3 4
sys_spec_texture = 1 2 3 4
sys_spec_volumetriceffects = 1 2 3 4
sys_spec_water = 1 2 3 4
------------------------------------------------- SYS MISC
sys_max_step = 0,05 0,05 0,05 0,05
sys_maxTimeStepForMovieSystem = 0,1 0,1 0,1 0,1
sys_min_step = 0,01 0,01 0,01 0,01
sys_MinFPS = 0 0 0 0
_EOF_

# Launch the game
# Notice: Setting WINEDEBUG to '-all' improves performance
export WINEDEBUG="-all"
wine /opt/wine/data/Crysis_2/drive_c/Program\ Files/Electronic\ Arts/Crytek/Crysis\ 2/bin32/Crysis2.exe