[net.games.emp] old empire source

tsf@drutx.UUCP (05/23/84)

Telegram from Atlantis, (#2) dated Wed May 23 07:05:05 1984

I have the source for the empire game.  But before you get all unglued
let me explain what that means.  We were using a large software package
in day-to-day operations that was supplied in object form.  Our
supplier would not part with the source. Bribes, threats - nothing was
effective.  I decided to find out what it would take to "decompile"
an optimized object back to C.  Well the "impossible" isn't so bad.

In the time it took me to experiment with the idea, our needs w.r.t
the software package were satisfied.  Remembering that a friend of mine
in ihux-land had gotten a start on decompiling the empire game (and
being an incurable empire fanatic myself), I started in on the job of
decompiling empire.  The symbol tables, header files and thorough
knowledge of the game - along with a crude "decompiler" made it fairly
easy to recover the source.  Now - this source is something only a
decompiler could love !  But the C compiler is quite happy with it.
My friend and I hacked away at it off and on for about a year, and now
we have it running on a 5.0 VAX (and I think he has it running on a
5.0 3b20).  It's been running on the VAX for about 8 months.

This version is one that Peter sent out around 1978 for 3.0 ? 11/70s.
It has the orthogonal grid, no nukes, no food (agribusiness was a valid
sector type but not implemented).  It has everything you need for a good
WW2 scrap.

I sympathize with mr-frog and others that might have tried to patch
fly.o to fix the Aircraft Carrier Bug. It took me just as long to
patch the object as it did to decompile it and fix the source.  Fly.c
was the hardest command to decompile by far.  It even has an unreachable
code segment with an interesting printf which suggests the evolving
nature of Peter's code.

Yes, all you empire fanatics, the source exists outside of PSL's hands,
but perhaps not the version you love.  If you read this Peter, and wonder
how anyone could be so crazy - remember what you wrote in that manual
page: "Although no goal is explicitly stated, players rapidly derive
their own."  How about recovering the source as a goal ?!

For the interested, I have a list of the bugs fixed, and the bugs
remaining.

	drutx!tsf

[20:254] Command : bye

tsf@druxn.UUCP (FisherTS) (11/07/85)

There have been a few requests for empire source lately, so I am
reposting this article (of 10/3/85) in case you're looking for Old Empire.
I am in the process of packaging the visual empire tool that I have
been using with this version for a long time.  I'll post that to
net.games.emp in the next couple weeks.  -TSF

Version 1.1 Old Empire (Empire Classic ?) source (!!) is ready for
distribution.  In my article in late June, I promised that if there
were enough bugs reported (and I had the time to fix them !) there
would be another release ready about now.  So....
For the uninitiated, here are a few excerpts from the original
article.

> Old Empire is a version of Peter Langston's empire game as it looked
> around 1980.  The source for this version was obtained by
> decompiling the optimized PDP-11/70 object code.
> 
> The empire source is about 11K lines of C.  The output from the
> decompiler is ugly and shouldn't be discussed in front of young kids.
> There are zillion goto statements where you would normally find
> 'for' and 'while' loops (I straightened a few things out when doing
> the final editing of the decompiler output, but there are still a lot
> of goto's).  There might be a few "original" bugs left, but I know
> there are an equal number introduced by the decompilation and triple
> porting operations.
> 
> This version has the rectangular grid, unimplemented agribusiness, no
> nukes, and only the original 7 ship types (batt, carr, dest, sub, tend,
> pt, and freight).  No new bells or whistles have been added.  In fact,
> every effort was made to restore the game to its original condition,
> but with bugs exterminated.
> 
> The distribution comes with Buglist and README files.  I can post the
> Buglist to the net if people want to see it.  It runs on a 5.0 VAX,
> 5.2 Amdahl UTS, and 5.2.2 3b [and now 4.2BSD].  The makefiles aren't
> the greatest, but I find them useful [now they're much better].
> 
> Please direct all Old Empire flames and bug reports to me.  I'll
> respond to bug reports as I find time.

Version 1.1 has the following improvements over Version 1.0:
1) It uses buffered I/O - faster
2) torp command gets mobility right, doesn't allow torp'ing from subs you
   don't own, doesn't allow torp'ing sunken ships.
3) only tenders can tend
4) only capitals you own can build BTUs (in Version 1.0 an unowned fort
   at 0,0 will do the trick!)
