Alan Adventure System V3.0
Total Page:16
File Type:pdf, Size:1020Kb
The ALAN Adventure Language Reference Manual Version 3.0beta5 Alan Adventure System - Reference Manual This version of the manual was printed on August 09, 2018 - ii - Alan Adventure System - Reference Manual Table of Contents 1 INTRODUCTION.............................................................13 1.1 Programmer’s Pitch........................................................................................................14 1.2 To the Reader.................................................................................................................14 2 CONCEPTS.......................................................................17 2.1 What Is An Adventure?................................................................................................17 2.2 Elements Of Adventures.................................................................................................19 2.3 Alan Fundamentals......................................................................................................20 What Is A Language?.................................................................................................................................20 The Alan Idea..............................................................................................................................................23 What’s Happening?.....................................................................................................................................23 The Map......................................................................................................................................................24 The Things...................................................................................................................................................24 Other People and Monsters...........................................................................................................................25 Acting...........................................................................................................................................................26 The Input.....................................................................................................................................................26 2.4 Introduction to the Language........................................................................................26 Notation........................................................................................................................................................27 The Locations...............................................................................................................................................28 The Objects....................................................................................................................................................30 The Actors.....................................................................................................................................................32 Inheritance and Object Orientation...............................................................................................................33 Inheritance and Instances..........................................................................................................33 Polymorphism...........................................................................................................................34 Every and The..........................................................................................................................34 The Pre-defined Classes.............................................................................................................34 Creating Classes and Instances...................................................................................................35 Specialising and Overriding......................................................................................................36 Containment , Classes and Transitivity..........................................................................................................37 Containers Containing Containers.............................................................................................37 Transitivity................................................................................................................................37 The Verb Construct.......................................................................................................................................38 - iii - Alan Adventure System - Reference Manual Checking Things........................................................................................................................39 The Syntax....................................................................................................................................................41 Text Output Formatting...............................................................................................................................42 2.5 Strict and Safe..............................................................................................................43 3 LANGUAGE REFERENCE............................................47 General Rules............................................................................................................................47 3.1 An Adventure................................................................................................................48 3.2 Options..........................................................................................................................49 3.3 Types..............................................................................................................................51 Basic, Simple and Compound Types.............................................................................................................51 Instance Type...............................................................................................................................................52 Event Type...................................................................................................................................................52 Set Type.......................................................................................................................................................52 Type Compatibility.......................................................................................................................................53 Type Requirements.......................................................................................................................................54 3.4 Import..........................................................................................................................54 3.5 Classes............................................................................................................................55 Inheritance....................................................................................................................................................56 3.6 Instances........................................................................................................................56 Entities..........................................................................................................................................................58 Things...........................................................................................................................................................58 Objects...........................................................................................................................................................59 Actors...........................................................................................................................................................59 The Hero...................................................................................................................................60 Locations........................................................................................................................................................61 Literals..........................................................................................................................................................62 3.7 Properties.......................................................................................................................62 Inheriting Properties.....................................................................................................................................63 Initial Location.............................................................................................................................................64 Names...........................................................................................................................................................65 Inheriting Names......................................................................................................................67 Displaying Instances.................................................................................................................67 Pronouns......................................................................................................................................................68 - iv - Alan Adventure System - Reference Manual Attributes......................................................................................................................................................69