If you've played the video game The Last of Us, or watched any of the recent TV adaptation, you'll be familiar with the idea of a mutated fungus infecting most of humanity – and there's now some science to match up with that science fiction.

While we're not quite on the brink of a societal apocalypse like the one depicted in The Last of Us, researchers have demonstrated how pathogenic fungi could evolve in a warming climate to better withstand the heat inside our bodies.

Considering it's that heat that does most of the job of protecting us against these threats, the implication is that these pathogens might become a greater hazard in terms of disease as they adapt to a planet that is consistently getting hotter.

"These are not infectious diseases in the communicable sense; we don't transmit fungi to each other," says molecular geneticist and microbiologist Asiya Gusa from the Duke University School of Medicine in North Carolina.

"We breathe in spores of fungi all the time and our immune systems are equipped to fight them."

The team looked in detail at a pathogenic fungus called Cryptococcus deneoformans, putting it in lab conditions and raising its temperature from 30 °C (86 °F) to 37 °C (98.6 °F). These heat stresses significantly changed the genetic landscape of the fungi.

Specifically, there was more movement among the 'jumping genes', those transposable elements within DNA that can change position in the genome – five times as much movement at the higher temperature, in fact. While these transposable elements don't make proteins directly, they can affect the way that other genes work.

Three jumping genes in particular were tracked: T1, Tcn12, and Cnl1. The shifts they made within genes and the genome suggested that they could be altering the way that genes were coded, and might possibly introduce drug resistance. It's still not fully clear what the end result of this increased activity might be.

Further tests were carried out on mice, where the activity of the transposable elements was even more pronounced. The researchers think that actually being in an animal, with its immune response and other processes, might be increasing the movement.

"We saw evidence of all 3 transposable elements mobilizing in the fungus genome within just 10 days of infecting the mouse," says Gusa.

"These mobile elements are likely to contribute to adaptation in the environment and during an infection. This could happen even faster because heat stress speeds up the number of mutations occurring."

It's not time yet to build an underground bunker: this research is still in its early stages and doesn't involve actual human beings. What's more, fungal spores are generally larger than viruses, so precautions such as face masks will be more effective against them.

What the research does show is that increased heat drives faster genetic changes in C. deneoformans. The takeaway is that dangerous fungi could be evolving more quickly than we thought as temperatures around the globe climb higher.

The next stage is to study pathogens from people who have had a fungal infection relapse. Infections like this already kill hundreds of thousands of people per year, but right now it's only the seriously immune-compromised at risk. That could one day start changing, and Gusa acknowledges the similar theme in The Last of Us.

"That's exactly the sort of thing I'm talking about – minus the zombie part!" says Gusa. "Fungal diseases are on the rise, largely because of an increase in the number of people who have weakened immune systems or underlying health conditions."

The research has been published in PNAS.