2.8k
Connect
  • GitHub
  • Mastodon
  • Twitter
  • Slack
  • Linkedin

Blog

Turbocharge Your Productivity with Crispy Doom and Flox

Ross Turk and Steve Swoyer | 31 October 2024
Turbocharge Your Productivity with Crispy Doom and Flox

Fun Package Fridays is a series where we ask members of the Flox team to share fun and perhaps not-so-well-known tools and utilities you can find in the Flox Catalog, powered by Nix. Today's edition comes from Ross Turk and Steve Swoyer, who comprise the totality of Flox's marketing division.

The stygian stench of sulfur scorches your sinuses, its mephitic fumes setting fire to your lungs, inflaming their sensitive alveolar fibers. Your stillsuit’s filtration system is FUBAR, you’re low on ammo, and you ate the last Snickers bar you had in your healthpack. Guess what? It didn’t satisfy you. But how could it?

It feels like you’re in hell, even though you’re supposed to be on one of the moons of Mars.

Spoiler alert: you’re in Doom, the classic first-person shooter (FPS) video game. To be pedantic, you’re inside a Flox environment, and you're playing the shareware version of id Software's Doom on your M3 MacBook, courtesy of Crispy Doom, an improved fork of Chocolate Doom that's completely compatible with classic Doom's files and demos.

How did you end up here? Because we published this week’s Fun Package Friday installment a bit ahead of schedule—just in time for Halloween! And like tens of millions of other people, you rushed to flox pull --copy it so you could run it on your local system.

It’s a sweet deal. You get a prebuilt Flox environment that runs anywhere for playing the shareware version of Doom. Or any of the Doom add-ons available in the Flox Catalog. Or any old-school DOS-based game, for that matter. (Anybody remember Duke Nukem 3D?) After all, there are more than 120,000 packages in Flox Catalog, not all of them strictly (for) business. Because sometimes you gotta load up the BFG 9000 and let loose on monsters or zombies—and we aren’t talking about zombie processes.

Intrigued? Read on to find out about how to pla—er, use this week’s Fun Package Friday entry: Doom!

Getting Doom

This article assumes you've already installed Flox. If you haven’t, you can easily download it and play along at home. We’ll pause for a moment to give you a chance to do so. (Drums fingers on keyboard.)

Ready?

OK. Once Flox is installed, you can transparently pull and activate a pre-built environment from FloxHub that includes not just Doom, but all the packages you need to run it. Just type the following command:

flox activate -r flox/crispy-doom

This creates a temporary local copy of the remote Flox environment crispy-doom, activates it, and puts you in a subshell. When you type exit to quit (or press CTRL + D), the remote environment disappears.

If you prefer to work in a persistent local environment, Flox makes this a snap, too:

cd ~/dev && mkdir doom && cd doom && flox pull –copy flox/crispydoom
✨ Created path environment from flox/crispy-doom.
 
You can activate this environment with 'flox activate'

Using Doom

To use the Doom productivity utility built into the crispy-doom Flox environment, just type flox activate.

This puts you into a typical Flox subshell and surfaces some helpful hints you can use to get started:

✅ You are now using the environment 'crispy-doom'.
To stop using this environment, type 'exit'
 
 
     ╔════════════════════════════════════════════╗
     ║                                            ║
     ║    Edit the environment to switch game     ║
     ║    libraries inside the [vars] section:    ║
     ║    👉 flox edit                            ║
     ║                                            ║
     ║    Start a nice game of Doom:              ║
     ║    👉 runcrispy                            ║
     ║                                            ║
     ╚════════════════════════════════════════════╝
 
flox [crispy-doom] daedalus@askesis:~/dev/crispy-doom/crispy-doom$ runcrispy

Typing runcrispy and pressing ENTER treats (some of us) to a quite familiar splash screen:

Amazingly, not only is the Flox crispy-doom environment fully functional—with graphics, sound, keyboard, and mouse controls—on macOS and Linux, but on Windows systems with WSL2, too! Credit Flox, to be sure, but also credit the Crispy Doom project. Incredible work!

Except for the screenshot below, all the rest of the screencaps in this article were created (usually during important Flox meetings, whilst one of us was totally paying attention and not at all phoning-in their presence) using an Ubuntu WSL2 instance on Windows 11. With sound effects turned up to 11.

Believe it or not, playing Doom for work is ... hard work! At first, we spent a stupendous amount of time looking for this guy ...

... while dusting-off old cheat codes like idspispopd, iddqd, and idkfa in the process.

Try as we might, we couldn’t find the Cyberdemon on our own, so finally we gave up and just typed idclev<number>, which is the cheat code you use to skip levels. That’s when we figured out ... the Cyberdemon isn’t in the shareware version. So we recalibrated our strategy, opting to focus on speed-running Doom levels. Totally and completely without cheating, of course!

Advanced Usage

Ross Turk, who designed this environment, built some optional IWAD (i.e., “Internal WAD) files into it. You can enable these by typing flox edit, which puts you into Flox’s built-in editor.

You use this editor to make changes to a Flox environment. (Alternately, you can navigate to .flox/env/manifest.toml and open that file in your preferred editor. The manifest.toml file is always found in this path. It’s the declarative configuration artifact for every Flox environment.)

To enable the optional IWAD files, just uncomment them under the # Freedoom section as shown below. Important Safety Tip: Also make sure you comment the entries under # Original Doom shareware.

[vars]
# Freedoom
doom_url = "https://github.com/freedoom/freedoom/releases/download/v0.13.0/freedoom-0.13.0.zip"
doom_iwad = "freedoom-0.13.0/freedoom1.wad"
 
# Original Doom shareware
#doom_url = "http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip"
#doom_iwad = "DOOM1.WAD"

If there’s a custom Doom version you want to use in a software project and/or strictly for productivity purposes, you can add it here. With a little Web searching you might could turn-up a complete version of Doom, including the expanded The Ultimate Doom, which packs three extra levels and spookier music.

You won’t find these commercial packages in the Flox Catalog. You will, however, find other open source versions of Doom, along with multiple versions of Quake, Duke Nukem 3D, Wolfenstein 3D, Rise of the Triad, and other games that have been released as shareware, or whose engines have been made open source. There’s even a reverse-engineered version of the cult-game Carmageddon, aptly named dethrace, punning on Paul Bartel’s 1975 cult-classic film Death Race 2000.

So this has been this week’s Halloween edition of Fun Package Friday.

Happy FPS-ing!