Reading Time: 8 minutes

The Hugo series on this blog: Part 1: Hugo's House of Horrors (1990) · Part 2: Hugo II, Whodunit? (1991) · Part 3: Hugo III, Jungle of Doom! (1992) · Part 4: Nitemare-3D (1994) (you are here)

Hugo's fourth adventure isn't an adventure. In 1994, two years after Hugo III, David P. Gray released Nitemare-3D: a first-person game in 256-colour VGA in which Hugo walks the corridors of Dr. Hamerstein's mansion with a plasma gun, a magic wand and a pistol full of silver bullets, looking for Penelope (again). Gray wrote the 3D engine himself, ported it to Windows before almost anyone else, and won a shareware award. Then a German government agency put it on its list of media harmful to young people for blood that isn't in it.

Unlike the first three games, Nitemare-3D isn't supported by ScummVM, and we don't have its data. So this post draws on the 1994 documentation that shipped with the shareware episode, Gray's interviews and the contemporary record, and explains the technology with a small engine of our own.

Spoilers for the ending are flagged where they appear.

The file on Nitemare-3D

Nitemare-3D
ReleasedDOS: 17 May 1994 (Gray's date). Windows 3.1: December 1994
Designer and programmerDavid P. Gray
Art and musicDenise M. Tyler (art); David B. Schultz (music)
FormatThree episodes of ten levels each; episode 1 shareware
Episodes1. A House of Horrors · 2. The Plasma Core · 3. Death or Glory
Needs386 or better, 565 KB of free conventional memory, up to 2 MB of extended memory, 256-colour VGA; Sound Blaster for digitised effects; mouse and joystick supported
Price to register$29 plus $4 shipping for the trilogy
AwardZiff Davis, Best 1995 Shareware Game (according to Gray)
LaterUpdated by Gray to install on Windows Vista; sold for years afterwards by Gray Design Associates
A timeline from 1988 to 2019: Gray Design Associates, the three Hugo adventures, Nitemare-3D for DOS and Windows, the Windows trilogy, the German indexing, Jigsaws Galore, ScummVM and GOG
Gray Design Associates at a glance. Blue: the Hugo adventures. Red: Nitemare-3D. Green: the afterlife.

Why a shooter?

Gray's own account (to RGB Classic Games, 2008) is a good story. Nitemare-3D was inspired by Catacomb Abyss, one of the early Catacomb 3-D games, and it took far longer to write than he'd expected. It started life as a space-pirates game. Then he fell out with his artist, whom he didn't name, and started over with a new artist and a new idea: a 3D remake of Hugo's House of Horrors.

So the plot is the first game's plot, at shooter speed. Penelope has been kidnapped by Dr. Hamerstein (Gray's spelling, a nod to Hammer horror films; most write-ups add a second m) for his experiments. Hugo has to fight through the mansion, then caverns with prisons and laboratories, and finally, through a mystical mirror, a twisted other dimension full of demons and aliens.

Three groups of ten numbered squares for the three episodes, with names and settings, episode 1 marked shareware and episodes 2 and 3 registered
Thirty levels. Each one ends when you find the key card that opens the transporter to the next.

Not the Wolfenstein engine

People have often assumed Nitemare-3D was built on id Software's Wolfenstein 3D engine, and Wikipedia once said so. Gray's answer was simple. It couldn't have been: the DOS version came out on 17 May 1994, the Wolfenstein engine was released to the public a good while later, and he wrote his engine from scratch because there were no engines available.

It is, though, the same kind of engine: flat levels on a grid, walls at right angles, and untextured floors and ceilings. Here's how that kind of engine works, using a hundred-line raycaster we wrote for this post:

