The making of Dark Castle: An excerpt from The Secret History of Mac Gaming

March 22, 2018
The making of Dark Castle: An excerpt from The Secret History of Mac Gaming
Game Developer logo in a gray background | Game Developer

What follows is a chapter from The Secret History of Mac Gaming, a new book written by Gamasutra contributor Richard Moss. In this chapter, Moss charts the origins and impact of Silicon Beach Software's seminal game Dark Castle.

Charlie Jackson had a dream to play sport for the United States national team. Which sport didn't matter too much, so long as he could be on the team. The dream came to him in college, when two of his rowing teammates each made a different United States team — one for the World University Games and the other for the World Championships.

Jackson was skilled in soccer, athletics, and rowing, but he could see he wasn't going to attain the level he needed to compete internationally in those. He had to find another sport. The answer came during his four years of active service with the United States Marine Corps. He was a communications officer, but he also took up competitive rifle and pistol shooting. Within a year he was good enough to make the Marine Corps team, which he represented at both regional and national championships.

Jackson continued shooting competitively for the Marines after his service. He split his time between running technology-centric businesses and competing on the Marine Corps Reserve team — which he later likened to getting paid to be on the pro golf circuit, as everything he needed during competitions was provided.

The kind of shooting he did in the Marine Corps Reserves was different to the one done internationally at events like the Olympics, however. In order to get good enough to compete internationally in that other style, he knew he'd have to train full-time for a year or two. But to do that he needed more money.

Come January 1984, when the Macintosh was officially introduced, Jackson was running a computer training business. He taught people how to use their Apple II and IBM-PC machines. He'd been an early adopter of both platforms and had seen how little software was available for them at the beginning. He'd also seen how other early adopters were desperate to buy software for their exciting, expensive new gadget. They'd buy almost anything if it gave them a reason to spend more time using their computer.

Jackson knew this would happen with the Macintosh, too. A new software company could grow quickly if it could get in early. But he was an entrepreneur. A businessman. He couldn't write code. In order to find the right people — people excited by the Mac who knew how to program computers — he logged onto an online newsgroup and announced the first San Diego Macintosh User Group meeting. He hosted it in his own house. Thirty-five people crammed into his upstairs office to chat about this revolutionary new personal computer. After the meeting, a man walked up to Jackson and proudly introduced himself. His son, Jonathan, had won a California school science fair award for programming a graphics editor for the Apple II. "Oh, really, you think he'd be interested in programming on a Macintosh?" Jackson asked. He sure would.

Eric Zocher also stayed back at the end of the meeting. He was a computer science student at the University of California, San Diego (UCSD). He'd seen the Lisa and spent a lot of time with minicomputers and mainframes in the university's computing centre, but Zocher had never owned a personal computer of his own. He'd listened excitedly to the rumors about the Mac back in 1983, and now he was eager to finally try it out.

Jackson told him about how he wanted to start a software company. "I'm a programmer!" Zocher blurted out. "I want to work with you." Just like that, Zocher was in.

They quickly discovered that programming on a Macintosh using the official Apple development tools required a Lisa, which brought an additional cost in the thousands. Not one to be discouraged, Jackson withdrew most of his life savings, bought a Lisa, signed up for the Apple developer program, and founded the company Silicon Beach Software in mid-1984. He then met with seventeen-year-old Jonathan Gay and made a deal. Gay wouldn't get any money up front, but he'd get royalties on sales of a Macintosh game that he'd program on weekends.

Jackson handed over unlimited access to the Lisa without a second thought. He did no due diligence, no programming tests. He trusted that things would work out for the best.

Jonathan Gay turned out to be too good a programmer for Charlie Jackson to keep up with. No sooner would he give the teenager a new task than it'd be done. In a matter of weeks their game began to take shape. Airborne! would be about repelling an onrushing military airborne force. Armed with an anti-aircraft gun and a mortar mounted behind light fortifications, the player needed to move the mouse to angle her shot and destroy the endless waves of tanks and soldiers that parachuted onto the screen, and to shoot down the jets, helicopters, and cargo planes that flew overhead. (Pressing the space bar would switch between the two weapons while Command-S would make anti-aircraft shells steerable with the mouse.)

Before long they started talking about the game's startup screen. They wanted to have a picture that would capture the mood and spark the player's imagination. Jackson suggested they have an airborne trooper wearing a beret. The soldier could snap a salute and say "Airborne, sir!" — just like a real trooper would when passing an officer. Jackson had noticed how Apple II games used programmed square waves to make surprisingly sophisticated sounds, even to the point of mimicking a human voice. He hoped the Macintosh could do the same.

Eric Zocher began to investigate. He looked through his Inside Macintosh manual and found a four-voice synthesizer that would play square waves and simple waveforms. It could make beeps and boops and other sounds just like other home computers of the time. Just like Charlie Jackson wanted. But Zocher had no idea how to figure out what amplitudes and frequencies of square waves could combine to make something sound like an explosion, let alone a voice. He thought he'd try recording some sounds that he'd like to recreate with square waves, then get them onto a minicomputer at the university and look for a way to programmatically approximate the waveforms that correspond to the recorded sounds.

