Risky, a software archaeology discovery • 18 Mar 2011
A few days ago I was Googling my name, to see what the world writes about me, and below the expected stuff at the top I noticed a computer game I wrote more than two decades ago. I had completely forgotten about this program.
It's an implementation of Risk and was written to run in the monochrome mode of the Atari ST:

The game is called 'Risky' and comes with its own level-editor, called the 'Risky Construction Set'. I guess that name was inspired by the 'Pinball Construction Set' which was popular at that time.
Origins
Risky was based on a somewhat simpler Risk-like game my dad (Henk) wrote a year earlier. That game was impemented in text-mode, using VT100 terminal control codes and some ncurses-alike homebrew functions.
I rewrote Risky to be a proper GEM application, which was the standard GUI on the Atari ST, with attractive graphics and gameplay, and a somewhat more intuitive user interface than key commands. I wanted to drag armies from one country to the other using the mouse.
I copied some game mechanics from my dad's program, the most prominent being the dice rolling win/lose function, and some data structures, like how the continents, countries and links between them were represented. Other game mechanics I added myself, like a function that computed a country's vulnerability by recursively gauging its neighbours.

I remember painting the graphic backgrounds painstakenly with Degas, giving attention to every pixel. I wrote the program in C; the dialogs and menus were designed using the 'Resource Editor' that came with the Alcyon C development tools.
Resurrection
Risky is featured as a retro-game on AtariMania. Apparently someone repackaged the game and branded it 'for the Atari Falcon' (which I never owned) together with a small utility to fix the screen mode on that machine.
It's still possible to download an archive with the program and its data files (mirror); I managed to run the program succesfully in an Atari ST emulator, such as Steem.

An English translation
When I opened the archive I saw some stuff in there that I never wrote: an English version of Risky! WTF? Apparently a guy named Michael Crisafulli copied the program and translated all the Dutch texts into English, using a hex editor to overwrite bytes directly in the executable and the resource file, although it could be that he used a resource editor for the resource. Nice job! He also made a translated excerpt of the documentation.
Amongst other things, he wrote:
"I've noticed one or two annoying bugs in the program, generally after doing something stupid like having no players, otherwise it runs well. Please note I have nothing to do with the code; I only translated the text. The designers are Henk and Michiel Overtoom, I presume of the Netherlands. All in all I think they've done a super job."
I feel both ashamed and flattered ;-). Michael continues:
"This scenario editor raises RISKY from a game program almost to the level of a simple simulation. Although you are restrained by the game program mechanics, you can define the locale and situation parameters as you wish."

Who is Michael Crisafulli? It's unlikely that he is the 13-year old boy who killed his father in 2010. Googling his name in combination with 'atari' leads to references like 'Michael Crisafulli of Soft-Sci' who apparently wrote a popular Atari ST screensaver.
And maybe he did some graphic art too? This page mentions his name, and using an Atari ST CAD program. I wonder whether his email address still works...
Public Domain YES, Source Code NO?
To my disappointment the archive contained no source code. I wonder why. Didn't I release it with the game? Did some packager discard it along the way? I forgot. I distributed Risky on BBSes and I can't remember if I archived the source code along with it.
Which is a pity, because out of curiosity I would really like to see the Risky source code again to see how I wrote C in those years.
But wait! I remembered I had some twenty-year old Atari and PC diskettes in the basement, together with some some old 3½" and 5¼" drives. I hooked these up to a FreeBSD system and tried to salvage what I could. Many diskettes were unreadable because of mold, dust and magnetic decay. But on one diskette that still worked I found the source code to Risky and Riskedit! Have a look at risky.c or riskedit.c. My dad even found his old version, albeit updated in 1993 for the PC and written in Turbo C (rsk.c). It nonetheless carries the same characteristics as the original Atari version.
Browsing through the code I recognize my early style. I already used meaningful variable names, and functions that do not contain too many statements or too deeply nested logic, but due to C's paucity of data structures (I didn't have a C++ compiler with STL for the ST) all data is kept in fixed arrays of simple types and/or structs. File saving is just dumping the structs in a file, together with a count how many structs are present.
/* Transport uit dit land */
bondgenoten = nl[src];
vriendlanden = 1;
supermacht = 0;
for (windrichting=0; windrichting <= 7; windrichting++) {
dst = land[src].topol[windrichting];
if (!dst) continue;
if (ps[src] == ps[dst]) {
bondgenoten += nl[dst];
vriendlanden++;
}
else
supermacht = (supermacht > nl[dst]) ? supermacht : nl[dst];
}
if (vriendlanden == 1) continue; /* Valt niks te transporteren */
Inspecting my own old code
Some observations that I find surprising:
- Back then I was already using the 'banner' indenting style for C and C-like languages for years. I picked this up from the book Software Tools, by Kernighan and Plauger, a book which has been formative for my programming education.
- The way you had to model your GEM program looks very familiar compared to current GUI toolkits: the main program is basically an event listener and dispatcher. Mouse events, keyboard events, windowmanager events, they're all there. I had to implement dragging logic myself.
- The dialogs reek of Microsoft's DDX: you copy values into controls, let the system run the dialog, then copy them out again.
- I didn't made enough effort to refactor the GUI code to take advantage of increasing resource identifiers and loops; or maybe that was discouraged by the Resource Editor (they used to be pretty random and not user-changeable, perhaps). Nowadays the situation is much better with object-oriented form composition.
- Apparently I designed some sounds too. I see magic values that are poked into the sound chip. I have no clue what they mean, but they sound good under Steem ;-) I used to POKE the soundchip in my Commodore 64, too.
- Today I would use English for variable names and comments. Makes cooperation and sharing so much more useful!
- I have no idea why I put the word 'BOX' under my short autograph (that swirly M with an O attached to it). It looks pompous in hindsight. Was I trying to create some corporate identity?
I submit all this stuff to the web now, in the expectation that it'll probably live forever.
Comments
David • 24 Aug 2011
Degas was actually a very good pixel editor. I used it a lot on my own atari ST. Duh too bad it all got wiped out by the pc!
aaa • 14 Sep 2011
You can find STeem at http://steem.atari.st/ or http://tamw.atari-users.net/steem.htm
krupkaj • 14 Dec 2011
Nice find! I definitely have to try it with my friends!
Ryan • 30 Mar 2012
ConquerClub (.com) is the modern web-based version of Risky, for what it's worth (custom maps, rules, etc.) :)
Gusta • 24 Oct 2013
Leuk!
Mark Gardiner • 1 Jan 2014
Yep - I have played this on both my ST1040 and under STEEM since mid 90s... I mainly play the VIRGIN colour version now as is more detailed. Actually am playing it now! Oh and I videoed a whole game so if you fancy seeing the strategies of winning at RISK - see the link: https://vimeo.com/35873477
Bert van Dijk • 28 Jul 2015
Hoi Michiel, Herinner je nog dat je ook een belangrijke bijdrage hebt geleverd aan mijn Riskspel genaamd Comquer dat ik in 1985 schreef. Het was op de C64 in basic en jij had de graphics voor me gemaakt. Groeten, bert@iviewerbv.nl
LeeFish • 21 Jun 2011
An enjoyable post, thank you.