There is one question a lot of people ask while playing Candy Crush Saga: why am I playing Candy Crush Saga?

This saccharine-splattered casual gaming treat, which hit 500m downloads last November, is both utterly compulsive and totally inexplicable to a huge number of its users.

The same goes for other instant gratification hits like Flappy Bird and Farmville; the compulsion to play combined with the compulsion to tell people you hate playing. What is going on?

To find out, we asked the cyberpsychologist Berni Good and Jamie Madigan, who runs the blog Psychology of Games, to explain the hidden processes going on beneath our mystifying addiction to casual games. Here's what they told us.

Candy Crush Saga

Candy Crush Saga… addictive.

This hugely successful title belongs in a genre known as "match three puzzlers", because it's all about getting three or more similarly coloured objects together within a constrained playspace. Zuma, Bejeweled and Jewel Quest work in exactly the same way.

All of these games are based around an extremely effective compulsion loop – the sequence of events that underpin most game design systems: you perform an action, you are rewarded, another possibility opens – and so on. Behind the compulsion loop in Candy Crush are two important psychological motivations: pattern recognition and reinforcement.

Our brains love to search for systems and sequences in the world around us; it is our primary method of reading our environment. So scanning the Candy Crush screen for possible colour matches is in itself pleasurable. This is how we read everything we see.

On top of this, the game is based around very tight systems of reinforcement, the idea that behaviours can be encouraged if a pleasurable stimulus is provided. Indeed, critics of Candy Crush often allude to it as glorified Skinner box, referring to psychologist BF Skinner who experimented with variable reward systems on rats. In Candy Crush Saga, risk, reward and opportunity combine into a smooth and cohesive system, so that we're getting constant pleasure hits, and therefore constant cravings for more. Reinforcement is a key element of the compulsion loop – and in this case, the loop is so tight, it's difficult to escape.

Another compulsive element of these games is something game designers call "disproportionate feedback" and its something borrowed from slot machines.

Our brains have complex reward circuitry that can easily be triggered by an influx of pleasing feedback. In Candy Crush Saga, a successful move is accompanied by flashing colours, upbeat music and affirming words like "delicious", which appeal directly to our reward receptors.

At the same time, successful moves will often trigger a sequence of subsequent onscreen colour matches, which multiply the effect. The game congratulates us for our skill, even though such "combos" are often simply fortuitous – but our brain gets a pleasure rush anyway.

Gambling machines work in a similar way through a system psychologists refer to as "the illusion of control". Providing lots of nudge buttons and other input options – together with flashing lights and sound rewards for successful implementation – fools us into thinking we are skilled players rather than victims of a very clever system.

Then of course, there's the simple innate desire to tidy up – to restore order. From Tetris to Candy Crush to Threes, there is an instinctive satisfaction in correcting something broken, wonky or incomplete. Game designer Hirokazu Yasuhara, who has worked on everything from Sonic the Hedgehog to Uncharted, put it like this in an interiew with Gamasutra:

"Let's say that you have a flat surface with some bumps sticking up out of it. Most people would want to see those bumps removed, as a sort of equalising or 'beautification' process. Also, you know the game Othello, right? A lot of the fun in that game is the exhilaration you get when you flip a lot of pieces and make more of the board your color. Tidying up things, in a way."

Farmville

Zynga's once hugely successful farming game may itself be fading in popularity, but it belongs to a thriving class of simulations in which players build and customise their own territories, often sharing the results with friends. Why do we enjoy building and personalising virtual environments? In evolutionary psychology, the theory of signalling suggests that a lot of our actions are actually methods of communicating our qualities.

"For example, a really lovely, well-tended garden is a public signal of how responsible and dutiful you are, and how good you are at taking care of things, which could be a signal that you'd be a good parent." So when we share a well-designed farm, city, or theme park with friends, we're telling them that we are good life partner material.

There is a less charitable reading of our addiction to creative sims like Farmville and Sim City, however.

