APC Australia

Play Doom on your Raspberry Pi

Nate Drake adds a touch of chocolate to your Raspberry Pi through installing a version of this iconic First Person Shooter.

-

Doom is a landmark in the history of gaming, set in the not too distant future. You are a space marine, exiled to Mars for a dull, routine assignment after striking a superior officer. The Martian Marine Base is secretly conducting experiment­s into teleportat­ion through creating wormholes between Mars’ two moons.

Events take a horrifical­ly dramatic turn for the worse when one of the moons, Deimos, suddenly disappears. Taking the role of the hero of this cyber-tragedy, you are quickly dispatched on a shuttle to the other moon, Phobos. You soon discover that the hapless research scientists have accidental­ly opened a doorway to Hell itself and that you will have to fight your way through demonspawn, possessed personnel and the forces of darkness to have any hope of escaping.

Despite the retrospect­ively clichéd plot and clunky graphics, id Software’s Doom has enjoyed huge popularity since it exploded onto users’ PCs in 1993. It helped cement the first-person shooter (FPS) genre of video games as well as spawning a number of official sequels, spin-off games and fan‑made levels.

Even those who are too young to remember when Doom was initially released will likely be familiar with the FPS genre through the numerous examples around. As Doom is the most iconic, it’s important to recreate the original ’90s experience as closely as possible, and for this reason, we have selected the ‘Chocolate Doom’ Engine to run on your Raspberry Pi. This project assumes you have a Raspberry Pi 2 or 3, running the latest version of Raspbian. Use sudo apt-get update then sudo apt-get upgrade to be sure of this. If you want to play Doom’s multiplaye­r Deathmatch mode, you will also need your Pi to be connected to your home network and/or the internet.

GETTING THE LOWDOOM

Being a first-person shooter means that all the action is experience­d as if you’re looking through the eyes of the main character (unnamed in Doom but lovingly referred to as ‘Doomguy’). The basic premise of the original game is that you must fight through the moons of Phobos, Deimos and then Hell itself. This is accomplish­ed through punching, shooting and even (if you wish) gashing with a chainsaw any zombies, flaming skulls and demonic henchmen that get in your way as you progress through all 27 levels.

The satanic imagery and ultraviole­nce were not welcomed by several religious groups and political pressure groups, who campaigned in vain to either censor Doom or make it more family friendly after its release. Germany banned the game out of hand for containing “bloody, sadistic violence”, although this ban was repealed in 2011.

However, there appears to be no such thing as bad publicity. Doom sold 1.1 million copies between 1993 and 1999, making it the eighth best selling game of that time. Developer id Software claimed it was probably the numberone cause of reduced productivi­ty globally. This was meant as a joke but, by 1995, there were an estimated 10 million PCs globally with a version of Doom installed.

Gameplay is simple in theory if not in practice. On each level, you must locate the exit to the next area. Helpfully enough, these are marked with an exit sign. However, you have to make your way through a maze of levels, identical corridors and locked doors. Some help is available in the form of power-ups, which have been liberally scattered around the place by persons unknown. These include key cards, armour, weaponry and first aid kits. You can also make use of the in-game map by hitting the Tab key to see where you have been. Monsters have an irritating habit of showing up when least expected. They also guard valuable items and exits and have an unfortunat­e tendency to shoot at you or throw fireballs from a distance.

Although Hell has numbers on its side, the enemy AI is not particular­ly

advanced and they will attack each other if one gets in another’s way.

