An example that offers ideas on how to get started with a JavaScript-based HTML5 text adventure game.
Working Title: Escape the Dead
Opening: The player wakes up in a hospital room, dehydrated and weak. You call for a nurse, but no one comes. You struggle to search your memory, and the last thing you remember is falling in a river and drowning. The player chooses their name, their gender, and a starting item. The player will be able to examine the room, and will have to go to bathroom and drink water before being able to leave.
Setting: The setting of the game is a world overrun by a zombie outbreak. The player will be able to move through the hospital, the streets, and buildings in the surrounding neighborhood.
Entities: The player will encounter zombies as well as other survivors. A helpful NPC will explain what happened during the time the player was in a coma. When a player encounters a zombie, they can use a weapon in their inventory if they have one, or they can run. If they fail to run or attack, they will lose a portion of their health.
Actions: The actions available to the player will be: examine- provides information about current location and objects that can be interacted with. take- adds an object from the location to the player's inventory. check inventory- lists all the items the player has in their inventory. use- uses one of the items in the player's inventory. run- the player returns to the previous area go to- the player moves to the specified location
Endgame Scenarios: The game can end when A) The player runs out of health B) The player comes across a scenario in which they are instantly killed C) The player reaches the safe zone.