Mocha Doom is a pure Java Doom source port. Most of the hard work of porting Doom to Java has already been done, thanks to Velktron (Maes) (see Programming tricks for technical details), but he has stopped working on it in 2013.
Although the port is almost complete and many bugs have been fixed by contributors, some work remains to do, most importantly the network code for the multiplayer is missing.
This fork of Mocha Doom is intended to support the classic (vanilla) key controls, fix some bugs, and provide some pre-compiled binaries and startup scripts for convenience.
You can find the latest distribution package under the releases link.
Mocha Doom can play original variants of Doom. If you don't own any, the easiest way to obtain them is to purchase them from Steam or GOG. You may also download the freely distributable Shareware version of Doom (also included in this repository) from one of the following links:
- http://cdn.debian.net/debian/pool/non-free/d/doom-wad-shareware/doom-wad-shareware_1.9.fixed.orig.tar.gz
(extract it and copy the
DOOM1.WAD
file into your Mocha Doom directory). - https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad
-
Mocha Doom requires Java, so first of all make sure you have installed Java and please make sure
PATH
, orJAVA_HOME
environment variables point to that installation. -
Once you have the JAR file, you can run Mocha Doom with one of the following batch/scripts/commands. Each script has a
classic
andmodern
version which launches Doom with classic or modern key controls, respectively.- Linux
mochadoom.sh
mochadoom-classic.sh
mochadoom-modern.sh
- Windows
mochadoom.bat
mochadoom-classic.bat
mochadoom-modern.bat
- Platform independent
java -jar mochadoom.jar
java -jar mochadoom.jar -config classic.cfg mochadoom.cfg
java -jar mochadoom.jar -config modern.cfg mochadoom.cfg
Mocha Doom tries to find a valid Doom WAD file in the directory defined by the
DOOMWADDIR
environment variable (defaults to the current directory).If it is not found, you can use the
-iwad
parameter to provide a valid WAD file, e.g.:mochadoom -iwad wads/DOOM1.WAD
. - Linux
Check CONFIG.md for more options to tune rendering speed and quality of Mocha Doom.
You can use classic.cfg
(default) configuration in order to have the old-school classic key controls (i.e. arrow keys).
If you prefere the modern keyboard/mouse layout (WASD), use the modern.cfg
configuration.
If no configuration is provided, the default.cfg
will be used which is the same as classic.cfg
.
Configuration | Classic (Default) | Modern (WASD) |
---|---|---|
key_right | 77 (right arrow) | 77 (right arrow) |
key_left | 75 (left arrow) | 75 (left arrow) |
key_up | 72 (up arrow) | 17 (W) |
key_down | 80 (down arrow) | 31 (S) |
key_strafeleft | 51 (Alt+left arrow) or comma | 30 (A) |
key_straferight | 52 (Alt+right arrow) or period | 32 (D) |
key_fire | 29 (Control) | 29 (Control) |
key_use | 57 (Space) | 18 (E) |
key_strafe | 56 (Alt) | 56 (Alt) |
key_speed | 54 (Shift) | 54 (Shift) |
use_mouse | 1 (enabled) | 1 (enabled) |
mouseb_fire | 0 (left button) | 0 (left button) |
mouseb_strafe | 1 (right button) | 1 (right button) |
mouseb_forward | 2 (mid button) | 2 (mid button) |
- Open the project with IntelliJ IDEA, Eclipse or NetBeans
- Build and run the project (entry point:
mochadoom.Engine
)
On Linux, two different scripts can be used.
-
build-and-run.sh
which will build Mocha Doom and run it. You can use it as such:./build-and-run.sh -iwad wads/DOOM1.WAD
.This is the preferred way to quickly test changes for developers.
-
build-jar.sh
which will build a JAR file. You can then run the JAR file as such:java -jar build/libs/mochadoom.jar -iwad wads/DOOM1.WAD
.This is the preferred way for distributing a Mocha Doom executable.
Gradle is a cross-platform build tool, which can be also used to run and build Mocha Doom. First of all, you have to install Gradle following its installation notes. After that you can use one of the following commands:
-
Run Mocha Doom:
gradle clean run --args="-iwad wads/DOOM1.WAD"
-
Build a JAR file:
gradle clean build
This creates a JAR file in the
build/libs/
folder. You can then run the JAR file as such:java -jar build/libs/mochadoom.jar -iwad wads/DOOM1.WAD
.The build task also creates a distribution package under:
build/distributions/mochadoom.zip
Mocha Doom contains work from many contributors. Here are the main contributors, but it's no limited to this list. Others are listed in the copyright headers of the files where they own copyright.
- Copyright (C) 1993-1996 id Software, Inc.
- Copyright (C) 2010-2013 Victor Epitropou
- Copyright (C) 2016-2017 Alexandre-Xavier Labonté-Lamoureux
- Copyright (C) 2017 Good Sign
- Copyright (C) 2023 Gabor Bata
Mocha Doom is distributed under the GNU GPLv3 License.
Shareware Doom is distributed under the Doom WAD Shareware License.