Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Dear Monks,

Since I started using computers, many years ago, I've always been fascinated with the idea of writing my own games.

The problem is that I didn't have a team to help me with fancy images and sounds; so I started writing simple text adventures, and have done so in most languages I have learnt so far.

This meditation is about the writing of an adventure in Perl 6.

According to the Wikipedia, interactive fiction (which is another name for "adventure") describes software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives and as computer games. In common usage, the word refers to text adventures, a type of adventure game with text-based input and output.

A typical adventure session could go like this (an extract from the classic Colossal Cave):

You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully. > SOUTH You are in a valley in the forest beside a stream tumbling along a rocky bed. > SOUTH At your feet all the water of the stream splashes into a 2-inch slit in the rock. Downstream the streambed is bare rock. > DRINK WATER You have taken a drink from the stream. The water tastes strongly of minerals, but is not unpleasant. It is extremely cold.

One of the interesting things of writing adventures, is that they require some knowledge of a programming language, but are not that difficult to write (once you know a few basic concepts); and since creating is actually as fun as playing, it's an interesting way to learn a new language.

So I decided I would test my knowledge against the current implementations of Perl 6, and the result was this presentation to the Nordic Perl Workshop (and a couple of days later for the guys of Oslo.pm).

I hope you'll enjoy!


In reply to Adventures in Perl 6 by nferraz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found