As he researched further, however, he realized the Mac could already play the recorded sounds. It had another built-in sound driver — one that could play sampled digital sounds, one at a time, if you could somehow get the samples onto the Mac. It's just that nobody had tried.

Charlie Jackson had been doing graduate study in linguistics at UCSD and had friends in the phonetics lab, where they were using audio digitizing equipment to study the human vocal tract and identify the mechanics of how people speak. The pair took Zocher's cassette recordings to the lab. Zocher then wrote utility programs to shrink the sampling rate (the number of samples, or snapshots, of audio carried per second) and adjust the bit depth, or audio resolution, from 16 bits to 8 bits. They used a 300 baud modem and an acoustic coupler to transfer the files to the Mac, where Zocher played them using a little program he'd written to tap into the sound driver.

Their jaws dropped. "It was just amazing because no one had ever heard anything like that come out of a computer," Zocher recalls. "It was a bit tinny with the little Macintosh speaker, but it wasn't a bad speaker in the Mac. It was so faithful, and we had never heard that before. It was basically digital audio coming out of the Mac. And we were like, 'Oh my god, could you do the game this way? Could we do the music and the sound in a game this way?'"

Zocher put together a simple audio wave editor for his Mac that would allow him to test and refine various sound effects and music. A devoted music fan, he recorded the samples from his collection of 500 vinyl albums. He and Jackson picked records that they believed were out of copyright, such as symphonic recordings from the 1950s and sound effects records from the early 1960s. They whittled down the samples through a process of trial and error — some things sounded bad on the Mac, while others were too long or didn't match well with the game animation.

