Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,20 @@ nextflow run doom

> [!NOTE]
> All credit for the Java implementation go to this project: https://github.com/gaborbata/vanilla-mocha-doom

## Troubleshooting

### Sound error: NullPointerException

If you see an error like:

```
Cannot invoke "javax.sound.midi.Receiver.send(javax.sound.midi.MidiMessage, long)" because "receiver" is null
```

This occurs on systems without MIDI audio devices. Run with `--nomusic` to disable music only, or `--nosound` to disable all audio:

```bash
nextflow run doom --nomusic # Disable music only
nextflow run doom --nosound # Disable all sound
```
6 changes: 5 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env nextflow

params.nomusic = false
params.nosound = false

process printLogo {
output:
stdout
Expand Down Expand Up @@ -71,8 +74,9 @@ process playDoom {
val true

script:
def soundFlags = params.nosound ? '-nosound' : (params.nomusic ? '-nomusic' : '')
"""
java -jar $projectDir/lib/mochadoom.jar -iwad $projectDir/doom1.wad
java -jar $projectDir/lib/mochadoom.jar -iwad $projectDir/doom1.wad $soundFlags
"""
}

Expand Down