Animation: on the left a top-down maze with a fan of yellow rays from the player; on the right the first-person view of the corridors those rays produce
Left: the map the engine really works with. Right: what the player sees. One ray per screen column. (Our code, not Nitemare's.)
A top-down grid with rays from the player to walls, beside the first-person view with matching columns marked
Each yellow line on the right is one column of the picture, and its height depends only on how far its ray travelled.
  1. For each of the 320 screen columns, cast a ray from the player across the 2D grid.
  2. Step from square to square (the DDA method) until the ray enters a wall square.
  3. Draw that column's slice of wall with a height of constant ÷ distance. Use the distance measured straight ahead rather than along the ray, or the walls bulge like a fisheye.
  4. Fill the ceiling and floor with flat colours.
  5. Draw monsters and items as flat pictures scaled the same way, from furthest to nearest.

On a 386 this is fast because there's only one ray per column, not per pixel, and walls are just stretched strips. That's why games of this generation have no stairs, slopes or rooms above rooms. The map really is flat.

First on Windows

Gray's proudest claim is about Windows. Nitemare-3D for Windows came out in December 1994, before Windows 95. To the best of his knowledge it was the first first-person shooter to run as an ordinary Windows application. It ran on 16-bit Windows 3.1 using WinG, Microsoft's stopgap library for fast game graphics inside a window. Before it, Windows couldn't redraw a full-screen picture fast enough for this kind of game, so action games stayed in DOS.

Its afterlife is a good lesson in software archaeology too. When Windows Vista arrived, Gray found the game itself still worked. It was the 16-bit installer that Vista refused, so he swapped in a 32-bit installer and barely touched the game. As he noted, 64-bit Windows doesn't run 16-bit programs at all, so you need a virtual machine for that.

What the 1994 docs reveal

The shareware episode shipped with a TECHNOTE.TXT, a set of frequently asked questions. It's a time capsule of what PC gaming involved in 1994:

  • Memory. You needed 565 KB of free conventional memory, and the advice is to unload TSRs or run DOS 6's memmaker. Up to 2 MB of extended memory makes it faster, and Gray points out that giving that memory to a SMARTDRV disk cache works almost as well.
  • Sound. Music plays on any AdLib or Sound Blaster compatible, but the digitised effects need a "true" Sound Blaster. Cards like the PAS 16 had to be switched into SB emulation at IRQ 7, DMA 1, port 220h. Only a Sound Blaster Pro or later has the mixer chip for in-game volume control.
  • Startup switches. -t avoids timer interrupts, -x ignores extended memory, -p forces the PC speaker (with a warning that it gives "very poor results"), -s skips sound-card detection, which could hang some machines, and -o writes a DEBUG.TXT log of each startup step.
  • Windows. The DOS version isn't designed to run under Windows. The FAQ's advice is, in general, don't.

The file list is revealing too: IMG.1 (1.9 MB of graphics), MAP.1, SND.DAT, UIF.DAT, GAME.PAL, DEMO.DAT and NITE3D.BSF. RGB Classic Games notes that the 72 KB executable was compressed with DIET and built with a third-party library, the Worx Toolkit, which may be the "third-party sound functions" the FAQ mentions. The .BSF is a nice link to the adventures. ScummVM expects a .bsf "boot" file for the Hugo games too, and uses it to tell a registered copy from shareware and to print "Distributed by..." for shareware vendors. Nitemare's debug log begins with "Bootstrap ok".

Puzzles with guns

Nitemare-3D is a shooter that still thinks like an adventure. The vendor description promises puzzles, "some of which are easy, some not quite so easy", and the mechanics back that up:

  • Four weapons, four ammo types. A plasma gun, a magic wand, a pistol and an auto-repeat plasma gun, each with its own ammunition.
  • Monsters have weaknesses, so the right weapon matters more than aim (see the chart).
  • Secret panels everywhere. Some hide bonuses, others are the only way through a level.
  • Magic eyes power an automap (with a radar for enemies) and light up an eye on the status bar when you're near a secret wall. Crystal balls show where the monsters are. Both drain power while in use.
  • Hugo's face on the status bar shows his health, as in Wolfenstein and Doom.
A grid of enemies (witch, robot, vampire, ghost) against weapons (plasma gun, magic wand, pistol, auto plasma), with the cells described in published sources filled in
What hurts what, according to published descriptions. Blank cells weren't described anywhere we could find.

Hardcore Gaming 101 wasn't a fan of the result. With separate ammo stocks, running out of the right kind can leave you stuck facing monsters that are immune to everything else. Enemies mostly hit you instantly, health is scarce, and dying throws you back to the main menu. But it also noted the cheesy organ music, the gargoyles around the screen, and the 1930s monster-movie mood of Frankenstein monsters, ghosts and witches.

A shareware business, changed

Bar chart of registration prices for Hugo II, the Hugo trilogy and Nitemare-3D, plus a comparison showing shareware income six times retail royalties
Prices from the original order forms. The 6:1 ratio is Gray's, from his 2011 interview with Adventure Classic Gaming.

The Hugo adventures were complete games on the honour system. You could copy and finish them, and registering bought a hint booklet and a self-playing version. In 2011 Gray told Adventure Classic Gaming that shareware earned him about six times as much as retail royalties, even after a 1992 deal put the games in shops through a publisher called Sofsource.

Nitemare-3D was the first Hugo game sold the way Apogee and id sold theirs: episode one free, the rest only for paying customers. Registering brought all three episodes, a 30-page hint booklet with a full walkthrough, a map viewer showing every wall, monster and secret panel in all thirty levels, and four cheat functions. According to HG101, those include god mode, infinite ammo and unlimited map power.

Banned in Germany, for blood it doesn't have

Gray made Nitemare-3D for all ages: there's no blood or gore, and the monsters are cartoonish. Even so, German authorities added it to their index of media harmful to young people. Gray remembered the official documents accusing it of spurting blood and death screams, which amused him. He recalled the ban as 1995. MobyGames dates the indexing of the Windows version to 31 January 1996.

The ending, and the end (spoilers)

According to Hardcore Gaming 101, the game ends with Hugo and Penelope escaping the mansion, and then Penelope telling Hugo she has to leave him, because after what she saw of Hamerstein's experiments she has things she needs to do. If it was a sequel hook, nothing came of it. Gray decided he hated the idea of spending years on a game that charts for a moment and then disappears, and wrote a jigsaw puzzle program, Jigsaws Galore. It was still selling, by then in version 7, when he spoke to Adventure Classic Gaming in 2011.

He has been asked about new Hugo games ever since. In 2008 RGB's interviewer offered to do the voices. Gray said he'd think about it, then answered "...No!" By 2011 he had softened a little, noting the strong retro market and that ScummVM had brought the trilogy back. He said another game would need the right artist, because he would never go near a paint program again.

What we learned

  1. One programmer could still build a 3D engine in 1993–94. The raycasting idea is simple enough to write in an afternoon, but making it fast on a 386 was the real work.
  2. Platform timing matters. WinG was a small, temporary library, and being early to it gave a shareware game a real first.
  3. Shareware has more than one model. The Hugo adventures gave away the whole game, Nitemare kept two thirds back, and the registration extras (hint books, map viewers, cheats) were what you were really paying for.
  4. Documentation is history. A 139-line FAQ tells you more about 1994 PCs than most retrospectives: IRQs, DMA channels, memmaker and DIET.
  5. Check claims against dates. The "Wolfenstein engine" story and the date of the German ban both fall apart once you line up the dates.

Sources

  • Nitemare-3D shareware episode documentation (1994): VENDOR.DOC, TECHNOTE.TXT, ORDER.TXT and FILE_ID.DIZ, via the textfiles.com Discmaster archive.
  • Interview with David P. Gray, RGB Classic Games, 2008; RGB's Nitemare-3D page (versions, requirements, episode names).
  • David Gray interview, Adventure Classic Gaming, 2011.
  • Wikipedia (credits, weapons, award); Hardcore Gaming 101's Nitemare 3D article (2017, via the Internet Archive); MobyGames for the indexing date.
  • The raycaster, diagrams and charts are our own.

The Hugo series on this blog: Part 1: Hugo's House of Horrors (1990) · Part 2: Hugo II, Whodunit? (1991) · Part 3: Hugo III, Jungle of Doom! (1992) · Part 4: Nitemare-3D (1994) (you are here)

← All articles

Related articles