Hiss Game Editor

Scripts (add+)
Values
? (edit)

This the first script in the game. You can't delete it, or rename it because then the game player wouldn't know where to start!


Are you sure you wish to delete script ''?

Add a new script named:

Special:

Create '*Always Before

A special script that always runs before every other script.

Create '*Always After

Another special script that always runs after every other script.

Hiss Logo

Hiss User Guide

This is a ***WORK IN PROGRESS*** Check out the devlog to see where I'm at.

Table of Contents

Introduction

Welcome to Hiss, The Hypertext Interactive Story Scribe!

What is Hiss?

Hiss is a tool for creating text-based games such as "choose your own adventure" stories, textual puzzles, or something else entirely. All game interaction is performed through written text and hyperlinks. Other than that, the only limit is your imagination.

Exported Hiss games are a single HTML file which can be played in any reasonably modern Web Browser. The game file can be shared and played "offline" or hosted on a server.

How to get started

One way to learn how to use Hiss is to read this manual.

The other way to learn is to just mess around with the initial sample game and see what happens. (You can't hurt anything and you can always reset the sample. It's one of the options under the "New Game" menu item.)

^ Table of Contents

The editor interface

The Hiss editor is divided into these sections:

File Menu

  • "Export Game" - save your game as a stand-alone HTML file
  • "Save File" - save your game as a text file
  • "Load File" - import a game text file
  • "New Game" - replace whatever you current have with a new blank game or the initial sample game
  • "Editor Color Scheme" - change the editor colors (does not affect game colors)

List Panel

  • Click "(add+)" to create a new script in your game
  • Click on the name of a script to edit it

If you've set any variables in your game, they will show up in this panel with their current values. Likewise, any colors you've set will show up in a visual preview.

Script Editor Panel

  • Click "(edit)" to rename or delete the current script.

This is where you'll edit the content of each game script. All changes show up immediately in the Player Preview to the right.

Player Preview Panel

The current script plays here as it will in the exported HTML game.

As you navigate the scripts in your game, the current script in the Script Editor Panel will update to match.

^ Table of Contents

Basic tutorial: your first game

To start your first game from scratch, select *New Game* from the top menu and then the *Make New Blank Game*.

Hiss was created with storytelling in mind. The story begins with the script named *Start. Let's make a game with a few actions and places to go. Think of a character and a setting.

