Discover more from The Mad Ned Memo
A Talk With Computer Gaming Pioneer Walter Bright About Empire
Our discussion on the creation of the great-granddaddy of all computer wargames
I recently posted an article about resurrecting old code, and went into some detail about how I brought a program for the TRS-80 I wrote in 1982 back to life. This post had some interesting discussion on Hacker News, and among these comments was one from a reader who mentioned that his oldest code was from 1978, and is still available on GitHub.
The author of this response was none other than Walter Bright, compiler expert and creator of the D programming language, as well the author of the very famous program that he had referred to in his Hacker News reply. That program was Empire, written in 1978 for the DECsystem-10 mainframe and is one of the earliest examples of a computer wargame. Empire contained then-groundbreaking features we still know and love today, including maps featuring cities, water and complex landmasses, fog-of-war mechanics, and a formidable computer AI that plays by the same rules you do.
I encountered Empire while taking classes at the University of Hartford in 1981, where it was installed on their brand-new VAX 11/780 computer. It was the first time I ever played a computer wargame, and I was instantly hooked, spending valuable time on the system’s VT100 terminals conquering cities rather than doing my data structures homework.
I did pass that course, but no thanks to Walter. Forty years later, I was very surprised to have run across him in this way. I asked him if he would be willing to discuss the development of Empire with The Mad Ned Memo, a request to which he graciously agreed. I am delighted to share it with you now!
MNM: Hi Walter, thanks so much for taking the time to talk with The Mad Ned Memo about your work, and the development of Empire. I’ll start with an observation. Looking through your long list of accomplishments, Empire seems to be a bit of an outlier in your work, which has more of a focus on programming language, compiler design, and related computer science topics. What are your thoughts about that?
WB: A perennial problem I had with Empire is the computers of the time simply were not powerful enough. It ran slowly, and games where the computer played itself lasted several hours. (Today, a second or two!) This meant I became more and more focused on optimizing the code, and so became more and more interested in compilers and languages. I figured I could do better than the existing ones!
MNM: Which would bring us to talking about the D programming language, something I want to touch on in a bit. But you just answered a question I was going to ask, about whether the game was the consequence of some computer science project, or the other way around. Sounds like the game came first. What was the inspiration?
WB: I actually invented Empire when I was 11. I built a game board out of a large sheet of plywood, painted it, made game pieces, etc. But, it turned out to be far too tedious to play. (I knew nothing of the paper wargames that were popular later.) So it got shelved. When I finally was able to use a computer, I realized it could remove the tedium and leave the fun part. A computer also relieved one of the burden of finding a friend who was interested enough to spend hours playing the opponent. The computer would be the opponent.
MNM: Only child here. Sounds very familiar. So were there other one-player computer games of the time that influenced you? I personally don’t know of any wargames prior to 1978, except perhaps Chris Crawford’s Tanktics.
WB: Computer games I played at the time were various Star Trek games, lunar lander games, ones out of the 101 BASIC Games book, etc. A particular favorite was Hamurabi. All were very simple. I've never heard of Tanktics.
WB: I was completely unaware of them, other than Risk and Stratego, both of which were influential for Empire. Another point of inspiration was in the movie The Battle of Britain (1968) there were scenes in the British dispatch and control center, which had a giant central map where people moved around counters representing airplanes and ships.
MNM: I would say you captured that control center feel with Empire, in a very immersive way. I was not kidding when I said I almost failed a Data Structures course in 1981 because I was playing Empire.
WB: Empire has caused many students to flunk out, and even a few divorces. I've received some angry emails over these.
MNM: It probably shouldn’t, but that makes me feel better! What about you, Are you a regular computer game player today? Is there anything you found yourself hopelessly addicted to for a while? (including Empire itself)
WB: I worked as a video game tester in college, which wrecked my interest in “twitch” video games. My interest in Empire is not so much playing it anymore, it's devising a better computer strategy. I'm a lot more experienced in how to do such things today, and the temptation is strong to go do it. But I need to focus on my compiler stuff.
MNM: Speaking of gaming instead of working - I recently wrote an article called The Value of Screwing Around at Work, which detailed some time I spent working on a game instead of what I was supposed to be doing. I’m interested to hear if Empire was developed at all when you really were supposed to be doing something else? Or, was it part of an officially sanctioned project of some sort?
WB: I was careful to do it in such a way as nobody else could claim ownership of it. I.e. I used my own equipment and never did it in the office. I'd also get a signed statement from my employer(s) enumerating my side projects and acknowledging they had no interest in them, in advance. I *strongly* recommend doing this - it'll save one a lot of worry, grief, and money.
Nevertheless, I have worked on projects at a company that I wasn't supposed to be working on. They were rogue projects, in the company's best interests, and for the company. Some turned out to be pretty valuable for the company, so I have no regrets. I figured that since I was well paid, part of that pay was for my expertise in what would work for the company :-)
When I was at Boeing, the only computer was a PDP-11 in a separate air-conditioned room. I was not allowed to use it, because that was operated by a separate division of Boeing. (I was in the 757 Flight Controls group.) We were supposed to do calculations on paper with a calculator. I wasn't having that, and talked the sysop into giving me an account and the door access code. I wrote a number of Fortran numerical programs to do my work, and got good results from it, leading to me being assigned more and more of such work.
Eventually, my clandestine activities were discovered and the computer division demanded that I be reprimanded. This dispute went up several layers of management, until the uber manager of my division told the computer dept to lay off, that I was doing good work, and made my access official. In hindsight, I was at Boeing right on the cusp of the revolution away from paper towards computers.
(I was also supposed to write documents longhand, and hand them to the word processing pool to enter them. Ugh, I get writers' cramp signing a check. I cajoled the head of the WP pool to let me use one of the Wangs, and did the documents that way. I was apparently the only engineer to do so at the time. The WP pool was all women. My, how things have changed!)
MNM: Yeah the further back you go, the more controlling the computer environment, in general, seemed to be. My experience with mainframes of the 70’s and 80’s was that they were timeshared, limited-access systems as well. Did you have trouble with using that sometimes hard-to-get time to write Empire / ever get any grief for writing a game on the mainframe?
WB: I'd get grief for using too much computer time, and this was resolved by my restricting usage to the wee hours of the morning. Computer time was always hard to come by, the student demand for it far exceeded availability. I'd also do a lot of programming with pencil and paper, until I could get access.
I really wanted my own computer bad, and finally got one with the H11 (their version of the PDP-11) and set about creating an “11” version of Empire in assembler language.
MNM: I’d imagine the AI routines could burn through allocated CPU time. I was always impressed with Empire’s enemy unit pathfinding. I remember reading an article about the development of that game Tanktics, and how the AI had a problem with units getting stuck in “U shaped lakes”.
WB: I was rather proud that Empire's computer strategy didn't have trouble with U-shaped land. It took a bit for me to figure out how to do it.
MNM: If I remember correctly, Chris Crawford kind of “cheated” and just eliminated U-shaped lakes from the maps in Tanktics, instead of working on the AI to handle it. Empire seemed to have pretty complex land mass / water configurations that the enemy had to navigate.
WB: I fixed the AI. One problem that nobody noticed was the waters all had to be connected. The AI couldn't handle a continent with, say, 3 big land-locked lakes.
MNM: That’s also a map optimization for the benefit of the AI, but a much less restrictive one I’d say. Another unique feature of the game you are credited with creating is “fog of war”, where the map is slowly revealed. Was there a non-computer inspiration or influence for this?
WB: Stratego :-) and of course The Battle of Britain, where radar was used to detect incoming enemy aircraft. I also knew about the Battle of Midway, where knowing and guessing where the enemy fleet was meant life or death.
The fog of war is impossible with the board game version of Empire, but with computers I knew I could make it work.
MNM: Wow. I never thought about it, but yeah, Stratego does implement “fog of war” quite nicely with the slowly-revealed pieces! So after all these inspirations, was the design of the game done up-front, or did you kind of figure it out as you programmed?
WB: The rules of the game were settled very early, and they worked so well I was reluctant to change them.
MNM: Wise. A wisdom though that I sometimes have trouble following! How did the development go from there? Any good/weird bug stories to share?
WB: Mostly it was trying to prevent the computer strategy from getting stuck in local optimas, like one piece just going uselessly back and forth. Being a Fortran program, all memory was statically allocated and so I never had any pointer bugs in it.
MNM: So are you a good player of your own game? (In my limited game design experience, I find others quickly eclipse me.)
WB: Not really. I was always thinking of improvements rather than getting immersed in it.
MNM: What is the “great unfinished project” you have? Is there something, such as a different game (or non-game project even) that you abandoned you wished you had completed but never will?
WB: I did a Zork-type game (which was Advent at the time) but never completed it, called Castle. I graduated and lost interest in it. I had written a lot of code, but that has all disappeared.
MNM: You can’t save them all I guess. I would have liked to have seen what you had though. I see you rewrote Empire in another one of your major projects, the D Programming Language. Was that done for the benefit of developing D, or to improve Empire (or both)?
WB: Every language needs a great game, so why not? It was fun anyway. The translation was very rote, so it did not take advantage of D's capabilities.
MNM: I will admit to not being familiar with D, however I have spent a lot of time with C and C++. D to me seems borne out of a desire to do C++ ‘right’ - as in to address some of the flaws that are inherent in both. Is that accurate, or is it selling it short?
WB: D is simply easier to use than C++. People find they can get their projects up and running much faster in D, with the same performance and control. It's not really one aspect of D that enables this, it's the combined effect of quite a few things.
MNM: I’m curious to ask about those few things, but suspect that would be a whole other conversation. So I’ll try to wrap this one up with a last question, about what’s happening next. Is there anything new you’ve been working on you’d like to share?
WB: When I finally did some learning on how neural networks worked, I was startled to discover that Empire's computer strategy relied on a primitive neural network-like method. The computer was far too slow to provide the large number of iterations required for training, so I would tweak the coefficients manually.
It makes me think about how a proper n.n. with automated training could produce a really effective computer strategy! I must resist the impulse to implement that.
It would also be fun to enable users to plug in their own "bots" to calculate the moves, and then there could be competitions among the bots. Wouldn't that be cool?
Cool indeed. I didn’t think to ask when we initially talked, but it seemed to me that there was something like this a while back featuring self-modifying code bots that ran together in a common memory space, trying to kill each other. (Walter later reminded me that this game was called Core War.)
In any event, I’d like to thank Walter for taking the time to talk to the Mad Ned Memo and share these details about Empire. Kind of makes me want to download it and try to find some neutral cities to take over before those dreaded “A”’s start coming through the fog-of-war!
Next Time: If we ever go back to the office, I want one like the Millennium Falcon: Something that doesn’t look like much, but has got it where it counts. When bad digs make for good times coming up in: I Miss Working in the Crappiest Places
If you enjoyed this interview with computer gaming pioneer Walter Bright, consider subscribing! No spoilers, but we may have another guest coming in a few weeks to chat about the early days of computer game development that you will not want to miss! The Mad Ned Memo is cost-free and ad-free, and you can unsubscribe at any time.
The Mad Ned Memo takes subscriber privacy seriously and does not share email or other personal information with third parties. For more information,