AvP Direct3D9 Renderer update (original) (raw)
Aliens Vs Predator - Source code update
by Barry Duncan (sirlemonhead)
sirlemonhead (at) outlook.com
Page last updated - 8th January 2015
What is this?
This is an enhancement to Aliens Vs Predator that aims to fix bugs and add new features to the game while keeping it compatible and playable on most modern Windows based operating systems.
Downloads:
Latest executable release: 8th January 2015
Latest changes - Fixed mouse handling (should be more accurate) and re-enabled spawning of bots using -debug and -lampcxtr commands Thanks to Aaron R. for all his help identifying issues.
<setup%5FAvPx.exe> - now with automated installer
The source code is hosted at: http://www.assembla.com/spaces/AvP/trac_subversion_tool
Supported operating systems:
- Windows XP/Vista/7/8
List of improvements:
- Direct3D9 HLSL shader based renderer for improved compatability with modern graphics cards (no new rendering effects yet)
- Numerous bug and crash fixes
- Ogg Vorbis music playback as an alternative to inserting the game's music CD
- FMV playback of original FMV video files (no need to convert them to another format)
- Support for correctly saving profile, savegame and log files on Windows Vista and above (UAC aware)
- Xbox 360 control pad support
- Resolution independant menu rendering (can render menus at resolutions greater than 640x480)
Requirements:
- A copy of Aliens Vs Predator - Gold Edition. (Standard edition should work but isn't extensively tested. Steam "Aliens Vs Predator Classic 2000" should also work.)
- If you're using the Non-Gold/Standard version of AvP, you'll need to extract and place the following file in your AvP game folder. Extract the file english.txt from the archive, rename it to language.txt and place it in your AvP folder along with my .exe file. The language was originally created by relnev I believe. The link to where he was hosting it now seems to be dead, so i'll host it here
english.txt.gz
Where are user profiles, savegames and configuration settings stored?
If you are wondering where the User_Profile folder and configuration files have gone, they have been moved out of the AvP game folder and are now stored in your My Documents folder
e.g. on Vista and upwards, the files are stored in C:\Users\(your username)\Documents\My Games\Aliens versus Predator
Can I remove the limit on how many times I can save the game?
Yes. Open the file AliensVsPredator.cfg (see above to find this file if unsure where it is) and change the line UnlimitedSaves = false to UnlimitedSaves = true
Can I play the game in a window?
Yes. Add the parameter "-w" to the command line when launching the game. Do this by right clicking the AvPx.exe file and selecting Create shortcut. Right click the new "AvPx.exe - Shortcut" and select Properties. Where it says Target, add the -w parameter at the very end of the text in this box, after the quote mark. e.g. "C:\Program Files\Fox\Aliens versus Predator\AvPx.exe" -w You can then rename "AvPx.exe - Shortcut" to something like "AvPx.exe - Windowed"
How to get music playback working
- First, grab the audio from the AvP game cd and convert it to Ogg Vorbis format. To do this, I useExact Audio Copy in conjunction with oggenc2 (I used the version with libVorbis). I won't go into any detail on how to set up and use EAC but my compression properies are set up as shown in this screenshot. You can alternatively create the .ogg files using any other capable audio ripping software.
- Then, create a folder called 'Music' in your AvP Game folder. Copy the .ogg files created above into this folder and create a text file in the Music folder called 'ogg_tracks.txt'. In this text file, you need to provide a list of the filenames for your .ogg files. See this screenshot for an example of how to do it. That should be it - the game should now pick up the .ogg files and play them.
Credits:
Big thanks to Melanikus (who is techically part of the "team"), blueshogun96, bassquake, Plagman, Visper, Clockface, l11l1VeNoM1l11l, dla and relnev, Aaron R. and anyone at the awesome Vogons forum who suggested bug fixes and everyone else who helped (sorry if I forgot anyone!)
Interesting/Important Links:
- relnev's Linux port of AvP - http://icculus.org/avp/
- dla's source code mod - https://www.assembla.com/code/avp_mod/git/nodes?rev=master
Compiling the source code
Requirements:
- Visual studio C++ 2010 - Express, Standard or greater edition - Express is available for free at http://www.microsoft.com/express/
- The latest DirectX SDK - available at http://www.microsoft.com/downloads/details.aspx?FamilyID=b66e14b8-8505-4b17-bf80-edb2df5abad4&displaylang=en
- Pthreads win32 - available at https://www.sourceware.org/pthreads-win32/
- OpenAL soft - available at http://kcat.strangesoft.net/openal.html
- libogg and libvorbis for Ogg Vorbis playback, and optional FMV playback using libtheora - all available at http://www.xiph.org/
- libsmackerdec and libbinkdec (both based on FFmpeg)
Steps:
- Install Visual Studio C++ 2010
- Install the DirectX SDK
- Compile OpenAL soft or use prebuild libraries
- Compile libogg, libvorbis, libtheora, libsmackerdec, libbinkdec as a Release build, with Runtime Library type set to Multi-threaded DLL
- Point Visual Studio to the .lib files you built above