(If you can't think of anything, how about: "Once upon a time, there was a Space Gerbil named Starfuzz who was returning home...")

As you type text in the Script Editor Panel (the center panel in the editor), the player (right panel) will continuously update to display the text as it will appear in the final game. Note that you can make paragraphs of text by separating them with one or more blank lines.

Got the start of a story in the *Start script? Now we can add some choices in the form of links to other scripts.

Scripts can represent actions, or places, or just more story.

A convenient way to make new scripts is to create links to them. The player will display a "Create ..." button for any script that doesn't yet exist.

Example:

Once upon a time, there was a Space Gerbil
named Starfuzz who was returning home.

But fuel was running low and the usual route
was too far.

Starfuzz can:

link Look at the map to map1

link Have lunch to lunch

If your script looked like the above, the player would show two buttons: "Create 'map1'" and "Create 'lunch'".

Try it with your own story. Or copy the one above.

When you click one of the "Create" buttons, two things will happen: 1. The new script will appear in the Scripts list in the left panel and will be selected; 2. The editor in the middle panel will display the new script so you can start writing it.

Write your own story text for your game's script(s), or use these:

Script "map1":

Starfuzz looks at the galactic star map. Aha! It's all
so clear now. The route can be plotted through a dense star
cluster.

link Plot the route to map2

Script "lunch":

Starfuzz is hungry. You know how hard it is to plot interstellar
travel on an empty stomach.

Mmmm, that was a good sandwich. Now it's time to check that map.

link Look at the map with a full belly to map1

As you can see, there can be more than one link to a script and the text on the link can be anything you want. Only the script name needs to be consistent. The words "link" and "to" are keywords and must be entered in the correct order for the link to work.

Wisdom of the ages: To preserve your work as you create your game, it is highly recommended that you frequently make a backup using the "Save File" option in the top menu. This will save your game as a text file which can be re-imported with "Load File". (Hiss saves your game using your browser's "local storage" as you type, but it's better to be safe than sorry.)

Add as many scripts as you like to complete your first game. Here's the rest of the Space Gerbil game:

Script "map2":

With the help of the ship's computer, Starfuzz plots the route
through the star cluster. It will be a bumpy trip, but that's the
only way to make it home with the remaining fuel.

link Pilot home! to go home

Script "go home":

The dense star cluster is notoriously difficult to navigate, but
Starfuzz summoned Gerbil Resilience and piloted deftly through.

Upon entering the Home System, a familiar voice called over the
communications channel: "Welcome home, Starfuzz. You are just in
time to save us from the invading Space Lizards!

YOU WIN!

Story to be continued in Space Gerbil 2...

Here is a visual diagram of the flow of the scripts in this tiny game:

*Start lunch map1 map2 go home the end

As you can see, the "lunch" script is the only alternative path and even that doesn't affect the rest of the game. Perhaps you can add some more interesting and consequential choices?

You can test your game at any point by selecting a script in the left panel and playing the game the right panel. You can play from the beginning by selecting the "*Start" script.

It may be small, but this is a real game, let's export it:

Once you've completed your game, click the "Export Game" link in the top menu. This will save your game as an HTML file which can be played in any modern browser. You can share your HTML game any way you normally share files, or host it on a website for anyone in the world to play.

Congratulations on creating your first game!

This completes the tutorial. Linking between scripts is all you need to create a choose-your-own-adventure game. But Hiss has features to support more advanced types of storytelling games. Read on to learn about them.

^ Table of Contents

Introduction to variables and logic

Hiss supports some basic computer programming concepts. Even simple text stories can benefit from a little logic here and there.

For example, the Space Gerbil game we made above currently ignores whether or not you choose to eat lunch before journeying home, which is kind of sad. Let's fix that

To keep track of whether or not we had lunch, let's add a variable called lunch eaten and set it to the value true in the lunch script like so:

Starfuzz is hungry. You know how hard it is to plot interstellar
travel on an empty stomach.

set lunch eaten to true

Mmmm, that was a good sandwich. Now it's time to check that map.

link Look at the map with a full belly to map1

You'll notice that as you type the new line in the script, it will appear in the game like any other story text until you've typed enough for Hiss to recognize it as a programming statement.

The moment you type "set lunch eaten to t", that's enough. The line will disappear from the story and a new section will appear in the List Panel:, Values. As you type the rest of the value "true", that will appear as the variable's value in the List Panel.

The values shown in the List Panel are the result of whatever scripts you've run, including the one you're currently editing.

NEXT: check the variable in one of the later scripts of the story

Now let's add a little "easter egg" to the game that mentions the fact that you've eaten lunch. Here's the

With the help of the ship's computer, Starfuzz plots the route
through the star cluster. It will be a bumpy trip, but that's the
only way to make it home with the remaining fuel.

if lunch eaten is true
  (Good thing Starfuzz ate lunch. This is hardly a
  job for an empty belly.)
endif

link Pilot home! to go home

The "if statement" ("if lunch eaten is true") should be fairly clear on its own. Anything after this statement will only show up if the statement is true...in this case, literally the value "true".

The "endif" statement ends the check, so anything after that line will show up whether or not lunch was eaten. In this case, the "Pilot home!" link will always be visible whether you ate lunch or not.

Go ahead and re-play the game in the editor or re-export it and play the exported game. The new sentence should show up depending on whether or not you eat lunch.

If it doesn't work, congratulations, you've created your first bug. Try debugging your game by watching the value of lunch in the List Panel to the left when you chose the option to eat lunch. Compare it to the value you're checking in the map2 script. Spelling matters because Hiss has no way of knowing if you actually want "true" and "troo" to be the same thing.

(Aside: Indenting the text between the if and endif keywords is optional, but it makes the structure a little clearer to read. For this reason, Hiss will automatically indent statements like this for you when it loads a script into the editor panel.)

^ Table of Contents

Language reference

A Hiss game is made up of one or more "scripts". Generally speaking, each script represents a new page that will display in your game. You can use scripts to represent actions, areas, or simply more story.

If a line of Hiss script matches one of the statement patterns below, it will perform a special action. All other lines will appear verbatim in the game. For example, if foo is bar matches the pattern for an "if statement" and will be interpreted as such by Hiss. But it is a duck if it quacks does not match the pattern and will display as regular text.

The most important rule of the Hiss language is: every statement must be on its own line.

set [variable] to [value]

Variables allow you to store things. What kind of things? Well, anything you can type. To set a variable to a value, use the keywords "set" and "to" like so:

set x to 5
set foo to bar
set Cheese to Gouda
set favorite hobbit to Samwise Gamgee

As you can see in that last example, both the variable name and the value can span multiple words. You'll know Hiss understood what you wrote if the words "set" and "to" are highlighted in the code and the variable shows up in the "Values" section of the List Panel on the left.

print [variable]

What can we do with variables? The simplest thing is to print them like so:

set Cow Sound to Moo

print Cow Sound
The above example with print "Moo" on a line by itself. You can also display a variable in a paragraph of text (no new line). Hiss will try to do the right thing with surrounding punctuation:
set Cow Sound to Moo

The cow says, "
print Cow Sound
!"

Which will print 'The cow says, "Moo!"'.

Now is a good time to repeat the rule: every statement must be on its own line. Let's see what happens if we ignore the rule:

set Cow Sound to Moo

The cow says, "print Cow Sound!"

As you have perhaps guessed, this prints the line verbatim: 'The cow says, "print Cow Sound!"'

if [variable] is [value]

Anything appearing after an "if statement" will be ignored unless the statement is "true". An if statement is true when the variable is set to the same value after "is".

For example, this won't print anything:

set Flavor to lime
if Flavor is lemon
  I LOVE LEMON!

But this will display the shouting message:

set Flavor to lime
if Flavor is lime
  I CHANGED MY MIND AND LOVE LIME INSTEAD!

If is usually paired with "endif" and often with "else", which are described next.

else

Anything appearing after an "else statement", which is just "else" on a line by itself, will be ignored unless it is a preceeded by an "if statement" which has been found to be false.

Example:

set Flavor to lime
if Flavor is lemon
  I LOVE LEMON!
else
  I CHANGED MY MIND AND LOVE LIME INSTEAD!

This will display the LIME message because the "if Flavor is lemon" statement was false.

endif

As mentioned above, an "if statement" is typically paired with an "endif". An if or else without an endif will affect everything to the end of the script, including other ifs and elses.

Example without endif:

set Flavor to lime

if Flavor is lemon
  I LOVE LEMON!

if Flavor is lime
  I CHANGED MY MIND AND LOVE LIME INSTEAD!

The above example will not print anything because "if Flavor is lemon" was false. Programmers describe the relationship between these two if statements as "nested". In fact, if you leave and return to the above script, Hiss make the relationship easier to see by indenting the second if statement like the example below.

Same example without endif, but with proper indenting:

set Flavor to lime

if Flavor is lemon
  I LOVE LEMON!

  if Flavor is lime
    I CHANGED MY MIND AND LOVE LIME INSTEAD!

But an endif can end the first if and kick the second one out of the nest. Fly and be free little if!

Note that in the following example, both if statements have been terminated with an endif because that's what you would normally do and is recommended. (An if without an endif tends to produce a sense of unease and tension, like the sword of Damocles (wikipedia.org).)

set Flavor to lime

if Flavor is lemon
  I LOVE LEMON!
endif

if Flavor is lime
  I CHANGED MY MIND AND LOVE LIME INSTEAD!
endif

link [some text] to [script]

TODO

inc [variable] and dec [variable]

TODO

STOP!

TODO

deco: [decoration pattern]

TODO

insert [script] here

TODO

Scripts

A Hiss game is made up of one or more "scripts". Each script represents a new page that will display in your game.

You can use scripts to represent actions, areas, or simply more story.

^ Table of Contents

Scripts (Advanced)

When you export your game as a text file with the "Save File" option in the file menu, the game's scripts appear as names in square brackets like so:

[*Start]:
Hello world.
link foo to Foo

[Foo]:
This is foo.

If you have a favorite text editor program, you are encouraged to edit your game there and re-import it to the Hiss editor for testing.

^ Table of Contents

No such thing as errors

HissScript has a fundamental rule: there are no errors. A mis-typed command just displays as regular text. Hopefully, this makes Hiss friendly for game-makers of all skill levels.

^ Table of Contents

Making Decorations with "deco"

TODO: pull examples and such from the stand-alone deco editor, decos.html

^ Table of Contents