Skip to content
Robin Johnson edited this page Aug 26, 2021 · 3 revisions

There should be exactly one game block in your Gruescript code. This usually comes at the top of the file, but does not have to. It contains the game's metadata, and any instructions to be run when the game begins.

The game block must include:

  • an opening line beginning game followed by the game's title

It should include:

  • metadata

    • a line beginning id followed by a unique identifier for the game

      • the id is used by the game to store saved games in local storage (cookies). It must be unique on the game's site - if you host several games, they must all have different identifiers, or they will not be able to tell between each other's saved games.
    • an author line, beginning author followed by the author's name (or authors' names)

    • a version line, beginning version followed by a version number

  • game parameters

    • a person line, either person 1 or person 2, determining whether the game will be in the first ("I am in...") or second ("You are in...") person. If not present, the game will default to second person.
    • an examine line, examine on or examine off. If examine is on, all things will be shown as buttons (styled distinctly from verbs), which the player can click to examine that thing. By default, examine will be off.
    • a conversation line, conversation on or conversation off. If conversation is on, Gruescript's conversation system will be used for this game. By default, conversation is off.
    • a [wait]] line, wait on or wait off. If wait is on. If wait is on, the wait verb will be available at all times. By default (unlike examine and conversation), wait is on.

It may include:

  • colour configuration lines. These begin colour or color , followed by a "colourable area" and a CSS colour name or six-digit hex colour code (without a # -- that would make it a comment)
  • instructions to be executed when the game begins; usually say commands.
    • All the instruction lines in the game block should be grouped together, and come after the other lines.

Example

game The Very Dangerous Planet
id tidp
author Jane Austen
version 1.0.0
person 2
conversation on
examine on
wait on
say Your spaceship has crashlanded on a strange planet!
say Oh well, it looks safe enough.
Clone this wiki locally