Stars don’t just flicker out like guttering candles and our sun won’t turn “black as sackcloth” without some considerable advance warning. Still, some of the best imaginations in sci-fi and fantasy applied their minds to visions of worlds bound to waning suns.

Fantasy master Jack Vance’s far-future Dying Earth instantly comes to mind, in which the sun perpetually hangs on the verge of burning out forever. The work inspired a whole subgenre that includes such works as Gene Wolfe’s The Book of the New Sun and most recently Scott Bakker’s Desciple of the Dog.

But of course long before any of this, William Hope Hodgson introduced readers to the Night Land.

Let’s refresh. Published in 1912, The Night Land is one of those books that frustrates as much as it amazes. But if you can get past the book’s babbling, affected prose, there’s a sci-fi/fantasy setting decades ahead of its time. We’re talking a far-future, postapocalyptic world in which the sun has burned out and the remnants of humanity retreat to massive, geothermal-powered pyramids and grow crops in subterranean, hydroponic chambers. Heap on telepaths, spinning disc weapons, posthumans, monsters, and you have an imagined world that retains its wonder nearly a century later.

Now let’s get to the science.

Lord Kelvin Dates the SunThe Night Land is science fiction, and the science Hodgson turned to was the work of 19th century physicist Lord Kelvin (William Thomson). Kelvin formulated the second law of thermodynamics and set up the absolute temperature scale—but he also theorized that the sun’s luminosity was produced by the conversion of gravitational energy into heat. He argued that the sun’s gravitational energy was spun to life by the impact of the primordial meteors that formed it. Based on this, he gave the sun a life expectancy of 30 million years (the current prediction is 10 billion years total).

A Tidal-Locked Earth
As Hodgson’s fiction stems from Kelvin’s theories, The Night Land is a world in which the sun has gone dark, and tidal drag has slowed the Earth’s rotation to a crawl. As explained here, tidal friction is the very real (but small) force that perpetually slows the planet’s rotation. For instance, scientists theorize that, in about 5 billion years, the planet’s rotation could slow enough to result in a 48-hour day.

In The Night Land, Hodgson depicts a world in which tidal friction eventually causes the Earth to experience tidal lock: the same side of the planet always faces the dimming sun while the other side freezes in eternal night. We observe tidal lock every time we stare into the night sky and witness the moon’s synchronous rotation with the Earth. The same side always faces us. Space blogger Ryan Anderson examines the possibilities of a tidal-locked earth here. He does not, however, mention the possibilities of monstrous abhumans ruling the night.

Heat and Energy in a Sunless World
As mentioned above, the last humans of The Night Land live in a massive metal pyramid called The Last Redoubt. The structure depends on geothermal energy (as well as the less scientific “Earth Current”) to heat and power the enclosure and defend it against the horrors of the night.

As Holly Otterbein points out over at Popular Science, such a scheme might actually work if—again, impossibly—the sun were to go dark without changing mass. She points out that Iceland already heats 87 percent of its homes using geothermal energy, and that volcanic heat could sustain us for hundreds of years. Naturally, nuclear power wasn’t in the cards for Hodgson, but that too could serve as an effective means of heating your giant pyramid against the encroaching darkness.

Red Giants and Reality
Based on our current understanding of stars, we suspect our sun will burn through all its fuel in 4-5 billion years and balloon up into a red giant. In the process, it will gobble up the orbits of Mercury, Venus, and Earth. So, if we’re still around by that point, and we haven’t bothered to colonize other worlds, we’re boned.

Last one up, turn out the lights:

Robert Lamb is a senior staff writer at HowStuffWorks.com and co-host of the Stuff to Blow Your Mind podcast and blog. He is also a regular contributor to Discovery News, where he often writes about everything from climate change to video games. Follow him on Twitter @blowthemind.