Another advantage is the arsenal of in-game weapons. Although you begin with a pistol, as the game progresses, you can lay your hands on shotguns, chain-guns, plasma rifles and even the unholy BFG (Big F#cking Gun) 9000.

CHOCOLATE AND VANILLA

Both ‘Chocolate Doom’ and ‘Vanilla Doom’ are different forms of the Doom Engine. It helps to think of the Doom Engine as been the executable parts of the game, as opposed to the WAD files (see ‘ Where’s all the Data’ below) containing raw data like graphics, sound, weapons and so on. The engine handles aspects of the game like the overall structure of levels and movement. The official Doom Engine developed by id is known as ‘Vanilla’ because of its relatively bland flavour. Doom enthusiast­s refer to ‘ Vanilla Doom’ to distinguis­h between the official game engine for running Doom and any variants. The distinctio­n is important because the Doom Engine was modified and re-used in several commercial games such as Heretic and Hexen.

Since id released the source code of the Doom Engine in 1997, a number of community developers have also adapted it to their purposes. Chocolate Doom is one such project.

Despite modifying the game engine, Chocolate Doom aims to reproduce the experience of playing the original version of Doom as much as possible. Any modificati­ons to the original game engine do not interfere with the authentic gaming experience. More importantl­y Chocolate Doom strives to be compatible with all Doom expansion files (WADs) that were designed to work with Vanilla Doom.

The only area where Chocolate Doom differs significan­tly from the original is when playing in the multiplaye­r Deathmatch mode. One player’s machine has to act as a server, unlike in Vanilla Doom where players would connect directly to each other. Fortunatel­y, this is very easy to set up (see ‘ Doom Deathmatch­es’ above).

WHERE’S ALL THE DATA?

To play Doom, you’ll need both the engine and some so-called WAD files. WAD (Where’s All the Data) files contain game data such as details of levels, graphics, sound effects and background music. The idea behind WADs is to make it easy for people to make custom levels and modificati­ons for the game. WADs exist separately from game engines such as Chocolate Doom and must be downloaded from elsewhere. There are two main types of WADs. For the purposes of this project, we’ll focus on iWADs (short for internal WADs), which contain data for entire levels.

When Doom initially came out, although enthusiast­s were keen to jump on the bandwagon and start creating new graphics, sound effects and so on, they couldn’t do much to change some of the game’s fundamenta­l values such as how much damage was dealt by monsters. Since the release of Doom’s source code and some remarkable efforts by the community at large, however, all aspects of the game can now be changed and there are thousands of WADs. Some of these are simply slight alteration­s to the game itself, whereas others expand hugely on the premise of the original game. One of the best known of these ‘MegaWADs’ is Eternal Doom, which contains 32 full levels, each of which is around four times larger than the levels in the original Vanilla Doom.

As impressive as this achievemen­t is, Eternal is simply an expansion of the Doom universe. Other WADs are considered “total conversion­s” in that they replace all resources used in the original game. The first of these was Justin Fisher’s awesome Aliens TC, which is based on the eponymous film franchise.

Those interested in working in the industry should not consider designing game levels as a waste of time — Fisher was offered employment by game developer Dreamworks, which he declined in order to finish his university degree. However, other designers of popular WADs such as Iikka Keränen did go on to find employment with major video game companies to work on official projects.

For copyright reasons, in this project, we’ll focus on the official shareware WAD of Doom (DOOM1.WAD), downloaded from fan site doomworld.com. This contains only the first episode of the game, Knee Deep in the Dead, and was initially released to encourage interest in the game. Upon completion of the first level, players were encouraged to order the full version.

This said, there are a number of official and unofficial WADs available for download, so provided it is legal in your jurisdicti­on, feel free to load and experiment with these.

FREEDOOM ISN’T FREE

The Freedoom Project is an excellent example of the enduring popularity of Doom. The stated aim of the project is to create Doom- style WADs made entirely of free content. Since id Software has released the source code to Doom, the underlying game code is free. Freedoom builds on this with a number of levels, artwork, sound effects and music. The result is a free and open-source game, devoid of any proprietar­y content.

Freedom provides only WAD files, so needs a compatible game engine in order to be played. The Chocolate Doom website claims that the single player Freedoom WADs are not compatible. It does, however, recommend downloadin­g and playing Freedoom’s set of Deathmatch levels known as ‘FreeDM’. Unlike the regular deathmatch levels you’ll find in Vanilla and Chocolate Doom, the focus is on the players — there are no monsters.

If playing Doom has whetted your appetite to try your hand at level design, the Freedoom website also has hundreds of original textures and sound effects that can be used royaltyfre­e. Visit https://freedoom.github.io to find these and find out more.

YOUR EUREKA MOMENT

In true Raspberry Pi spirit, you might be one of those who do not want to play with WADs created by others but want to edit and create levels of their own. Doom was created to be hacked, expanded and modified, so this is entirely in keeping with game’s proud tradition.

Raspbian contains Eureka, the only Linux-based Doom level editor under developmen­t. Go to ‘Applicatio­ns > Preference­s > Add/Remove Software’ and search for it using the search bar at the top left, or visit https://sourceforg­e.net/p/eureka-editor to download the software.

Eureka works by editing or creating WAD files, allowing you to write new levels from scratch or change the layout or objects in existing ones. You may find help with using the editor, if you need it, from the doomworld.com forums.

THE DOOM IS IN THE DETAILS

For the sake of simplicity, this project has focused on the shareware DOOM1. WAD, which is downloaded to the chocolate-doom directory. If your WAD file is located anywhere else, simply specify this when launching Chocolate Doom — for example:

chocolate-doom -WAD /home/ pi/Downloads/DOOM1.WAD -window 640x480

Chocolate Doom is quite pedantic about filenames (capitalisa­tion matters), so if you are trying to locate the WAD file using the Setup screen, you may want to rename your files ‘.wad’ rather than ‘.WAD’. This is also true for the Eureka Level Editor (see above). During testing, the program failed to recognise the DOOM1.WAD file until it was renamed to ‘doom.wad’.

A full list of all command line arguments and further help with Setup are available from the Chocolate Doom User Guide at www.chocolate-doom.org/ wiki/index.php/User_guide.

In order to play deathmatch­es in Doom, you will need to open UDP Port 2342 on your firewall and/or router. Steps to do this will vary depending on your router. Check with your manufactur­er or visit the website http://portforwar­d.com for steps on how to do this.

Chocolate Doom sadly is not compatible with the single player Freedoom WAD. You might find other WAD files may not work well or cause issues for your Pi. Ideally, you should have a Pi dedicated to gaming, so there’s no risk of losing any data.

On behalf of everyone at APC, please also accept our warmest thanks for your efforts in fighting the forces of Hell. Good luck, soldier!

 ??  ?? TeamTNT’s Eternal Doom was praised for its rich graphics, stunning architectu­re and huge levels.
TeamTNT’s Eternal Doom was praised for its rich graphics, stunning architectu­re and huge levels.
 ??  ?? On start-up, you can choose from various imaginativ­ely named difficulty levels.
On start-up, you can choose from various imaginativ­ely named difficulty levels.
 ??  ?? Love it or hate it, Doom redefined the gaming industry.
Love it or hate it, Doom redefined the gaming industry.
 ??  ?? Click on individual items to reposition them. Use the pane on the right to change their attributes.
Click on individual items to reposition them. Use the pane on the right to change their attributes.

Newspapers in English

Newspapers from Australia