since there are quite a few articles about playing Doom using Chocolate Doom on Arch Linux, but none about Raspbian, I decided I'd write one! First, I have to warn you. Unlike Arch Linux, where you can install this software with the package manager, here we have to compile it, since it doesn't seem to be in the repositories yet.
First off, we need to prepare a folder for the source code. I have a folder called Sources in my home directory where I direct all my source code and compiling related needs. So, let's start by creating one:
- Code: Select all
cd ~
mkdir Sources
cd Sources
Next, we will download the .tar.gz archive from SourceForge either with Midori or NetSurf or download it on your computer and use SSH to transfer it to the Sources folder:
http://downloads.sourceforge.net/project/chocolate-doom/chocolate-doom/1.7.0/chocolate-doom-1.7.0.tar.gz
Then unpack it, delete the archive and navigate into the new folder:
- Code: Select all
tar -xvf chocolate-doom-1.7.0.tar.gz
rm chocolate-doom-1.7.0.tar.gz
cd chocolate-doom-1.7.0
Before we start configuring and compiling, we need to download a pretty huge list of packages, they are mainly SDL related so they should be useful to you on your next compiling adventures.
- Code: Select all
sudo apt-get update
sudo apt-get install gcc build-essential libsdl1.2-dev libsdl1.2debian libsdl-image1.2 libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dev timidity
When everything is installed, we can finally run the configuration script.
- Code: Select all
./configure
(NOTE: If this gives you an error, it is most likely due to a part of your compiling masquerade is missing. Try googling the error and you will most likely find what you need to apt-get in order to fix it.)
Finally, we can start compiling. This will take some time but not nearly as long as Q3A.
- Code: Select all
make
After compiling finishes, we will install our new binaries with the followning command:
- Code: Select all
sudo make install
NOTE: You need to run this using sudo or as root, because the installing script copies binaries, icons and .desktop files to the /usr/share folder. On the bright side, this means that everything gets neatly embedded in your LXDE menu. Due to the way chocolate-doom is launched this is a bit unneeded, but we will talk about that later (at least we have the icon).
To configure Chocolate Doom, you need to run the following command from the terminal:
- Code: Select all
chocolate-setup
This will bring you up a nice DOS-looking window where you can configure our new software. Under display configuration, you can either choose the full screen, but if you have a Full HD LCD like me, I reccomend hitting A, disabling "Fix aspect ratio" and then selecting 1280x800, since it tends to be quite laggy on full 1920x1080. Hit the escape key to return to the original menu. Since there is no joystick to be configured, we will head right to the keyboard configuration. If you want controls similar to more modern FPS games, set Move Forward to W, Move Backward to S, Strafe Left to A, Strafe Right to D and you can set Turn Left to Q and Turn Right to E or whatever you like and leave Speed On on Shift and Strafe On on Alt. Press escape to return and you can skip the Mouse configuration, since everything there is set by default to the "average" levels. You can fiddle around there yourself later. Go to Sound configuration and make sure Sound Effects is set to Digital and that Music playback is set to Native MIDI. Once you checked that, return to the main menu and select Save parameters and launch DOOM. Now, since there are no WAD files yet, the game will not lauch but the settings will be saved.
Now, we need to get the WAD files. A little google search will tell you how to *cough* *cough* extract these files from your original Doom CD. Alternatively, you can use Doom 2, Ultimate Doom, TNT: Eviluion or Plutonia. Log into your Raspberry Pi through SSH as root (for example using WinSCP) and make create a folder called doom in /usr/share and put your doom.wad, doom2.wad, tnt.wad or plutonia.wad. I have tried Strife and Hexen as well, but for some strange reason they don't work for me.
Then you can finally start the game using the terminal with the following command:
- Code: Select all
chocolate-doom -iwad /usr/share/(name of your file).wad
Congratulations! You have now got Doom running on your Raspberry Pi.
OPTIONAL: Create a WAD-specific launcher so you don't have to use the terminal all the time
Open up LeafPad and type the following text in:
- Code: Select all
[Desktop Entry]
Name=Doom 1
Exec=chocolate-doom -iwad /usr/share/doom/doom.wad
Icon=chocolate-doom
Type=Application
Comment=Conservative Doom source port. Loaded with a Doom1 WAD.
Categories=Game;ActionGame;
And save it on your desktop as doom1.desktop. The exact name doesn't really matter, since the name specified inside the file is the one getting displayed. Bang, you got your easy desktop launcher for Doom. Can you even ask for more? Well... Of course you can. Let me introduce you to the:
OPTIONAL 2: Create a laucher for multiple kinds of Doom using Zenity
So, let's say you happen to own both Doom 1, Doom 2, and on top of it you also own TNT and Plutonia. And you don't want to have four different icons. Then let us create a launcher with all these options! Using a little inspiration from the ever-popular Python Games, we will make ourselves a nice little menu using Zenity. Open up LeafPad, or, if you have it, Geany and paste the following script there:
- Code: Select all
#!/bin/sh
RET=0
GAME=$(zenity --list --width=350 --height=250 --radiolist --title="Choose your game" --column "Select" --column="Game" TRUE "Doom 1/Ultimate Doom" FALSE "Doom 2" FALSE "TNT: Evilution" FALSE "The Plutonia Experiment" )
RET=$?
echo $GAME
if [ "$GAME" = "Doom 1/Ultimate Doom" ]; then
chocolate-doom -iwad /usr/share/doom/doom.wad
elif [ "$GAME" = "Doom 2" ]; then
chocolate-doom -iwad /usr/share/doom/doom2.wad
elif [ "$GAME" = "TNT: Evilution" ]; then
chocolate-doom -iwad /usr/share/doom/tnt.wad
elif [ "$GAME" = "The Plutonia Experiment" ]; then
chocolate-doom -iwad /usr/share/doom/plutonia.wad
else
echo "Cancelled..."
fi
And save it somewhere nice, like your home folder, under the name chocolate-doom-launcher (without the extension). Open up terminal, navigate to the file you just saved and issue these two commands:
- Code: Select all
chmod +x chocolate-doom-launcher
sudo cp chocolate-doom-launcher /usr/bin
From now on, you have a new terminal command that brings up a nice little launcher for all your Doom related business. Now let's turn it into a pretty little icon, shall we? For the last time, open LeafPad or Geany and create a new file and paste this into it:
- Code: Select all
[Desktop Entry]
Name=Chocolate Doom Launcher
Exec=chocolate-doom-launcher
Icon=chocolate-doom
Type=Application
Comment=One launcher for all Doom realted games.
Categories=Game
And save it on your desktop as chocolate-doom-launcher.desktop. If you want this launcher to appear in your menu as well, open up terminal for the last time and type in these two commands:
- Code: Select all
cd ~/Desktop
sudo cp chocolate-doom-launcher.desktop /usr/share/applications
And that's it. You now have a fully working, configured installation of Chocolate Doom 1.7.0 with working MIDI sound thru Timidity, with a launcher for different games both on your desktop and in your applications menu. Time to give yourself a pat on the back, and go play some Doom!
Sources of some information used: viewtopic.php?p=83495 http://www.sparkfun.com/tutorials/372