Battlefield 2 on Linux: Notes & Tips: Difference between revisions

m
mNo edit summary
Line 97: Line 97:


=== Restore EAX with OpenAL Soft ===
=== Restore EAX with OpenAL Soft ===
Everything need to be perfect, audio included, the game support EAX and to enable the audio hardware capabilities we can use OpenAL Soft library. The setup is really easy and play well with many games not only Battlefield 2, what you need to understand is whether the game use '''dsound''' or '''openal''' audio library.


Inside the game folder there is a library BF2OpenAL.dll, from the name only you know that the game support OpenAL so we are going to use the OpenAL Soft to replace it and enable the EAX support.
Everything needs to be perfect, including audio. The game supports EAX, and to enable the audio hardware capabilities we can use the '''OpenAL Soft''' library. The setup is straightforward and works well with many games, not only ''Battlefield 2''. The first step is to determine whether the game uses the '''dsound''' or '''openal''' audio library. In the game folder, you will find a library called '''BF2OpenAL.dll'''. From the name alone, you can tell that the game supports OpenAL, so we will use OpenAL Soft to replace it and enable EAX support.


Download the OpenAL Soft from the [https://github.com/kcat/openal-soft/releases/tag/1.23.1 GitHub page]. The version I currently use for this game is the '''1.23.1''' and is the one I recommend for this tutorial.  
Download OpenAL Soft from the [https://github.com/kcat/openal-soft/releases/tag/1.23.1 GitHub release page]. The version I currently use for this game is '''1.23.1''', which I recommend for this tutorial. After extracting the archive, you will need two files:


After extracting the archive, you will need two files:
* From the '''router/Win32''' folder, take '''OpenAL32.dll'''. Rename this file to '''BF2OpenAL.dll''' and replace the existing one in the game folder.
*From the `router/Win32` folder, take `OpenAL32.dll`. Rename this file to `BF2OpenAL.dll` and replace the existing one in the game folder.
* From the '''bin/Win32''' folder, copy '''soft_oal.dll''' into the game folder.
*From the `bin/Win32` folder, copy `soft_oal.dll` into the game folder.


Download the [https://github.com/main-exe/UT2004-OpenAL OpenAL configuration for UT2004] from this GitHub page, we are going to use part of the content. What we need from this archive is the file '''OpenAL-44100Hz.zip''', inside you find alsoft.ini and a folder containing the HRTF profiles for the 3D spatial sound. Extract the archive and place the '''alsoft.ini''' and the '''OpenAL''' folder into the '''AppData/Roaming''' of your prefix. The default configuration should work just fine but if you want to change the profile you can edit the alsoft.ini file and change the '''default-hrtf''' property.
Next, download the [https://github.com/main-exe/UT2004-OpenAL OpenAL configuration for UT2004] from GitHub. We will use part of its content. Specifically, you need the file '''OpenAL-44100Hz.zip''', which contains '''alsoft.ini''' and a folder with HRTF profiles for 3D spatial sound. Extract the archive and place both '''alsoft.ini''' and the '''OpenAL''' folder into the '''AppData/Roaming''' directory of your prefix.
 
The default configuration should work fine, but if you want to change the profile, you can edit the '''alsoft.ini''' file and modify the '''default-hrtf''' property. You can experiment with different profiles and see which works best for you by using the [https://github.com/main-exe/UT2004-OpenAL/releases/download/2023-11-08/RightMark3DSound.zip RightMark3DSound] software. After placing the profiles in the Roaming folder, simply edit '''alsoft.ini''' and run the software to test how the audio sounds in your setup.


You can try different profiles and see what it works for you by using the [https://github.com/main-exe/UT2004-OpenAL/releases/download/2023-11-08/RightMark3DSound.zip RightMark3DSound] software, after placing the profiles in the Roaming folder you just need to change the alsoft.ini and start the software to test how it sounds in your ears.
===Setup Punkbuster===
===Setup Punkbuster===
You need Punkbuster the anti-cheat software used back in the days to play on specific servers, you need to have the same version used on the server. You can follow the instructions on the website I link below, this is an archived version on archive.org so hopefully will not disappear.
You need Punkbuster the anti-cheat software used back in the days to play on specific servers, you need to have the same version used on the server. You can follow the instructions on the website I link below, this is an archived version on archive.org so hopefully will not disappear.