"Psychological research suggests that people will be very motivated to put lots of effort in if it means that they ‘look’ better than others," says Good.

"I think we see a lot of the ‘peacock effect’, also known as conspicuous consumption, going on in these games. First postulated by a Thorstein Veblen in 1899, the theory suggests that an individual will go to great lengths – and expense – to show others their possessions. It’s all about obtaining and exhibiting stuff to show off your wealth."

This may be especially true in free-to-play games that allow players to spend money on customisation options like new outfits or building blocks: the more you purchase and show off, the theory suggests, the richer feel in comparison to friends.

Finally, Jamie Madigan sees another motivation at work in games that operate a timer system where, say, crops automatically fail unless the player regularly tends to them.

"We hate to lose things and we hate to lose options to do things once we thing we have them," he says. "This is because of what psychologists call 'loss aversion' and 'psychological reactance'. People will spend resources like money or time just to keep things in play once they've gotten moving instead of losing the option to come back to them."

Clash of Clans

Clash of Clans… captivating.

Human beings have a basic desire for autonomy – a sense of control over our lives. In a 2011 meta-analysis, psychologists Ronald Fischer, and Diana Boer found that autonomy is a better predictor of happiness than money.

Battle simulation games like Clash of Clans give the player complete control over an army as it engages in combat with an opposing force, providing not just autonomy but purpose. At the same time, you also get to design and build your own home base, allowing personal creativity.

"Simulation games let the player choose what they are building or what their character does or wears," says Good. "That’s very freeing for people, especially when you think about all the imposed choices we face, such as work projects, paying bills, doing homework, etc. People get a sense of well-being in a fantasy virtual world where they make the choices about ‘how they live’ and get to be creative without constraints or permission from partner or parents. That is very compelling".

Angry Birds

Angry Birds... silly.

In terms of casual game design, Angry Birds is effectively the perfect storm of compulsive factors. It has everything and it has it all in exactly the right quantities.

Writing in Psychology Today, Michael Chorost once listed the four main reasons for the game's success: the interface is completely intuitive so there's no barrier to inhibit compulsion; there is disproportionate feedback when the bird hits the pig building (glass shatters, logs fall, stone crumbles); it's funny and different everytime so there's suspense; it's based on authentic physics, so we feel we can apply real-world skills to the game, making skill feel more 'legitimate'.

Chorost centres on the delicious delay between firing the catapult and seeing the results – it is nectar to our primal pleasure centres.

"The dopamine action in your brain makes you want to know, urgently, what will happen when you fire the bird. And it's extremely easy to get yourself in a position of wanting, because the game is so simple. It gives you intermittent but extremely satisfying rewards. So you pull the slingshot again and again and again. And again and again and again and AGAIN."

Meanwhile, Raph Koster believes that atavistic skills may be re-awakened in the central aiming mechanic.

"It's evolutionarily useful that the brain fastens on challenging problems that have to do with trajectories," he told us when we spoke to him about compulsive games three years ago. "Physics calculations like this were extremely valuable if you made your living with a spear."

Flappy Bird

Flappy Bird... flowy

Although apparently an incredibly simple design – flap your wings to avoid the incoming pipes – the key to Flappy Bird's success is in its implementation. Everything from the height of each flap, to the width of the pipes, is exactly right, exactly challenging enough to make players believe they can do better next time.

Meanwhile, all extraneous detail is stripped away. The game starts quickly, and it usually ends quickly: and when it ends you can start immediately.

This isn't just a compulsion loop, it's a compulsion trap.

"There is definitely an element of 'flow' going on," says Good. "Postulated by Mihaly Csikzentmihaly, flow happens when the gamer has clear defined goals and focuses solely on the task in hand so that they become completely immersed and engaged in the task to the exclusion of all else around them. There is a great motivational factor happening in this state: the gamer develops a unique sense of purpose, they forget time."

According to Csikzentmihaly, flow is a route to contentedness; it is an intrinsically rewarding state. However annoying it is, Flappy Bird was born to make us happy.