Random encounters—sometimes called wandering monsters—were a feature of Dungeons & Dragons from its beginnings in the 1970s, and persist in that game and its offshoots to this day. Random encounters are usually determined by the gamemaster by rolling dice against a random encounter table. The tables are usually based on terrain (and/or time/weather), and have a chance for differing encounters with different numbers or types of creatures. The results may be modified by other tables, such as whether the encounter is friendly, neutral or hostile. GMs are often encouraged to make their own tables. Specific adventures often have specific tables for locations, like a temple's hallways.
Wandering monsters are often used to wear down player characters and force them to use up consumable resources, such as hit points, magic spells and healing potions, as a way of punishing them for spending too much time in a dangerous area.