Turbo Pascal Text Adventure Primer cover: BEACON, the adventure the primer builds in Turbo Pascal 2.0, mid-game on the Tatung Einstein
← Back to Modules
module
27

Appendix V: The BEACON Files

How BEACON's three data files are laid out, for anyone who wants to make their own island.

BEACON.TXT

Plain text, one paragraph to a line, no line longer than 255 characters. Lines before the first * are notes and are ignored.

*ROOM <name>
<north> <south> <east> <west> <up> <down>
<the description, one paragraph to a line>
...
*MSG <number> <name>
<the message, one paragraph to a line>
...
*END
  • The rooms come first. The first *ROOM is room 1, and so on.
  • The exits line gives the room number in each direction, or 0.
  • Every * line, room or message, starts a new message, so room N's description is message N. After the rooms, messages are numbered on from there: BEACON's first *MSG is 13. The number on a *MSG line is for you to read; MAKEDAT counts.
  • A room's name is up to 16 characters.
  • Joined together, one message's paragraphs must come to no more than 255 characters, counting one for each break between paragraphs.

BEACON.DAT

A typed file of Room records:

Room = record
  Name: string[16];
  Exits: array[1..6] of Byte;
end;

Each record is 23 bytes: the name's length byte and 16 characters, then six exits. Like every typed file, it starts with four bytes saying how many records there are and how big each is.

BEACON.MSG

A typed file of string[255], one message to a record, 256 bytes each. Message N is record N - 1. A | in a message marks a new paragraph, and Wrap starts a new line there. Unused bytes are zero, because MAKEDAT clears each record with FillChar before filling it.

Making Your Own

Change BEACON.TXT in any editor that keeps it as plain text, run MAKEDAT, and run the game. If you add rooms or things, Rooms, Things and the code that tests rooms by number in BEACON.PAS must change to match.

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.