Hangman
Introduction
Back in secondary school (that’s highschool for the Yanks), I had at least two ideas for applications that I wanted to write for my school’s modern languages department. One of them was to be called Pour Aller
, in which you would guide a character around the screen by giving it directions in French. Pour Aller was was never written. The second idea stemmed from my long-standing affection for the game of hangman: I decided to make a foreign-language-orientated version of the game to help people learn lists of foreign vocabulary. It was not my first attempt at writing hangman; it was my fourth I suspect. It was my most ambitious version to date, and somewhat over-ambitious for the constraints of the machines I was using; this made it rather interesting to develop. My first two versions of hangman were written at home on my Acorn BBC Microcomputer in BBC BASIC; the third version was written in OPL for the Psion Organiser II.
It just so happened that my school’s language activity room had four Acorn Master Series microcomputers, all with BBC BASIC IV; this was in about 1996, mind you, given that these were machines from about 1985. I certainly needed the higher specifications of those Master Series machines; I wrote some primitive GUI elements for the Hangman interface, and this is not a good idea for a BASIC program on an 80s micro! The only reason it worked at all is that the Master Series machines came with shadow video RAM as standard, meaning I could switch the screen into shadow mode and grab another 20 k of RAM for all my code. However, it did look good when I was done.
The language staff at the school did have some interest in the project, and some of the them helped with a bit of testing, but generally I sat up in the top floor of the languages building alone each night working on the project with no consultation or feedback. That said, they were reportedly using the program in classes after I had gone, so that was nice. Something I always wondered is whether it was a viable concept in the first place; I have discussed this with one or two people more recently with knowledge about language teaching, and the general feelings I received were negative, although it was suggested that it would help Chinese people learn the Roman alphabet. I cannot deny though that it was an interesting project for a couple of years, and was much more fun than revising for my GSCEs (for which I still got decent grades, despite having spent my time in year 11 programming instead of revising). Besides, it must be worth a few bonus nerd points, and maybe even a few chick points.
The department itself has now moved over to Windows PCs, so they are no longer using the program. However, thanks to Chris Richardson of 8-bit software, LSAIT Hangman is now available for download, as either the complete game (single-sided DFS disc image) or the BBC BASIC source code as DOS-format text files to peruse just how deliciously unreadable compact BBC BASIC code is. Chris also provided me with all the screenshots on this page, taken from the BeebEm emulator, which replace the older digital camera pictures; however, you can still view photos of the main menu and the Hangman game running on my own BBC Master (a machine of which I am no longer in possession).
This page gets somewhat gory in its details of the package (which will keep the likes of Jen happy), so the technically-shy might want to just look at the pretty pictures, and nod and smile at the description of what I had instead of a social life for about two years.
The package
The main menu
When the package first loads, you are presented with the main menu, from which you can play a pre-saved wordlist, enter a list of words, or administer the disc. You will note that the program also credits David Mills; the inspiration for the graphics was his, and he gave me some help reading disc sectors later on during the project. We were planning to work on this together, but in the end I wrote virtually the whole package myself.
At the top of the screen you will see the disc title (Administration
), the disc’s language setting (German
) and an icon indicating that sound is enabled on that disc. The language
of the disc simply selects which accented character set (if any) to use for the wordlists. At the bottom of the window, you get a bar listing which keys to press. This status bar is used throughout the package, for instructions, prompts, informative messages (as seen in the screenshot), and lists of options. Like with the dialog boxes, the package does not follow the conventions of WIMP GUI design.
You will also notice my peculiar version numbering scheme: this was years before I ever started doing it right :) Each program in the package has its own version number, so the package as a whole is just version 5.x. Worse that this, is that the package was version 4 at the beginning of developement, and rolled over to 5.0 after reaching 4.9; it ended up as version 5.6-5.9 before it was even done. (Versions 1-3 were mine and David’s earlier Hangman programs). Version numbers of Hangman made no sense whatsoever.
For the really curious, LSAIT stands for Lightning Software (David) and Imagen Technologies (myself)
– some pretentious poo. The LSAIT logo (that was printed in the manual) looked good, though, as shown at the top of the page.
The game
The package works on the principle of wordlists
: files containing a list of words, intended to be on a particular vocabulary topic such as shops or food. You begin a game by selecting a wordlist to play, presumably under teacher instruction (to match what has just been covered in class). Notice that the file list is displayed in a menu presented virtually as a dialog box, complete with a scroll bar. There are no scroll bars thumbs however, and instead of buttons, the status bar provides a key legend for the window.
A progress bar appears while the wordlist loads; I had to cut down the update frequency as it tied up the CPU and slowed down file loading considerably. The loading process itself was weird, and was the result of a general RAM shortage and no DLLs or overlays in BBC BASIC. The selection and loading process was done in one program, with the wordlist data stored into a preset area of RAM along with the filename. Some resident integer variables (which remain unchanged as you load in other programs) were set with the word count and request type parameters, and the game program was loaded in place of the existing program. The game program then read the variables left by the last program to know what it was expected to do (no command-line arguments in BASIC either) and accessed the wordlist data stored in RAM, including the filename so that it could tell the user what the wordlist was called. These processes of parameter and wordlist storage were used to fit a very large package into not that much RAM, switching between programs and sharing data across them; messy, but effective.
The game then begins, and you are presented with each word from the list in random order. After each user action, the program responds with a message in the status bar, and optionally an audible signal. Most response types have several available messages, from which one is chosen at random each time. If you get hanged, the game plays the funeral march, which might get annoying in a classroom! This is a good excuse for disabling sound in the game altogether.
Notice that the game play program is version 5.9, compared to 5.6 for the menu program; did we go through five different menus…?
Administrator
The package is administered via a program on the disc called Administrator (formerly File Administrator
, which lent it the filename FA.b
), which lets you browse, rename, print, and delete wordlists, as well as configure the disc’s settings. This program makes extended use of windows for the various parts of the interface, in ways that considerably deviate from GUI convention.
Basic file operations are done with this application, and you can also select to play any wordlist from from the Administrator. Wordlist creation and editing is done using separate programs on the disc. Due to memory constraints, the disc configuration screen itself is done using another program: the main menu, started using a special parameter to tell it to show the configuration menu instead of the menu. Hey, the menu program was small and it left some RAM spare!
Wordlist utilities
The package comes with two programs for working with the contents of wordlists. The nameless word creator program can be used both to create temporary wordlists on the fly when invoked from the main menu or new wordlists on disc when invoked from the Adminstrator. The program requires you to know beforehand how many words you wish to use, and once a word is entered, you cannot go back and edit or remove it. This program was mostly intended as a quick way for teachers to enter new wordlists for the class, although it could have benefitted from a few design improvements.
You will notice that the side of the screen mentions accented characters. These are used when displaying words, but you are not required to guess them during the game; pressing A, for example, will reveal all letter As in the word, regardless of accent. I am not sure whether a German ß is counted as an S or not. A printed function key legend was supplied with the package, to be inserted under the function key strip on the keyboard; this strip indicated which function keys were to be pressed to insert which accented characters. This was an idea already used by another languages package that the school used, but Hangman used different keys for the characters.
The other wordlist utility is the wordlist editor; this program is pretty self-explanatory, letting you create and edit wordlists. The editor is curiously the only other program to share the striped background design used by the game program.
Instead of having a scrolling list and scroll bars for the wordlist window, the program has a concept of pages
. After you have entered the last word in the list box, you start on a blank page. The left and right arrow keys switch between available pages. The maximum amount of words that can be entered is 240; I forget the exact reason for this limit, but a large part of the restriction was simply how many words I could store in memory. I determined that limit empirically by switching off shadow screen mode and loading in the largest program on disc, and watching all the code in memory spill over into the area used as video memory. The portion of the screen not full of random dots was free space I could fill with words. However, I also had to leave some room for the BASIC stack; I realised this when I started getting strange wordlist corruption. Normally, I should have just allocated a block of RAM on the heap for the data, but that was of no use when the data had to remain in RAM while the next program loaded ready to be found, which was a process that would reset the stack and heap.
This completes our tour of LSAIT Hangman 5.x – I hope you enjoyed the ride. It has probably terrified all the knowing folk into staying well clear of any of my software, but thankfully the Macintosh (and Windows) is less constraining that an 80s microcomputer and I don’t pull stunts like that any more.










