Image copyright Games Done Quick Image caption Chelney (front), Ppotdot1 (middle) and DarkTerrex (behind) during their race to complete Mega Man 6 at Summer Games Done Quick 2018

As long as video games have been around, people have tried to complete them as quickly as possible.

Known as speedrunning, gamers worldwide stream and upload videos in the hope of breaking the top records, with the most popular videos viewed tens of millions of times.

Over the past 10 years, speedrunning has become increasingly intertwined with donations as streamers often host charity streams as a way to give back to the community.

This is the idea behind Games Done Quick (GDQ), a gaming marathon which will hold its 20th biannual event from 23-30 June 2019.

The event offers viewers the chance to watch some of the best speedrunners in the world, and viewer donations have totalled $19.3m (£15.3m) since its inception in 2010.

For example, Pokemon speedrunner SheNanagans' GDQ run of Game Boy classic Pokemon Blue raised around $46,000 (£36,250) in 2015 and has since been viewed more than 2.8 million times on YouTube.

Image copyright Games Done Quick/YouTube Image caption Pokemon speedrunner SheNanagans beating Pokemon Blue in under two hours

GDQ was originally organised to put a positive spotlight on gamers by supporting charity.

The charity speedrunning marathon has come a long way from the first event in 2010, which was held in GDQ founder Mike Uyama's basement, as it now sells out entire hotels with more than 2,500 attendees and millions watching online.

These online viewers are crucial as the event raises money for charity by encouraging its audience to donate as they watch the streams, with donations going to organisations such as Doctors Without Borders and the Prevent Cancer Foundation.

Matt Merkle, director of operations for GDQ, explained how it went from raising around $10,000 (£7,878) at its first event to hoping to raising more than $2.4m (£1.9m) nine years later.

"To motivate donations, we offer donation incentives, which can affect games played in various ways," he explained.

"Examples include requiring a runner to play on hard mode, showing off a particularly difficult trick, or even naming characters in games like Final Fantasy.

"The runners are often the record-holders in their particular runs and travel from all over the world to participate and help the charities raise money."

GDQ is not the only show in town, with other annual events such as Desert Bus for Hope raising millions of dollars for charity through gaming marathons.

But anyone who regularly watches videos on live streaming platform Twitch will tell you that charity streams have become heavily associated with the gaming community.

Part of the reason for this can be attributed to Extra Life, a charity regularly used by gamers to raise money for children's hospitals.

Some of the most popular streamers have worked with Extra Life, raising more than $50m (£39m), since the charity's inception in 2008.

Former participants include popular gaming critic TotalBiscuit, who died in May 2018, and prominent YouTuber Markiplier who has more than 23 million subscribers.

Thanks to the support from high-profile streamers, Extra Life has now become the charity that many gamers turn to when they host their own gaming marathons on Twitch or YouTube.

These content creators may be entirely different in their brands and personalities, but they come together for the common cause of raising money.

Extra Life drives donations through these gamers all year round, with Splatoon streamer That Bald Gamer raising more than $10,000 (£7,878) for the charity in June 2019.

The reason Extra Life focuses on working with Twitch streamers and YouTubers is simple.

"You don't see a viewer going online to Twitch or YouTube to search for a charity stream," said Michael Kinney, managing director of Extra Life. "But they do search for their favourite content creator.

"It's that meaningful connection with the broadcaster that leads people to donate, and actually, it's a more intimate connection than they would have had with a Hollywood celebrity asking to donate in a telethon.

"The interactivity online makes it a much more engaging conversation. When they say the cause means a lot to them, it's genuine. That's why people donate."

Image copyright Aureylian/Twitch Image caption Aureylian is part of Mindcrack, a group that annually hosts a 48-hour charity stream

Erin Wayne, better known as Aureylian to her 153,000 Twitch followers, balances working closely with Extra Life as one of their ambassadors with working full-time as head of community marketing at Twitch.

Her role is to describe Extra Life to her audience while keeping them engaged by playing games such as Final Fantasy XIV and Garden Flipper.

She also raises around $250,000 (£196,493) annually for charity as part of Mindcrack.

"Extra Life was one of the first organisations to empower gamers to do something for good," she said. "And when you're creating content day in day out, you can feel the need for a sense of greater purpose.

"Fundraising is a great way to do that. If you have a following, you have the opportunity to bring people together to raise money for sick kids.

"Gamers are a mobile and powerful group of people, and they rally together to help when there are others in need. It helps people feel like they've done something for the greater good."