Quests are one of the characteristic features of computer role-playing games (further simply RPGs in this article, as the nature of tabletop RPGs is very different). By definition, an RPG relies on them to develop the plot and keep the player entertained.
A distinction is usually made between the main quest, whose completion traditionally marks the end of the game, and side quests, which are generally optional and are done for rewards.
The structure of a quest
A quest can be defined as a series of actions that have to be taken to reach an ultimate goal. To be complete and to have sense, a quest must have several basic elements:
- What your character is supposed to change in the game world. The most typical example is a fetch quest, in which the player must acquire some item and bring it back.
- Chain of prerequisites
- What must be done to achieve the quest target. A simple beginners' quest might have no such chain of prerequisites, but to complicate things for the player, most quests have some chain of requirements. For example, on a quest to retrieve a dragon tooth (the target), the player must first level up to some point, accumulate good equipment, find the golden key (a quest item) to get the whistle of sound sleep (another quest item), ask a hermit for directions and only then actually fight the dragon.
- Players won't do quests for nothing, but expect to get some benefits in return, for example an artefact item with special properties or some perk unattainable by conventional means. An exception may be the main quest, which simply ends the game and as such can't supply any other reward than a credits screen.
- Everything else that exists only to create the atmosphere – why the quest giver wants you to do the job for them, the way they speak, the style of the quest items, and so on.
The terms used above are in no way standardised or universal, but were defined for the needs of this article.
Quests in roguelikes
Due to the complexity of interesting and involving quests, the main quest is almost always static. However, lesser side quests which aren't so developed are more feasibly generated by an algorithm.
Creating dynamic quests algorithmically
HTML and CSS
- HTML, CSS and the DOM (Document Object Model)
- Canvas 2D context
- A standard that first appeared in 2004, and is currently supported by all popular modern web browsers (with Internet Explorer being an exception up to version 9). Canvas 2D in itself is a rather simple 2D API with a set of basic functions for drawing lines, arcs, curves and polygons. It also has the useful ability of