Monday, August 21, 2017

Call of Duty on Modern Linux

I have been able to get COD and COD:UO running, but they run once or twice and then won't work, so I am abandoning any attempt to install these in Crossover.


Call of Duty, a first person shooter released in 2003, spawned an entire franchise of COD games that persist to this day. Installing using Codeweaver's Crossover should be easy, but it's not. COD: United Offensive is an expansion pack for COD and the COD game must be installed before COD:UO can be installed.

Crossover expects you to install the game through Steam. I own the original discs and shouldn't have to pay for it again.
There were several problems with my approach. The first was in the way Mageia mounts CDs and the way that Crossover presents them to the game.

By default, Mageia will mount the CD under /run/media//COD_1. But Crossover sees that not as /dev/sr0, but as a hard drive directory. Then it is impossible to "eject" the CD, because is no longer associated with /dev/sr0.

So I thought to fix this, I should edit a DOS drive letter symlink in the COD bottle to point to /dev/sr0. Then I manually mounted the CD as:
$ sudo mount /dev/sr0 /mnt

Now I believe I have control of the drive and both Crossover and the COD installer recognize it as /dev/sr0, a device that can be unmounted in the way the installer expects. But again, problems. It can't be unmounted as it is held by a wineserver. Killing the wineserver to eject the drive kills the install. Forcing the drive to eject leaves the wineserver unable to connect to a newly mounted CD2.

I even tried putting CD2 in a second drive and mounting it over CD1 at /mnt, but I can't fool the installer or the wineserver with this with this. I'm guessing that if this problem could be solved, it would be possible to do a regular install of the game.

What is on CD2 are the large /pak files that live under /Main, so I killed the COD install (selected NO for rolling back the installation) and copied the CD2 files into the COD bottle. That didn't work because the installer puts language translations in the CDO directory and I don't see where they are just copied over, they must be extracted from somefile.

Sadly, the best way is to install under Windows and copy it to the COD bottle crated in the aborted install.
But a new problem - CD1 needs to be in the drive for the copy protection to run the game.  I did not want to tru and get Crossover to find the CD. It had already given me hours of aggravation about that. So . . . a no-cd crack was installed and the game should launch, but . . .

While the start menu links aren't automatically created for use, they should be able be created through the "Run command" utility. But . . . not for us.

And another problem. When I could get the game to start, it crashed with a buffer overrun error that some detective work discovered that it had to do with modern nVidia drivers and the length of an environmental string. The fix? Just prefix the entire command in quotes with:
__GL_ExtensionStringVersion=17700

But, of course, it's not that easy. There were still a few problems remaining. It seems that running a line of Linux code is not possible in the "Run command" dialog.  This is solved by launching the game using a script named ~/bin/codsp.

#!/bin/sh
cd /home/hoyt/.cxoffice/Call_of_Duty/drive_c/Program\ Files/Call\ of\ Duty\ Game\ of\ the\ Year\ Edition/
__GL_ExtensionStringVersion=17700 \
/opt/cxoffice/bin/wine --bottle "Call_of_Duty" /home/hoyt/.cxoffice/Call_of_Duty/drive_c/Program\ Files/Call\ of\ Duty\ Game\ of\ the\ Year\ Edition/CoDSP.exe
The command is all on one line.

What the script does is to cd to the games installed directory or the game won't know where it finds it s files. Too bad there's no --basedir option. Then we execute the full paths of everything just to avoid any problems there using the special command line incantations to tell Crossover where it should be looking.

Even with all that work, the game engine might not find a default.cfg, so you can download one from here and just rename it.

And there you have it.

Saved Games
If you have previously played through COD, it makes sense to download a package of saved games so that you can have fun with the game.


NEW ISSUE
I attempted to install COD: United Offensive and it would not proceed because COD was not found. I'm guessing it looks in the Registry for the data and my Bottle does not have that data. So I need to go back to my Windows install and copy that or create one from that example. If you do create one, you CD key is the letters and numbers you entered to install the game, just without the dashes. And the new installed version number is 1.3. COD: United Offensive will update it to 1.4 if you install that game.

RESOURCES

Call of Duty View -- updates

Saved Games

Doom for Modern Linux

This game was released in 1993 and is considered a pioneer in 3D gaming. Previous games from id Software were 2D.

While the original game might be playable in DosBox, There are more modern ports with greater stability and wide platform support. One of the ports, prboom, is available for Mageia6 (and MS-Windows and many other platforms). Based on the release of the original source code; it uses the SDl library.

prboom is one of those rare Linux things that has been fixed enough that everything works. It offers a true-to-the-original gameplay rather than updating the game with modern features like ZDoom, EDGE, and Eternity Engine. prboom emulates the games engines from the different versions of DOOM; it is also compatible with the demo version of DOOM.

$ sudo urpmi prboom 

