|
Learning Smash
- About Smash -- This page tells you
what Smash is and what it's all about.
- Overview of Smash -- This page discusses
the concepts and ideas behind Smash.
- Required Files -- Each Smash game is required to
have a few standard files in addition to the location code. Here's what
they are and what they should contain.
- Expression Syntax -- This page lists the
expression syntax of Smash, including operators, operator precedence,
etc.
- Command Documentation -- This page lists
all Smash commands and specifies how they are used. Examples are
included.
- Program Flow -- This page illustrates what
code is executed when. This is essential to keep in mind when
writing code.
Examples
Most of the time, the Smash code required to write a game is pretty
straightforward, but here are some examples that will help you circumvent
some of the tricky situations you might encounter.
- Picking up an Object -- Picking up objects
involves more consideration than you might at first think. It's not
hard, but there are a couple things to keep in mind. This page
contains a few different ways to allow objects to be picked up.
- Using String Encoding -- Smash's string
encoding feature provides the ability to do lots of different things
that may not be immediately obvious. This page provides a few different
examples of things you can do with string encoding.
- Displaying Pluralized Nouns -- This page
illustrates the use of string encoding and the p: and P: operators to
display quantities of items that may or may not be plural, depending on
the state of the game.
Sample Adventure
The following is the complete source code for "The Trainer" as it appears on
Adventure Games Live. This makes use of a great many standard
devices that are used in implementing games in Smash.
- The Trainer -- Source code and step-by-step
explanation.
- The Trainer: admin.sma -- An explanation
of what the admin.sma file can be used for, with an example
pertaining to The Trainer.
|
Writing Games
What is an adventure game? What is interactive fiction? Generally speaking,
they are games in which a story unfolds according to the actions the player,
typically playing the role of the central character, chooses to take. The
terms "adventure game" and "interactive fiction" are more or less equivalent;
the former implies greater emphasis on "game" than "story," while the latter
term implies the reverse.
|