How to Install HD2 on Linux

7 years 11 months ago - 1 year 9 months ago #1 by Damni
How to Install HD2 on Linux was created by Damni
HOW TO INSTALL HIDDEN AND DANGEROUS 2 ON LINUX

 

Tested on Arch Linux (should work on other distributions too)

Needed packages
  • wine
  • winetricks
Preparing the files
Create two separate folders on your computer (e.g. HD2 and HD2SS);
Extract the content of the Hidden and Dangerous 2 CDs into HD2;
Extract the content of Sabre Squadron CDs into HD2SS;
Download Patch - HD2_SS_PATCH1_12.zip from here .
A no cd crack is a good way to go even if you have a legal copy of the game
(In fact I haven't tested the game without it.... proof that I own the game )

Install the original game
cd /path/to/files/HD2
wine setup.exe
Let it install, skip gamespy and directx

Install the expansion pack
cd /path/to/files/HD2SS
wine setup.exe
Let it install, skip gamespy and directx

Install the patch
wine /path/to/file/patch.exe

Install the crack
If it comes with an installer
wine /path/to/file/crack.exe
or
Just copy the file into the main game directory and replace the original.

At this point your game should be good to launch and Single player mode should already work.

Enable Multiplayer
winetricks directplay

Improve Performance
- Follow mökki medium's guide to boost the game's performance using dxvk
- Install GAMEMODE. Gamemode Project on Github , Gamemode page on Arch Wiki
  Launch your game with:
gamemoderun wine ./HD2_SabreSquadron.exe

More notes:
- Enabling VSync seems to lower CPU usage;
- Occasional FPS drops still occur. (in my case I switch to another workspace and back to the game. For some reason it fixes the lag. May not work for everyone)

Play Online
- Because GameSpy has died a long time ago, you will not be able to see any servers. To fix this, add the following lines to your /etc/hosts file, if you want to be able to discover online servers:
89.166.9.246 hd2.available.gamespy.com #hidden and dangerous 2 check
89.166.9.246 hd2.master.gamespy.com #hidden and dangerous 2 heartbeats
89.166.9.246 hd2.ms14.gamespy.com #hidden and dangerous 2 server list

More Testing
Nikita's testings on Linux Mint. Nikita's Post

IMPORTANT
If I missed anything or if you notice a mistake, please let me know using this thread.

Check out my photos on Pixelfed
Attachments:
The following user(s) said Thank You: snowman, Nikita, Rs_Funzo, NL, Maki, jacobston, toadlife, xhc, sonic

Please Log in or Create an account to join the conversation.

7 years 2 months ago - 7 years 2 months ago #2 by toadlife
Replied by toadlife on topic How to Install HD2 on Linux
Thanks for posting this.

I just figured out how to get it running a few days ago before reading this. I got hung up on multiplayer working before figuring out the directplay library requirement. This would have helped me.

The game actually works better for me on Linux than on windows. The graphics are not faster, but my ping time on RrP servers is consistently around 80ms whereas on Windows, 120ms was able the best I would get. Also, starting with Windows 10, there is a border around the screen when you are in full screen mode. That annoying border doesn't exist under Wine.
The following user(s) said Thank You: Damni

Please Log in or Create an account to join the conversation.

5 years 9 months ago #3 by Damni
Replied by Damni on topic How to Install HD2 on Linux
Forcing VSync seem to lower CPU usage.

Check out my photos on Pixelfed
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

4 years 4 months ago - 4 years 4 months ago #4 by snowman
Replied by snowman on topic How to Install HD2 on Linux
Here's a list of packages I needed to install for a base Arch
installation, since H&D2 requires 32 bit libraries, not 64 bit.

wine_gecko
gnutls
lib32-nvidia-340xx-utils
- for my old video card only
lib32-alsa-lib
lib32-alsa-lib-plugins
gst-plugins-base
gst-plugins-base-libs
gst-pluings-good


I also added a registry key under Wine using: wine regedit
with the key name "Direct3D" and these settings with the
values:

VideoMemorySize 512
DirectDrawRenderer opengl


Basically saying to use all of my GPU memory. You can change
that. It's probably not required anyway.

Before you use any Wine/WineTricks command in the terminal
I suggest you set it to 32-bit since that's what H&D2 runs on.
This creates the invisible .wine32 folder/prefix in your user's
home directory.

WINEARCH=win32 WINEPREFIX=/home/$USER/.wine32 winecfg


Then your Desktop shortcut will start using 32-bit version...
otherwise it will use the 64-bit and it will not find your game
keys, so you cannot launch it.

WINEARCH=win32 WINEPREFIX=/home/$USER/.wine32 wine HD2_SabreSquadron.exe

I also set the game sound to ALSA: winetricks sound=alsa

NOW THE LIST OF ISSUES!

1. First time I launched the game I tried to use window mode, just
like I used to do it this year... easier to switch between H&D2,
TS3, Discord, Server Manager, Firefox etc windows and the
game doesn't crash this way when you switch... on Windows 7.
On Linux it doesn't work. All I see is parts of screen or it's
black or it has weird pixels.

2. Once I am in game and I want to tab out I can't go back in
the game. It's locked on the full screen OR can see the desktop
and no longer possible to view the game window anymore.
Today it was possible to go back in game, but when I wanted
to exit via ALT+Tab it just froze. I could see the game screen,
still use the mouse to turn around, but the keyboard was dead.

3. This is admin stuff, also work in progress. I need to find a way
to use the remote servers, which are on Windows. I was thinking
of the Wine with Remote Desktop. Only to start/restart/reinstall
something, not interested in ALT-Tab to work.

4. Since it's game related. I installed TS3, it works until I join the
server with the microphone On. The first sound that would be
captured from the mike, crashes the TS3 client. I also can't listen
to music once TS3 is connected.

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

4 years 4 months ago #5 by Damni
Replied by Damni on topic How to Install HD2 on Linux
Unfortunately I can't be of much help :grumpy:

1. If I untick 'Fullscreen' from setup.exe, the game starts in window mode without any issue. I can switch to other workspaces and resume playing.

2. When the game is launched in Fullscreen mode, I have the same issues. It wasn't like this few months ago. At the moment I have no idea what to do. :barf:

4. I had this problem last time I joined the TLC. I solved it by downgrading TS3 to an older version. My current version is 3.2.5-1. Which you can get from the archive and install manually.
Don't forget to edit /etc/pacman.conf to add teamspeak3 to the ignore list, so pacman won't try to upgrade it again.
IgnorePkg   = teamspeak3

Check out my photos on Pixelfed
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

4 years 4 months ago - 4 years 4 months ago #6 by snowman
Replied by snowman on topic How to Install HD2 on Linux
No .4 is fixed. I thought about downgrading and that's what I wanted to
try, but it was already too late last night. I didn't think about removing it from
pacman. Thanks a lot!

To fix the audio so it works with other programs while on TS you need to go to
/etc/pulse/default.pa (if you use pulse) and disable(comment) like this:

# load-module module-role-cork

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

  • Lukasz birthday is in 10 days (41)
Powered by Kunena Forum