They had just sixteen kilobytes remaining on the disk for audio after accounting for the rest of the game, which Gay had coded in assembly language for maximum efficiency. All sounds had to be very brief, then, with loops used wherever possible (for example, a helicopter that goes "wop-wop-wop-wop" could have a stored sample that's just "wop", and then the game repeats it). They got a dozen sounds into the game this way, and Zocher even figured out a way to play two sounds simultaneously by dynamically mixing them together into one signal.

There was just one problem. The Mac speakers would pop, loudly, before every sound. But not always. They didn't have any oscilloscopes, so to figure it out Zocher got Jackson to do some grunt work. Using the wave editor, Jackson would hold the shift key and click to add one byte to the sound file and test it again. Zocher kept track of where the pops occurred and where they didn't. "I remember him at one point on his calculator," Jackson says, "he goes, 'I got it! The sound buffer has to be full.'" The Macintosh sound generator converted the entire sound buffer, down to the very last byte, into audio, and it did this at set intervals.

The Macintosh screen refreshed sixty times a second, and each time a vertical retrace interrupt would run. This interrupt served a very specific and important purpose. It allowed the retrace beam that draws the graphics across the screen, one line at a time from left to right and top to bottom, to return to the top left corner, ready to redraw the graphics. They needed to not only fill the sound buffer completely but also to time their sound buffer updates to synchronize precisely with this beam, or else they'd get audio flickering in the form of popping sounds. Every sixtieth of a second, during the interrupt, his new and improved sound driver would look for the two highest-priority sounds, mix those together, and fill the 370-byte-long sound buffer. It worked a charm.

The first Macworld Expo came up in early 1985, just a few weeks before they finished the game. Strapped for cash, the trio packed all their own gear and folding tables into Jackson's brother's beat-up old Volkswagen camper and drove from San Diego to San Francisco to show Airborne! in a little three-by-three-meter booth space in the basement of the Moscone Center. They hooked the Mac up to Zocher's huge waist-high stereo speakers and booted Airborne! for the crowd to play.

As luck would have it, their booth was at the bottom of the ramp coming down to the show floor, so everybody who arrived would hear the Airborne! sounds and music (the opening few bars of Richard Wagner's famous composition "Ride of the Valkyries").

Airborne! drew lots of positive attention and buzz across the three days of the show, including from much of the Macintosh team, who were all curious how the Silicon Beach crew got the sounds to work, and from the independent retailers that scoured the floor for exciting new software and who collectively ordered hundreds of copies for their stores.

Jackson took a third mortgage on his house to pay for mass production of Airborne! boxes, an advertisement in Macworld magazine, and shipping to distributors and retailers (which for the first few months happened out of his house).

Airborne! was successful enough to establish Silicon Beach Software's reputation on the Mac software scene and to pay for an office plus full-time salaries for a couple of staff. The company soon expanded into productivity software with desk accessory collection Accessory Pak #1 and label printing utility Silicon Press. They also published Bill Appleton's World Builder game authoring software and one of four games, Enchanted Scepters, that they planned to use to showcase the World Builder technology. (Sales of Enchanted Scepters weren't good enough to justify development of the other three.)

For their next in-house game, Jackson wanted to get a real designer involved. He'd done okay on Airborne!, but he knew that was about the limit of his talents. In any case, the company was in a position where he felt like they should bring in somebody who knows their stuff. Somebody experienced. They could think of just the guy.

Mark Stephen Pierce had entered the School of the Art Institute of Chicago, one of America's top art schools, when he was fourteen. He was a talented illustrator, but what he really loved to do was play around on a computer he'd found in one of the school's labs. This computer couldn't display graphics, so he'd fill the entire screen with one type of text character and then change the characters in certain places to make simple animations. A year or two later, in 1979, the school got a graphics computer called the Z-Box, which used the same chipset as the Bally Astrocade, a home video game console renowned for its impressive graphics capabilities.

Pierce loved to draw graphics on the Astrocade. He'd use a program written in Bally BASIC that allowed the trigger on the gun controller to act like a pen, so he could draw by pointing the gun at the TV. That was cool, but the Z-Box was more sophisticated. It had multiple framebuffers, each of which could store a screen-full of graphics, which meant he could quickly flip between them to create animations — just like drawings in a flipbook.

He'd come at night when nobody else was using the machine and work on it until morning. At one point he created an animation of Albert Einstein with his eyes blinking and mouth talking. When the semester finished, the Z-Box's creator, Tom DeFanti, returned to the school to see what students had created. DeFanti was so impressed by Pierce's work that he offered him a job.

Pierce was paid $15 an hour to make animations and graphics they could use to impress company investors and attendees at industry events like the Consumer Electronics Show and SIGGRAPH. His creations earned him great acclaim, and a new job. He began working for Dave Nutting Associates, a consulting firm that made coin-operated games for Bally Manufacturing Corporation.

They tasked him with animating the multiple-choice questions on an arcade game called Professor Pac-Man. While there, he started hanging out with two colleagues, Marc Canter, who he'd met in art school, and Jay Fenton (now Jamie Fenton). Canter was working on audio for the company, while Fenton had designed a popular arcade game called Gorf. They'd created three tools to help them with their work: one for painting, another for animation, and the other for audio. The Mac was just on the horizon, and they thought it'd be a cool idea to do commercial versions of their tools for that. They quit their jobs and founded MacroMind, where they developed MusicWorks (for audio) and VideoWorks (for animation).

Pierce loved to play around with VideoWorks. He could draw like a man possessed for twelve hours straight, then somehow have energy to party all night. It was satisfying work, too. He could begin the day with nothing and finish it with an animation of a guy that runs left and right and jumps through a hoop, catches fire, and explodes. Its immediacy was like nothing else. Whereas traditional animation required drawing on paper and taking pictures, then getting film developed and edited, computer animation with a tool like VideoWorks could happen in seconds.

MacroMind's software gained some traction, but by 1986 they were out of money. To keep the company afloat, Canter's father-in-law made an investment. Not yet aware of how investments and business work, Pierce was outraged that the investment should dilute his own share in the company. He quit in a huff.

Zocher had seen Pierce's sample animations and still images on the disk and in the manual for VideoWorks. He couldn't believe how good they were. Drawing with a mouse was like drawing with a pack of cigarettes, but Pierce had somehow mastered that most inelegant yet powerful of "brushes". Macworld magazines at the time would showcase illustrations done by professional artists with MacPaint, and it was amazing, but Pierce's work was on another level. Keen to work with the now-independent artist and animator, Charlie Jackson flew Pierce out from Chicago to San Diego to talk about their new game.

On the drive from the airport to his house, he explained their idea for a platform game. Some guy with modern weapons would walk through a portal at the end of every level and the next world would be totally different. Zocher had got the idea from a short-lived TV show about a family that stumbled through a portal, and a military board game called TimeTripper, which involved pitting modern soldiers against foes from across the ages — dinosaurs, Roman gladiators, future spacemen, and more.

Pierce thought it was stupid and incoherent. Instead, he said, "Here's what we're gonna do." In a fit of sudden creative inspiration, Pierce drew out a storyboard of the whole game, which he called Dark Castle. It would be a quest against an evil Black Knight who can only be defeated by surviving a series of trials and obtaining a magic shield and the power to hurl fireballs. He told them, piece by piece, approximately how the game would work. The Silicon Beach people in attendance — Eric Zocher, Charlie Jackson, Charlie Jackson's wife, and Jonathan Gay — had no objection to being talked to that way. Pierce was the expert. If anything, they were impressed. The five of them plus the ten-year-old son of one of Jackson's friends then spent the rest of the afternoon sitting around a whiteboard, fleshing out the story and brainstorming ideas for the details of specific rooms and weapons.

Pierce flew back to Chicago the next day and started working on the game. He'd draw artwork in SuperPaint — Silicon Beach's upcoming paint program — and make animations with VideoWorks, then physically mail them on floppy disks to Jonathan Gay. Excited to receive more of Pierce's artwork, Gay would incorporate these animation and design fragments into the code. Then he'd send back a build of the game for Pierce to try. And so it went on, back and forth for about four months. Initially they'd have to wait a few days each time as the disks traversed the 3,000 kilometers (around 1,800 miles) between San Diego and Chicago by regular mail. But partway through development the Federal Express mail service expanded to include express parcel-tracked shipping between their respective cities. Suddenly they could send floppies across the country overnight.

Tags:

No tags.

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Explore Features>>