Slow down

Jul. 1st, 2010 10:34 am
marnanel: (Default)
Avaricius and Avalot had to be slowed down on (what were then) fast computers, so that it ran at the same speed everywhere. In the version which shipped, it was done in-process, but that interfered with debugging. So during development we used a separate slow-down process, which was called skellern. This was in reference to:



Whoever uploaded this has cut the bridge and the outro. Enough survives to give you the idea, including the wonderfully ponderous intro.
marnanel: (Default)


I am going to contact my parents tomorrow and ask for the source code of Avaricius and Avalot so that I can release them as free software. (It was written in Turbo Pascal.) This may mean finding a way to read 5½" floppies. I wonder if I can just buy a very cheap very old computer and hook it up with a serial cable.

Some of the nifty things about Avaricius and Avalot, just from memory:
  1. Compilation. One of the odd things about Avvy is that only the code was compiled, not the data. The data was a significant part of the whole, and these days I would have created it in some easy-to-edit format and compiled it. But in those days, with a few exceptions, I first designed the binary format in which it would ship, and then wrote an editor for it. So I think, in order to make it at all useful, one of the things I'm going to have to write is a decompiler for all the data formats, so you can read them as XML or something.
  2. How the images got included. This actually extended to having to write a general image editor "hiz" for Avaricius, because I didn't have any information on the save file format of any image editors I had access to. But for Avalot I wrote a screenshot program and my brother used Dr Genius to edit the images (he drew almost all the images in Avalot, which is good, because the images I drew in Avaricius rather sucked).
  3. Why EGA? The game required EGA (and used sixteen colours) because we didn't have VGA when coding started.  By release time we had VGA, but the only concession to it was to use its ability to redefine colours to make change "bright magenta" to be more Caucasian-flesh-coloured.
  4. Codename. Avalot was codenamed "Project Minstrel" during development.
  5. Dogfood. One of the jokes that was so laboured that I never explained it: the minstrel who plays games against you was briefly called "Winalot", because almost all the characters' names ended in -alot; "Winalot" is a brand of dogfood, so he was soon renamed "Dogfood".
  6. Cameos. Dogfood, Spludwick, and Baron du Lustie were cameo appearances by the development team.
  7. Beta testing. We had different beta testers complain that both the Dogfood and Jacques puzzles were both incredibly difficult and ridiculously easy.
  8. Scroll drivers. You could embed ASCII control codes in what was effectively standard output (the "scroll drivers"), which would otherwise have gone into dialogue boxes on the screen, and affect lots of things about the game. Much of the moment-to-moment control of the game happened in this way.
  9. Wordwrap. The scroll drivers in Avaricius didn't do wordwrap, so I had to do all the wordwrap by hand. Big mistake, rectified in Avalot.
  10. Bootloaders. "avalot.exe" was merely a bootloader that allocated a few kilobytes of empty memory and ran "avalot9.exe", which was the real program. It pointed one of the user interrupts to the empty memory, and by manipulating this memory the child processes could instruct the bootloader either to load a given other child process after they quit, or to quit itself. This meant that a lot of the cut scenes could be implemented in separate executables. There was also space in the empty memory to store the current game state, so that you could seamlessly return to the game. One of the possible subprocesses was command.com, so that you could shell out to DOS and not have Avvy resident in memory, so there was actually space enough to do something.
  11. Edna. The save-game format ("edna") had generalised header information which meant that if you attempted to load a file from any other Avvy game, the correct game could be loaded to handle it.
  12. Chunk. Each room had a set of associated sub-pictures in a format called "chunk" which could be set to display at set intervals, meaning that animations could be put together without changing the code.
  13. Also. There was a resources format called "also" which allowed you to define things about each room such as where the doors connected to the next room and what direction you'd be walking in when you got there, and it had a set of opcodes which could be made to run a given cut scene, put up a given piece of boilerplate text, etc, when you walked into a given area or touched a line between two given points. Strangely, I never unified these opcodes with the scroll driver control characters.
  14. Skellern. There was the usual routine which hooked the clock interrupt to slow the game down.  Around the time I was writing it I heard a song called Slow Down by Peter Skellern, and the whole subsystem is littered with references to that song.  In particular, the slowdown routine couldn't be enabled during debugging, and therefore was disabled during development in general, so there was a standalone terminate-stay-resident utility called "skellern" which stood in for the real thing.
  15. The onion puzzle.  This is the puzzle I'm most proud of.  People were still asking how to solve it almost a decade later on Usenet.
  16. Avalanche. The whole magic opcodes system was going to be generalised in the third game "Avaroid" into an architecture for a virtual machine called "avalanche". I had no idea about virtual machines; I pretty much made up the idea. But the third game never shipped because I went to university.
  17. Z-machine.  I've occasionally thought of doing a Z-machine port, as a plain-text adventure.  I've never actually started it, though.  I think it would be ineligible for the IFcomp.
I am wondering what else I'll discover when I finally find the source.

Update: I just phoned my parents:
  • My brother Andrew knows where the disks are and will find them when he comes home for Christmas vacation
  • My brother Mark is one of the copyright holders so we have to clear it with him as well, so there's no knowing what'll happen until he decides.
More news as we get it.

Avvy

Jul. 27th, 2009 04:07 pm
marnanel: (Default)
When I was about fourteen my parents bought a PC to replace our ageing BBC Micro. There was an adventure game called Leisure Suit Larry which I had heard a lot about and was quite anxious to play. Once I had figured out how to win it, I set about cloning it, and in two years, with the help of my brother Mark who drew all the graphics, I produced a vaguely similar game about a Roman trying to escape Pompeii. It was released eighteen years ago next month. I'm not very proud of the code, though if I find a way of reading 5¼" disks I may open-source it. I'm not very proud of the story, either: I based the story around Roman farces, and though I thought it was quite funny when I was fifteen, the humour strikes me as juvenile and sexist now.

When I had done with that game, I wrote something better. This was Avalot, released sixteen years ago, where approximately the same cast of characters found themselves in the Middle Ages. I had no computer science training at the time, and was unaware of the concept of a virtual machine, but Avalot took several steps towards being a game program written on a general-purpose engine (the engine was called Avalanche). If I had had the opportunity to produce the planned third game of the series, it would presumably have been entirely abstracted. Avalot featured actual puzzles worthy of the name: I'm rather proud of the one about the onion. And I made some attempt to patch up the problems with the story which had been introduced in the first game, as well; Avalot's wife had a little more to her personality than simply the nagging character from farce. It wasn't perfect in the least, but it was light years ahead of the original game. Of course, by that time the standard of professional games had moved on, and Avalot looked dated even when it was released.

Both games were released as shareware, and neither made any appreciable amount of money. I think we all had dinner out once on the takings from the first game, and the second game didn't even make that. But occasionally I still get fanmail.

Sometimes I wonder whether I should resurrect the Avvy franchise as Z-machine games, and whether that would give me a chance to finally fix the immaturity of the original code and of the original humour. I'm not sure, really.

Profile

marnanel: (Default)
Monument

August 2017

S M T W T F S
  1234 5
67 8 9101112
13141516171819
20212223242526
2728293031  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 19th, 2017 06:39 pm
Powered by Dreamwidth Studios