Dying in real life is - religious beliefs aside - the end, the last event you'll take part in. Not so in computer games, where it's never worse than briefly infuriating. In World of Warcraft, the massively multiplayer online roleplaying game (MMORPG) that 8.5 million people play every day, your death just means you have to spend several minutes trekking back to the point at which you died. And your avatar is temporarily weakened. It's an inconvenience.

But why is in-game "dying" necessary at all? Alternatively, why isn't dying in a game as final as it is in real life? In MMORPGs, the latter is in part at least simply answered: it's economics. From Blizzard's point of view, if in-game death were final, people would stop coughing up their monthly subscription. And the vibrant in-game economy depends to a certain extent on death and regeneration: when your avatar comes back to life, your weapons are damaged and need repairing - for which you pay a fee.

In fact many games, both on computers and in real life, require you to leave the field of play, for structural as much as for narrative reasons. In childrens' playground games, team members have to be eliminated to determine the winner before the end of the lunch break. In arcade videogames such as Space Invaders, your skill determines how long you can play before giving the machine more cash. Death puts a time limit on those games, just as it does for life. In other games, "dying" means you have to go back to the beginning of a level and work your way through it again; so death becomes an indication that you've not reached a specific skill level.

But where's the fun in endlessly replaying a level? Gamers are unequivocal: "Dying gives a game meaning", say posters on the PC Advisor forums. Markus Montola, a researcher at Tampere University in Finland, takes this further: "You have a motivation - to avoid being annoyed by dying. Motivation is what makes the game meaningful."

Pete Hines - vice-president at Bethesda, the developer behind the role-playing game Oblivion and its expansion pack, Shivering Isles - agrees. "Having your character die or fail is important because your actions have to have some meaning in the game, and to you."

Meaningful death

But is the death of your character the right way to give a game meaning? Peter Molyneux of Lionhead, the developer of Fable, Black & White and The Movies, says: "A fight has to cost the player something, or it loses its meaning. Previously, that cost was time and tedium [in replaying a level]. But is that the right cost?"

Molyneux argues that designers should look to Hollywood for how to treat the game's hero - ie you, the player. "Have you ever seen a film where the hero dies and dies again? The tension in an action film almost always comes from hammering a hero so hard that he almost dies - and then he leaps back up."

In a film, death is usually the climax, a cathartic event. The battle of Thermopylae is depicted in the film 300; commentators remarked on how much like a computer game it is, with its cinematic cutscenes and boss battles. However, this film ends, as the real events did, with the glorious death of its hero, Leonidas, king of the Spartans, and his plucky army.

Perhaps the difference between computer games and film or television dramas is how we consume them. TV and film are genres that we consume passively: we can't affect the outcome (though the popularity of voting in shows such as Big Brother and talent contests might indicate that we like to). Roleplaying games, however, challenge us directly by setting goals, and often one of those goals is to avoid being killed.

There are three types of goals in computer games, says Montola. Endogenous goals originate within the game; exogenous from outside it. "Every game of chess has identical endogenous goals, but the exogenous ones range from having fun to humiliating the opponent to winning a tournament. Endogenous goals are always about getting a checkmate, or at least not being checkmated yourself."

Diegetic goals "come in when you start to role-play," he says. "If you play World of Warcraft and just grind to get better gear, you never think about this dwarf hunter you're playing. But once you start with pretend-play, you have to think 'what would Mr Dwarf Hunter want? What are his goals?' And those goals are diegetic." Montola points to Eve Online, the space-trading MMORPG. "It is particularly elegant in regard to diegetic goals. Everyone plays a space trader, miner or pirate, so it's easy to understand that I'm a trader and I want to maximise profit and live a peaceful life."

Eve, he adds, "is a game where you can lose months of work by being shot from the skies. That game is given exogenous meaning by the extremely strong endogenous and diegetic urge to avoid death."

Death has been part of computer gaming since its earliest days. Montola points to Arkanoid, a clone of Breakout and a direct descendant of Pong. Dating from 1986, the game involves you moving a bat at the bottom of the screen to try to prevent the ball falling away from the board. Says Montola: "You probably don't think you can die in Arkanoid, even if you miss the ball. But your bat is in fact a spaceship called Vaus, and it gets destroyed when you miss the ball, so missing the ball means dozens or thousands of deaths ... depending on your imagination."

Reaching even further into the dark ages of computing, he says: "If you think that an abstract bunch of pixels can die, you can trace this back to the earliest computer games, such as Spacewar! from 1961. Since this predates the earliest arcade games by a decade, it's fair to say that death has always been one of the central punishments in digital gaming."

Reflect real life?

But do you need to die at all? Eric Zimmerman, a New York-based game designer who helps run the studio Gamelab, says: "Dying in games is a strange artifact of certain kinds of historical forms and content, and there is no good reason for including it in many cases." Molyneux concurs: "If we were starting from scratch, we wouldn't come up with this paradigm."

There are bigger questions, of course. In real life, death is more than an annoyance. So should games reflect real life? Or should we redefine "dying" in the context of games? Isn't it more like tennis, where you can lose a set but go on to win the game? Or are there bigger lessons to be learned from games?

Says David Ewen, a 46-year-old gamer: "Kids need to learn that if they're ambushed by a horde of self-regenerating laser-festooned killer robots on an asteroid far from the main space trade routes in real life, they're not actually going to end up getting teleported out to the local Starbucks for a nice refreshing break."

· If you'd like to comment on any aspect of Technology Guardian, send your emails to tech@theguardian.com