SEARCH   |    SITE MAP   |    CONTACT   |    HELP
"On air. On sea. On land. Still the Internet's greatest wargame simulation."

Ken Stevens Comments

Wolfpack recently regained contact with Ken Stevens and asked him to comment on his tenure as head of Empire development during most of the Empire 2 and all of the Empire 3 server code development. What follows are his words in response to that query

I started playing Empire in 1991. I was introduced to the game by my cousin Doug Hay ("Aliens") who did some coding for Dave Pare on the Empire 2.0 release. I absolutely *loved* the game. The thought of interacting with leaders of all these other countries, exploring, conquering, diplomacy, economics, blew my mind. Back in 1991, compared to what else was out there, this game was in a league of its own.

One thing that frustrated me about the game were the maps. The map generation at that time had problems. You'd get lopsided continents with one player having a big advantage over other players because their island was bigger and had better resources than the other player. I talked with my cousin about it, and he told me that it's one of the unsolved problems in mathematics to create an arbitrary number of equidistant points on a torus (the "donut" shape of the Empire map).

As a Ph.D. student of mathematics at the time, I instantly latched onto the problem. While Doug's assertion was theoretically true, using a perturbation technique from chaos theory, I was able to find a practical solution to the problem. I wrote a new land creation program called "fairland" that employed the perturbation technique, and created land masses to each player that gave no starting advantage to any player. It quickly became the standard land creation program for Empire and my talents caught the eyes of Dave Pare and Thomas Ruschak.

I then got interested in clients. I hooked up with Drake Diedrich "harmless" (who I later became friends with and went on a whitewater canoe trip with in northern Quebec.) Drake, Sam Tetherow and I worked together to create a "smart" client called "pei". We added lots of cool AI features that did micromanagement tasks so players could focus on strategy.

Then, sometime in 1994, Dave Pare and Tom Ruschak needed to pull back from server development. They were sufficiently impressed with my coding abilities that they entrusted ongoing server code maintenance to me. Dave and Tom were big mentors for me. Those guys are geniuses. Much of where I am today is due to their tutelage.

I read the server source code. There was a lot of code. It took a long time to read. Prior to my taking over the codebase, there had been numerous attempts to completely rewrite the server in various languages. After reading the source code, I understood why rewriting the server was not an option: It was too big.

The source code had problems. It was tough to install, had limited configuration options, was difficult to port, and due to all the repeated "spaghetti" code was buggy and nearly impossible to debug. These problems were the focus of my initial server development activity. I wanted to get the code to a point where future deities could easily install, configure, port, fix bugs in and add new features to the server. In other words, to bring it up to modern "GNU" standards.

It took me about a year to get there. In order to make it happen, though, I had to do a couple of things that were unpopular. One was that I had to put the code under CVS source control, grouping changes into releases that were beta-tested before released. Some of the programmers who enjoyed the previous more casual approach to code changes resented this process. But I knew a major code cleanup was impossible without disciplined code management.

Another aspect of my initial server development activity that was unpopular was that it was it was purely a technology project. It was not a game development project. 95% of the code changes I made were not visible to the players. While I was willing to modify some features, e.g. ones that could be exploited by players to gain unfair advantage, the main thrust of my activity was not to improve an already great strategy wargame; but to take a gigantic, motley patchwork of a 1980's computer program, and transform it into a well-documented, streamlined, consolidated, configurable 1990's GNU-grade software package. Without such a transformation, Empire, as a software program, would be an unusable piece of junk to most would-be deities.

By the time I released Empire 2.3, the game had decent deity documentation, was far easier to install and run, all the info pages were accurate (that was a *BIG* job), options could be configured at runtime (as opposed to needing to recompile every time), it was easier to port, and considerably easier to debug and maintain.

*BUT* It had made no significant advances as a game. While I believe my sanitation efforts were absolutely necessary, they didn't do much for the enjoyment of the players. I am not a visionary. I was no Thomas Ruschak who could see how the game could become something greater than it was and then make it happen. I was just a guy who saw a big mess and could clean it up. If enough people asked for a feature, I coded it for them. That happened quite a bit actually -- people asked for new features and I'd code them for them, but they were always small, incremental changes. Nothing major. And very, very rarely were they my ideas. Most of the ideas for feature improvements came from players. I kept track of all feature
requests and bugs on a list that was updated with every release.

By Empire 2.3, I considered my code cleanup project complete, and started looking for something else to do with the code. It was 1995, and graphical strategy wargames (e.g. Civilization) were just starting to hit the market. It seemed to me that unless Empire were able to support good graphical clients, it would be relegated to the dustbins of history, along with MUD's, Zork, Adventure, and the other landmarks in text-based gaming. So as my final contribution to Empire, I drew up a set of requirements for a server modification that would allow any programmer out there to write a visual graphical client for playing Empire. Some of the requirements I saw necessary were as follows. Note these are off the top of my head. I'd need to look back at old posts to find the original list.

  1. It had to be forward-compatable (i.e. when features were added it still worked). This required a self-describing meta-protocol to describe entity attributes. It also required that it sit in a layer outside of the server code, as a trigger on server database changes.
  2. It had to be fast i.e. low-bandwidth (so people could play over a 28.8 modem). This ruled out XML, CORBA, RPC and other "heavier" protocols.
  3. It did not need to be human-readable, just computer readable. Thus it should reside on a different channel from commands.
  4. Libraries should be provided to support all main programming languages (C, C++, java).
  5. It needed to be asynchronous, so that, for example, clients could see ships sailing past their coast in real-time, or watch planes flying over their territory in real-time. This ruled out the old polling "dump" approach to graphical clients.
  6. It needed to be independent of the "rules" of Empire, so that coders could change how the game worked without needing to rewrite clients.

After consulting with numerous gurus on the subject, I turned the requirements into technical specification (RFC) and started building it. I called it C_SYNC, named after the C global variable in the server code that identified it.

This was a huge step forward for Empire. Once C_SYNC was finished, anyone could write a graphical client in any language they chose, and it would work with all future versions of Empire.

Unfortunately, at this time, a couple of things happened. One was that my fixation on the *technology* side of Empire as opposed to the *game* side of Empire had taken its toll. The people who wanted to make big, interesting advancements to the way the game was played were understandably sick and tired of waiting around for those things to happen. They wanted change now. The other thing that happened was that I discovered, like Dave Pare and Tom Ruschak before me, that I could get paid good money for what I had been doing for the Empire community for free for the past couple of years.

So I stepped aside and handed the keys over to the Wolfpack folks.

I'm disappointed that Wolfpack decided to turn back the clock and put an end to the C_SYNC initiative. That was an unfortunate step backwards for the game -- kinda ruled it out as a player in the 21st century. But I understand why they did it. My code was only half-complete and needed lots of debugging work before it could be released, and no-one likes debugging someone elses code. So with me out of the picture, there was no-one to carry the torch to the finish line. But I regret that no-one took the requirements of C_SYNC and implemented their own version. The polling Empire clients we see today do not meet the expectations of the modern gamer who are used to seeing enemy activity in real-time.

As for the nasty comments people made about me, I'm flattered that anyone even remembers me. All I ever did was organize some code and fix a few bugs. I was no Tom Ruschak by any stretch of the imagination.

I am incredibly grateful for the software development experience I received from my involvement with the Empire developer community. At its height, I was exchanging software development ideas with 20 to 30 great coders. My career as a manager of software development projects would not be where it is today had it not been for the opportunity the Empire community gave to me. I still have my "" T-shirt and feel a surge of wistful sentimentality when I put it on.