Adventure Game Interpreter
Adventure Game Interpreter, often shortened to AGI, is the name of a graphic adventure game engine developed by Sierra On-Line. It was initially designed to run the game King's Quest on the PCjr, but was later expanded to play 14 games and several demos, across 8 different platforms including the Amiga, Apple II, Apple IIgs, Atari ST, Macintosh, MS-DOS, and TRS-80 Color Computer. The engine was written in assembler, but it allowed game designers to write scripts in a custom C-like language called Game Adaptation Language, which was compiled into a bytecode that would be interpreted by the engine. As computer hardware continued to improve, Sierra eventually replaced AGI with the Sierra's Creative Interpreter in 1988. Sprites were stored as bitmaps, but background art was stored in a vector format and drawn and painted to the screen. In the earliest games, you could actually see the backgrounds being drawn, but, in later releases, this was done in a buffer.
The first game I played which used AGI was Space Quest II: Vohaul's Revenge, but I have since played the majority of the games which used it.
I've played a bit with the various AGI editors that have been made, and I think it's really cool how you can edit existing games or create a whole new game from scratch using them.
For IBM compatible PCs, AGI supports IBM monochrome, Hercules Graphics Card, Color Graphics Adapter in both RGB and composite modes, PCjr and Tandy Graphics Adapter, and Enhanced Graphics Adapter. However, not every program took advantage of every mode.
AGI supports two audio outputs, the PCjr 3-voice audio protocol (later duplicated with the Tandy 1000 line), and the single channel PC speaker. Each sound effect or song is stored in its own file and several files are collected into one of the various resource files. Each sound file stores all the necessary information to play the audio including the frequency (pitch), duration, and volume of each note as well as additional information like the duty cycle. Each file stores four channels of audio, three for each pulse wave and one for the noise channel. When playing on a PCjr or Tandy 1000, all four channels are sent to the audio chip, but, when playing on a PC that only has a PC speaker, only the first channel is processed, and all of the unsupported features like duty cycle and volume are ignored, only the frequency and duration of each note is played. This is a clever way of fitting music for two forms of output into a single file, but it has the setback of confining the melody to the first channel.
When played on a platform that doesn't support traditional pulse waves, like the Amiga and Apple GS, a driver is used to simulate pulse waves.
- The scripting system was really impressive for 1984.
- By using a scripting system, and letting the engine handle all the nuts and bolts of the hardware, designers were freer to focus on the look and feel of the game leading to more attractive games, and games were easily ported to various platforms.
- Using a vector based graphic system for backgrounds was a clever way to make full-screen graphics while keeping a small memory footprint.
- The engine even had a custom music format which could also be relatively easily ported to new audio hardware.
- Despite being designed for side-view adventure games, the engine was versatile enough to handle action sequences like the sand skimmer in Space Quest I: The Sarien Encounter or the Coney Island games in Man Hunter: New York.
- The engine could handle several video displays beyond the default for each system.
- Utilizing color bleeding in CGA composite mode really made the games look great even with only a CGA card.
- The engine could handle large software-controlled animated sprites.
- The native resolution used for background graphics (160x200) results in blocky art work, even for the time.
- Sprites could not be clipped to the edges of the screen, so they couldn't slowly emerge into the display. Instead, they had to appear in their entirety all at once. To allow for the appearance of partial sprites, designers had to cover up the edges of the screen with a foreground object (like a doorway or frame on the screen).
- Since all the normal keyboard keys were sent to the text input line, only keys like tab, home, and the function keys were allowed to perform other tasks. This made things a bit unusual for games like The Black Cauldron which have to use function keys to shortcut commands like "look" instead of the much more intuitive "L" key. Had the engine used a single button to pop up a input dialog, all the other keys would be usable.
- The engine was built for the PCjr, but was never upgraded to take advantage of the superior hardware of the later platforms to which it was ported. The Amiga could easily handle a resolution of 320x256 with 64 colors, and even more in a special mode, but the AGI port remained limited to 160x200 resolution with only 16 colors. Likewise, the Amiga had 4-channel digital audio that the AGI didn't take full advantage of. This meant that, at the end of its life in 1990, AGI games look extremely out of date.
This is a list of AGI editors that allow you to modify AGI games or create new ones from scratch.