Skip to content

Hyperlinks

ThePix edited this page Aug 1, 2023 · 2 revisions

Rather than have the player type commands or use the side pane, you might prefer to have the player navigate the world using links in the text.

This will arguably make your game similar to a Twine or Squiffy game, but in this case your game will be backed by a comprehensive world system that tracks items within its geography.

Item Links

You can give items links just be including an optional library.

settings.libraries.push('item-links')

With this is place, the player can click on an object, then select a verb to apply to it.

Command links

You can also add your own links directly in the text, using the cmd text processor directive.

{cmd:get boots}
{cmd:drop hat:drop the hat}

When clicked, the command is passed directly to the parser to deal with just as if the player had typed it.

Tutorial

QuestJS Basics

The Text Processor

Commands

Templates for Items

See also:

Handing NPCs

The User Experience (UI)

The main screen

The Side Panes

Multi-media (sounds, images, maps, etc.)

Dialogue boxes

Other Elements

Role-playing Games

Web Basics

How-to

Time

Items

Locations

Exits

Meta

Meta: About The Whole Game

Releasing Your Game

Reference

Clone this wiki locally