Monday, May 09, 2011

How I Helped Create Angry Birds

Brier Dudley of the Seattle Times declared in an article on "tablet birding" that " The addictive slingshot game is the killer app ....People buy tablets thinking they'll use them instead of computers, but most don't. They end up playing "Angry Birds."

You might recall in the article Finland Uber Alles of which tiny country came out on top in the international PISA international student assessment. Well, it was Rovio, a finnish company that spent about $400,000 to develop the silly game that has sold 140 million copies, most of them for the pittance of $1 admission. It is estimated 40 million people per month are spending/wasting time flinging birds at neatly stacked piles of pigs. I finally got a copy on my wife's new Samsung Android phone, though my son is waiting for the real deal to appear on his Windows Phone 7. The action is that you use your finger to pull back a slingshot, thus setting an angle and velocity for the feathered projectile.

Now that brings me back to my Lindbergh high school days in Seattle circa 1975 when Bill Gates and Paul Allen were slaving away at yet another BASIC compiler. They they had the bold idea creating and selling BASIC on its own instead of just getting a salary from Wang or Hewlett Packard, but that's another story. The HP was introduced in 1972, long before the IBM PC, as a full blown BASIC computer (actually it was called a calculator at first) that fit on top of a desk for about $20,000 for the setup the school had with a card reader, plotter and ROM cards which were essentially $1000 video game cartridges, enough money to have bought some of the houses in my neighborhood at the time. It had a cassette tape drive that operated entirely on commands like "LOAD 1" just like today's "file save as" command.

I skipped the computer programming class, electing to stay after school to learn how to program the new HP9830 desktop computer. Instead of a screen, it had a 32 character red-dot LED display, and in addition to thermal printer on the top, it had a flatbed pen plotter that could draw line-based pictures. There was a computer fair at the University of Washington where I marveled at the Portland-based Tektronix 4051 computer which had a green graphics display like the ones in Battlestar Galactica. The demo game was something called Artillery. It started out drawing the outline of a hill, and drew an X for opposing artillery gun placements. Player A would type in an angle and velocity, and off would shoot an artillery shell over the hill which felt the effect of the wind, and made a blast mark on the other side. Player B would do the same in the opposite direction. Eventually first guy who got a hit won the game. Well, being in inquisitive student I was, I asked if the graphics commands were anything like they were on the HP, and sure enough he let me stop the game and other than the fact that they used MOVE and DRAW instead of PLOT and PENUP, it was pretty similar. So then I asked if I could get a listing and the salesguy said sure, to show off the shiny electrostatic printer which could make a copy of the screen one sheet at a time, probably at the modern-day cost of 50-75 cents per sheet. 25 sheets later, I took the listing home with me. It took a few afterschool sessions, but after a week we had the plotter set up so that it would draw the hill, write down the succession of tries, and everybody in the computer lab spent hours dueling with artillery as the hot new game at school.

 In 1978 after starting at MIT and deciding to switch from Aerospace to a "field where they'll never lay anybody off: computers" I got a co-op job at Hewlett Packard Data Terminials Division in Cupertino. That's the same giant site that is scheduled for shut down in 2011 and to be taken over by Apple as HP no longer makes terminals, HP 3000, HP 300 Amigo or HP 1000 computers anymore. They had taken the same 8080 chip used by the Altair 88000 and used it in their 2645 block mode terminals which in their day could do form entry like we do now with web browser forms like shopping with, but at 240 characters per second. Their latest HP2647 "smart" terminal combined "raster" graphics with none other than Bill Gates's Microsoft basic upgraded with a newer version "AGL" of the same commands pioneered on the HP9830. That was actually their biggest corporate contract leading up to their later deal with IBM.

I was basically hired to write a demo tape of programs where I just re- purposed all of the 2D and 3D graphics programs I did in high school (to this very day, most COMPUTER SCIENCE GRADUATES never do any graphics program, let along self-taught 3D perspective) I did a spinning 3D logo for a corporate dog and pony show, and ended up showing up a college intern who figured out how to fill a pie chart by doing a better version that did cross hatching at angles. They told me to toss it as the other one was good enough, but the next year they told me another manager who saw it demanded that the listing be retrieved from the garbage the next day and it was used in "Auto-chart" as the first cross-hatch pie chart anywhere. One of those games that made the cut was Artillery. The managers marvelled at it, when I mentioned where it came from, they said don't worry about it, if they couldn't take a joke they could shove it. And as far as I know Tektronix never did complain though by that time their green screens were being put out of business by the pixel-based graphics like HP was introducing.

According to one history Artillery first appeared as a text based game which typed out how far you over- or under-shot. An Apple II version showed up in 1980, with a Commodore version in 1981.
Artillery for the Commodore Pet (1981)

After I graduated, I took my first job in 1981 at Digital Equipment Corporation at Hudson (now Intel) to work on a CAD program using the VAX which could perfrom at the breathtaking rate of 1 MIPS or million instructions per second, and could address the ridiculous overkill of 32 bits or 4 billion bytes of virtual memory. Today that much RAM is worth about $500 and most new chips are running 64 bit windows. For the first time I had DECMail electronic mail and DECNet before there was an internet. Before long I had artillery working on the VT125 graphics terminal as well, DEC's version of the HP2648 graphics terminal, DEC was swallowed not too long ago by Hewlett Packard after it seems the entire New England-based minicomputer industry imploded as cheap IBM PCs and knock-off took over during the 1980s.

 With the arrival of bulletin boards and the internet in the 1990s, IBM included a BASIC game called "Gorillas.bas" with every copy of DOS which seemed an AWFUL lot like a character version of artillery, except that you fling bananas over a terrain of buildings at a target, but still with velocity and angle. Evidently IBM managers didn't care any more than my HP managers did of the heritage of this thing.  I even recall seeing an artillery-like game in a 2010 windows phone programming book, but they seem to have replaced it with something else.

Anyways, the next time you fling a bird at stupid pigs, there is a long history behind computer games like this, and I hardly imagined where my high school hijinks would end up changing the world by a tiny little bit.


Greg Kennedy said...

Would it be at all possible for you to scan and upload that old sourcecode? would be a natural home for the printout. Great historical document, there. Or send it to someone who would do the job (i.e. me lol)

CuriousMarc said...

Nice story! Is it really true that the HP 2647 was running Bill Gates Basic? I thought HP had developed it internally, they had BASIC running on their machines way before our friend Bill.

BlArthurHu said...

I have the old 3M minicatridge tapes but would need a running terminal. I did not save a printed listing alas. Gorrilla.BAS is probably the same code base though.

Every HP computer group did their own BASIC, I learned the HP9830 version which was ROM based, and the desktop computer division in Colorado ended up using only an extended version of the HP2100 processor but none of the system software. HP1000 and HP3000 had their own BASIC built from ground up. What Bill Gates did in doing a 8080 BASIC wasn't different from what every other computer company did except that his was un-bundled and could be sold to every other computer company that did an 8080 or 8086 computer, and that was why got rich and everybody who did BASIC just got 2 cars and a nice house in the suburbs on a salary.

BlArthurHu said...

HP Terminals Division didn't need to write their own basic when they could buy one from Microsoft and add keywords for graphics. I later did (and still have) softplot/BGL which used a gosub library which you could merge with your program and had a trans-piler that could convert PLOT x,y to p1=X p2=7 gosub 9020 so GW BASIC could look just the same but it did not go anywhere. To this very day, there is no standard device independent graphics API for C.C++ C# or Java.