installs the game in  /usr/games and run the first time with no arguments creates .prboom in your home directory, which is where you will place your *.wad files (referred to as IWADs.

Mageia6 also provides the man freedoom wads in the freedoom package and installs them at

/usr/share/games/doom/freedoom1.wad
/usr/share/games/doom/freedoom2.wad

To install the freedoom IWADS,

$ sudo urpmi freedoom

The freedoom Docs are worth a read and can be found in /usr/share/doc/freedoom/README.html 

So, in answer to the classic meme "Can it run Doom?", launch the first game:

$ prboom -iwad /usr/share/games/doom/freedoom1.wad

Yes, this was considered groundbreaking in 1993, but you can see who far 3D gaming has progressed in 24 years.

The ArchLinux Wiki has excellent instructions on how to configure and launch prboom.

Graphical Frontend for DOOM

Mageia does not provide a graphical frontend for launching Doom games. There is one available from enyo-doom, Doomseeker, Super Shotgun Launcher, qzdl, and DoomLauncher.

I chose to use DoomLauncher (download) . As a java jar, it should work cross-platform. Placing it in ~/bin/, I wrote a script simply named doom to launch it (and don't forget to chmod +x.)
#!/bin/sh# launch DoomLauncherjava -jar ~/bin/DoomLauncher.jar
Once running, initial configuration is not obvious at first.


Begin by clicking on Engine: ...  and select the path to prboom. You can install multiple different game engines if you desire.

Next, click on Iwad: ... and select the path to your IWADs.

Once you have selected your game engine and your IWAD, click on Launch to start the game.

NOTE: The GUI does not do well upon your exit from the game. You need to close it and start it again. Otherwise, it appears to work well.

RESOURCES

ArchLinux Wiki

Zandronum Wiki

Playing SDL_mixer games with soundfonts

PrBoom+

 Troubleshooting JAR File Associations for DoomLauncher

Doomworld Wiki




Sunday, August 20, 2017

Unreal 2003 for Modern Linux

If Unreal2 was the redheaded stepchild of the original Unreal game, Unreal Tournament 2003 was the redheaded stepchild of the original Unreal Tournament. The gaming community was not happy with the game as it originally shipped in September 30th, 2002. So unhappy, in fact, that EPIC released Unreal Tournament 2004 which re-used much of UT2003.

UT2003 does offer a Linux installer and there is a Linux update as well as the DE Bonus pack and the Epic Bonus Pack. A Windows-only Community Bonus Pack was released followed by a Linux installer for it.

While it can be installed uising WINE, PlayOnLinus and Crossover, we will be installing as root to make the game available to all system users.

The Linux installer is on disc3. Mount the game discs and copy them all to ~/ut2003. Copy the Linux installer to that directory, cd there and su to root.

First, we need to set a workable POSIX version value.

# export _POSIX2_VERSION=199209

Second, set a usable libc version.

# export SETUP_LIBC=glibc-2.1

Your distro might provide compat-libstdc. If so, install that.

Third, tell the installer that we are running on a 32-bit system.

# linux32 ./linux_installer.sh

Now you can use the graphical installation tool and provide your CD key and play the game.


RESOURCES

The EPIC Bonus Pack can be unpacked with unzip, then the files transferred to your UT2003 installation.

Most of the game updates, mods and utilities can be downloaded from GameFront. There is a umod extractor for Linux as well as a conversion to return the game to Classic UT, plus the Official maps and the Community Maps, skins and mods.

UT2003 Fedora 23 HOWTO

The Unreal Admin Page Forum UT2003


Friday, August 18, 2017

32-bit WINE on 64-bit Mageia6

Any Windows application that I want to use with WINE will be a win32 binary, so the installation of 64-bit WINE is not necessary or useful. Since the 32-bit repositories are included with a 64-bit install, I just need to select the i586 versions of the following:
q4wine
wine
wine-gecko
wine-mono
wine32

I also install winetricks by downloading it from
$ cd ~/bin$ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks $ chmod +x winetricks
And also install the 32-bit version of Zenity because winetricks expects to see it. Winetricks is a handy tool and makes dealing with.

NOTE: I has a problem with q4wine in that when I installed it with urpmi, it did not install its dependencies and would not launch; I reported it as a bug.

At this forum post at GOG.com, user JudasIscariot has a description of a Mini Git Wine tutorial to compile and run WINE. While it's not necessary to compile and install WINE by this method since the packages are in the repository, there may be some bugfixes in a version that is greater than what you distro may offer. YMMV.

That forum link also contains a wealth of information about installing new WINE bottles and installing Windows games using WINE providing detailed instructions for many games .

My preference is to use Crossover because it has a number of built-in tools to help. I also have used PlayOnLinux and done things with just WINE. Actually ,having a well-configured system-wide WINE install is helpful. Once you have added the buttload of extra system applications, your average win32 apps can be run with a click of the mouse, a big help for small programs you may need to use.

But it never hurts do learn how to do it from scratch. That's where Linux shines over other operating systems; if it's broken, you have the opportunity to fix it.

Unreal2 on Modern Linux

Unreal 2: The Awakening was not a popular game. It launched on February 3rd, 2003 with only a single-player mode when on-line multiplayer demonstrated in Unreal Tournament was the  the new thing. Although a one game-style multiplayer mode was added, Unreal2 just never caught on. It does offer a good story-mode single, player experience and a pretty attractive female sidekick.

Unreal2 also has no native Linux binaries and must be run with some version of WINE. The current version of Unreal2 offered by GOG.com can be run using WINE, PlayOnLinux or Crossover. Install it into a WinXP bottle and before you launch the game the first time, delete all of the *.con files you find in the Music sub-directory.

Once you have confirmed that the game performs well, you can also install the Expanded Multiplayer Community version in the same bottle, backing up the original bottle just in case.

RESOURCES

Unreal 2 - The Forgotten Game?

Beyond Unreal

Solar base single-player map

Good Old Games

Unreal II Expanded Multipayer Community

Unreal Wiki Documentation of the Unreal Editor

Linux Releases on GOG

The "Judas™ does this run in Wine" thread v1.173

Adult Character Skins


Tuesday, August 15, 2017

Using a PS3 game Controller with Linux

I have been a mouse and keyboard PC game player ever since my Doom days. About 2007, I was introduced to the Sony PS3 and found it more convenient to play games on the console. Lately, I have been resurrecting all my old games which, of course, work well with a keyboard and mouse, but I enjoyed using the controller. To me, the controller created a more immersive experience. Being able to do that, as always, takes several steps.

First I needed to have my Mageia6 OS receive information from the PS3 controller. That is easily dome with xboxdrv, but Mageia does not provide that, so I downloaded one for Ubuntu and used Alien to convert it to RPM format. It then installed without trouble and reports the controllers action to the OS.

Second, I need a way to map the gamepad-generated information to the appropriate mouse and keyboard keypresses to be what the game needed. I've seen where some newer games accommodate gamepads, but all my favorite games are old, old, old.

Some of these programs serve both functions and it would be nice to be able to use the same program for both Linux and WINE. It may take me a while to works through the choices, but I will first explore AntiMicro and get the gamepad set up for Unreal Tournament 2003 because it's one of the few native Linux games I have as most are run using Codeweaver's Crossover, an awesome application using WINE.

RESOURCES


xboxdrv
This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. xboxdrv provides a wide varity of configuration options, it allows you to simulate keyboard and mouse events, remap buttons and axes, apply autofire, invert axis, tweak axis sensitivity, emulate throttle and rudder controls and send macros. The manpage has more details. It works with the PS3 controller as well. xboxdrv also accommodates wrapper scripts to start games.

Xpadder
This is a win32 program that is self-contained, runs under WINE and costs US$10. There are several sites that offer pre-configured Xpadder profiles; esoui.com, the XPadder Forum, WiiFi's Xpadder Fan site, The ISO Zone, and others. Xpadder is also used on Steam.

AntiMicro
This an Open Source tool for mapping keyboard and mouse events to gamepads and joysticks and is supported under MS-Windows, Linux and BSD. It is available for Debian-based distros and in RPM for Fedora, but not for Mageia. The Linux version uses SDL. There is a repository of pre-made profiles. and a WIKI. The homepage provides general Help and adding a new game controller mapping is here. AntiMicro can also be used on STEAM games. Video HOWTOs are here. Posts about in on Reddit are here and here. Auto launch scripting is discussed here. A tutorial is here (seems to be the best one) and here and here and here.

jtest-gtk
This is a simple, FOSS joystick tester with a  Gtk+ GUI. It provides you with a list of attached joysticks, a way to display which buttons and axis are pressed, a way to remap axis and buttons and a way to calibrate your joystick. It uses SDL. The program has received a few updates and appears to be actively maintained.

InputMapper
 A win32-only, free (DonationWare) DS4 (DualShock 4) input mapper that allows you to connect your PS4 gamepad to windows, wired (USB) or wirelessly (Bluetooth). Map virtually any controller input to virtually any button, keyboard key, mouse action, and more! Perform any combination of keystrokes, button presses, and other advanced functions in sequence with the touch of a button. Not yet tested in WINE. Version 1.6 is stable; version 2.0 is beta.

Using the PlayStation 3 controller in Bluetooth mode with Linux
A nice walk-through from 2007 of how this fellow got a PS3 controller working for a non-gaming application, a drone. He has some demonstrations YouTube videos linked on his site.

QtSixA is the Sixaxis Joystick Manager Linux
QtSixA v1.5.1 is the final version released in 2011, ArchLinux has a nice HOWTO in their typically fantastic documentation. Connection in Bluetooth mode at UbuntuForums. The manual is here. Download is here. There are Ubuntu packages, but only a src.rpm for Mageia with complaints about poor BlueTooth performance. A Fedora package is here.
.
GIMX
This FOSS Linux and MS-Windows tool is used to control a game controller and works via Bluetooth for the PS3/PS4 controllers. Documentation is here a blog is here and a Forum is here. It appears to be actively maintained.

MISCELLANEOUS RESOURCES

QUAKE Split-screen and Controller guides
Quake Quake2 Quake3

Linux_Gaming FAQs on Reddit

Linux conversations on Reddit

Linux Gaming on Reddit

WINE Gaming on Reddit