http://qs321.pair.com?node_id=83905


in reply to Re: Daft text adventure project
in thread Daft text adventure project

Thanks for your fast response!

In order:

1: SuperSearching for 'text adventure' yielded the useful fact that I'm very far from the first person to try this flavour of thing for a first project. Thanks for the further links.

2: I appreciate the benefit of use strict - I was just wondering if the twenty or so lines of multiple-argument my commands it will require were normal.

3: What, exactly, does 'lexically scoped' mean? As a mathematician, it suggests something like 'having a alphanumeric string value' to me - is that correct? I'm already storing my data in files and loading multiple hashes with common keys at execution.

To explain that last bit in a little more detail, so as to help those who would help me:

In an inheritance from the QBasic implementation, everything has an identification code, such as R001234 (for rooms) or Z054321 (for spells - S was taken by another feature, so I used my scrappy knowledge of German to implement a poor mathmo in-joke), which is used to key all the hashes for the given type. Some hashes are keyed to more than one family of codes. For example, the PC races and the general species classes ('Humanoid', 'dragon', etc) both call the same hash for their names and superspecies references, so that the routine which classifies creatures can be fed a race or a species and won't quibble.

Thanks again,

Tiefling

Replies are listed 'Best First'.
Re: Re: Re: Daft text adventure project
by arhuman (Vicar) on May 29, 2001 at 16:53 UTC
    • 2. several my ($var1,$var2,%hash1); lines is ok.
      Learn to use hash/array to reduce the number of variables and group them in useful structure.
    • 3. Super Search my frien, Super Search is your friend.
      Almost all is said in my and local??.
      In brief lexically scoped variables are a kind of local variables.

    As Jepri said you'll probably have to play with Objects,
    as he already suggested perlboot, I will only add perltoot and Object Oriented Perl
    (I haven't read it yet but I've only heard good comment about it...)

    "Only Bad Coders Code Badly In Perl" (OBC2BIP)