5) The shell command accepts more than one command
6) The shell command works!
7) redirection and piping work
8) dependencies on fcntl.h, time.h, termio.h are fixed so that it is
   more compatible with 4.2BSD.
9) A new sread function for 4.2BSD
10) calls to rand() are fixed so that they will work regardless of 16 or
    32-bit results. (Random() is better on 4.2, but it isn't available on
    SysV).
11) checkpoints are cleared on collection
12) makefiles for SysV and 4.2 BSD are much better.
13) contracting research and tech centers works
14) ... and 12 other miscellaneous bug fixes.


If you want this fine antique, send a tape (200' will do) in a reusable
mailer (padded Jiffy, Dennison, Jet-pak, etc.), and sufficient return
postage (or check to cover the amount) to:

	Tom Fisher
	AT&T-ISL Room 31G32
	11900 N. Pecos St.
	Denver, CO 80234

Tom Fisher	ihnp4!druxn!tsf		(303)-538-4642

ccrdan@ucdavis.UUCP (Dan Gold) (11/10/85)

> There have been a few requests for empire source lately, so I am
> reposting this article (of 10/3/85) in case you're looking for Old Empire.
> I am in the process of packaging the visual empire tool that I have
> been using with this version for a long time.  I'll post that to
> net.games.emp in the next couple weeks.  -TSF
> 
If you prefer to receive a copy of the sources via E-mail I have a shar'ed
version that you send for merely by asking.  These are the same sources
as Tom's.  It comes in tweleve files that are all under 60Kbytes to avoid 
mail hassles.

Dan Gold

...ucbvax!ucdavis!minnie!ccrdan

tsf@drutx.UUCP (FisherTS) (11/12/85)

Many thanks to Dan Gold [ ...ucbvax!ucdavis!minnie!ccrdan ] for the
help in distributing Old Empire Version 1.1 sources.

Happy emp'ing!    **BLAMMO**

And watch this space for Old Empire visual empire..

Tom Fisher	ihnp4!druxn!tsf

vch@rruxd.UUCP (Kerro Panille) (03/09/86)

I understand that there is a copy of old empire source floating around.
Could someone send me a copy?? I'm on SysVr2, but I'll take any version
I can get my hands on. The copy that we have is soooo buggy (it's *really*
old) and it makes playing tough.

One of the nasty bugs that we have is if you designate a sector, say a harbor,
with nothing in it (1 civ or mil, nothing else), and don't update for three
days or so, then set up a delivery route from a neiboring sector (127 civs, no
threshold), and then update, it does the delivery FIRST, then the sector update.
The result is the sector update assumes that the civs where there all the while.
Instant 100% harbor. The updates can be done in chains: when something is moved
from a sector (or even if you say move, and then tell it to move 0 civs), the
current sector is updated, and it delivers the civs. Do this to the next sector
along the delivery route, and so on, for a long route, you can give yourself 
several 100% sectors. Not very fair. The game goes from sancturies to huge
countries in a matter of days. Again, not much fun - and too much work for 
the diety, if he cares to stop it.

Thanks in advance!

-- 
Vince Hatem                           +----------------------------------------+
Bell Communications Research          ! "..., isn't that right, Daniel?"       !
Raritan River Software Systems Center ! "When you get that look on your face,  !
444 Hoes Lane                         !  Marty, I go prune my roses."          !
4D-340                                !                   -Frank Herbert       !
Piscatway, NJ 08854                   !                   Chapterhouse: Dune   !
(201) 699-4869             	      !                   pg 459               !
{rrux?, pyux?, bellcore, topaz,       +----------------------------------------+
       ihnp4}!rruxo!vch