Monday, February 18, 2019

Chapter 5. GO - Gentlemen, Start Your Engines!


  • Arguments: None
  • Return: None

5.1 Introduction

Every Infocom game begins with an initialization routine, GO,  that  sets certain variables and executes specific routines. It will then jump into the MAIN-LOOP which will indefinitely ask for commands from the user and process them.

5.2 Running GO

All Infocom games have the similar initialization routine for each game. “Learning ZIL” mentions that the GO routine should:
  • Set special global variables
  • Set interrupts, usually with the QUEUE or INT routines
  • Display an opening text/title screen
  • Call V-VERSION to show copyright information, release number, and serial number
  • Call V-LOOK to describe the current location
  • Call the MAIN-LOOP
The important global variables that are set include WINNER (object number for current active actor which is usually the PLAYER object), HERE (current location of the WINNER), and LIT (indicates if the current location is lit). All version 4 (except AMFV) and 5 games will also check the width of the screen. Some games will not execute if the screen width is too small. Infocom documentation recommends all games start with an opening title screen and display game information before showing the current locations description.

No comments:

Post a Comment