"When the Stars Turn Blue" by riftintime

Summary: Jack Harkness leads a small team of brilliant scientists working secretly underground to create a new technology that could have profound and far-reaching consequences for humanity. But when he receives devastating news and a mysterious stranger enters his life, his concept of reality may be changed forever. Jack/Ianto AU.

Pairing: Jack/Ianto

Rating: NC-17/Adult

Genres: Sci-Fi/Fantasy/Mystery/Romance

Warnings: Explicit sexual situations, adult themes, coarse language, dark themes, violence, character death, romance, angst.

Disclaimer: This story is based on characters created and owned by the BBC, and is loosely based on the movie 'The Thirteenth Floor' copyright Columbia Pictures and the novel 'Simulacron-3' by Daniel F. Galouye. No profit is being made and no copyright or trademark infringement is intended.

Author's Notes: This is an alternate universe story, using the Torchwood characters (plus mentions of a few from Doctor Who), and set in an alien-free world.

For those who have read my previous story, this one is quite different, but I hope you'll enjoy it. Please review and let me know what you think. I greatly appreciate any feedback. Thanks for reading.

Special thanks to my friend and beta Prothrombintime for support, encouragement, suggestions, advice on technical details, and invaluable feedback.


Chapter 1

Jack Harkness stood in front of the tall floor to ceiling windows. He gazed out through the clear glass, looking past his reflection and into the heavy darkness beyond. It was an unusually clear evening; a mere hint of wispy clouds masking a broad expanse of stars. A full moon was large and high in the sky. Its silvery glow danced over the gently moving waters below.

The image of the room behind him was captured in the reflective surface. His friends and colleagues were scattered around the large and elegantly decorated space. The cacophony of their voices registered in his mind, very near, yet sounding muted and distant as they chatted and laughed, celebrating their success. The drinks were flowing, and an abundance of food was spread out across several long tables in the centre of the room, easily enough to feed three times as many people.

The barest hint of a smile briefly played across his lips. Their boss had never been one to do things by halves. It would only be a matter of moments before one of them made their way over and dragged him into the revelry, but in the meantime, he continued to stand alone, tense and silent, as he tried to process the news he'd received earlier that day.

The initial numbness and sense of detachment had soon given way to a raging tumult of emotions. He'd wavered between relief, violent anger, and overwhelming despair. Finally, he had an explanation for his condition, and that knowledge had imbrued him with a strange and unexpected sense of acceptance. But it competed with his anguish that what he'd most feared, and had desperately tried to deny, had indeed turned out to be true. It hadn't escaped him that given the nature of his work, there was a bizarre irony about his dire prognosis.

A familiar voice startled him from his introspection. "Jack?"

Jack pressed his eyes closed for a moment and steeled himself. He turned slightly and met the concerned gaze of his friend. He plastered a tight smile across his features. "Hey, Doc," he said, wondering if his attempt at cheer sounded as false to the other man's ears as it did to his own.

Professor John Smith, or simply 'The Doctor' as he was known to his friends and acquaintances, was Jack's closest friend, mentor, and the driving force behind their efforts. He had been responsible for bringing together their small and eclectic team of brilliant scientific minds. John was nothing short of a genius, and Jack had always been a little in awe of the older man. At forty years old, John was senior to Jack by only five years, yet they looked of a similar age.

John was an unusual and unashamedly eccentric man, and certainly not known for his conformity. Jack had never known anyone else even remotely like him. There was a youthful exuberance about John that was infectious. He commanded deep respect and admiration of those around him with ease, and there was absolutely nothing disingenuous in his nature. If he seemed a little arrogant or pretentious on occasion, it was only because of his overriding passion for their work, and his remarkable, unwavering intellect.

He was slightly taller than Jack, having about an inch over Jack's six foot stature, but John was thin and lean – good-looking in his own unique way, with a narrow angular face, smooth, youthful skin and a thick mop of unruly brown hair, complemented by inquisitive brown eyes and long, wide sideburns. His appearance was a stark contrast to Jack's solid build and more obvious appeal. Jack was classically handsome, with the type of dashing good looks that people tended to swoon over. Of course he was entirely aware of that, and he used it to his advantage whenever the need occurred.

John looked at him studiously for a moment. "You got the results today," he said quietly without preamble. He reached his hand up and rested it on Jack's shoulder. "How bad is it?"

Jack turned away, looking back out across the rippling water as he resisted the urge to pull back and establish some distance between them. He wasn't ready for the conversation.

Taking a moment, he breathed out deeply. "They call it a GBM," he replied evenly.

John's hand tensed on his shoulder, and there was silence for a long moment. Jack held himself still as he waited for John to respond. "Glioblastoma multiforme," John translated, his voice neutral but catching as the last syllable left his lips.

"Yup," Jack agreed, his heart constricting at the clinical description. "A nice way of saying malignant brain tumour," he added, forcing out the words, but managing to keep his voice low and steady.

He paused, clenching his fists against his sides for a moment, the words reminding him that he was walking around literally with a time-bomb in his skull. "Incurable and fatal."

John squeezed his hand on Jack's shoulder and met Jack's eyes in their reflections before looking out into the darkness. He lowered his hand. "How long?" he asked quietly.

Jack shrugged. "Twelve months if I'm lucky. That's with aggressive treatment. Maybe five or six months without."

"I'm sorry, Jack. I'm so sorry." John's voice was sincere and filled with sorrow.

Jack turned and searched John's features. John looked back at him sadly, his eyes infused with pain. John's subdued reaction and apparent acceptance had surprised him. "You knew, didn't you?"

John shook his head slightly. "No. I suspected, but I wasn't sure. Your symptoms – headaches and morning emesis, occasional blackouts, memory loss and paranoia… it all seemed to fit, but I'm not an expert." He paused and looked uncharacteristically apologetic. "I didn't want to worry you, so I didn't say anything. And I knew you didn't want Owen to know… I hoped I was wrong."

Jack let out a wry laugh. "You're never wrong, Doc."

"I hoped I was this time," John replied solemnly.

Jack inwardly cringed. Part of him hadn't wanted to tell anyone, but someone needed to know the truth about his condition. John had the right to know, and he would have figured it out soon enough anyway. There really hadn't been a choice, but at least he knew that the older man wouldn't pity him. He sighed deeply. "Yeah. Just this once, I wish you had been too."

"What are you going to do?" John asked gently.

"Nothing," Jack replied. "I want to keep working, doing something worthwhile… for as long as I've got."

"You could leave," John suggested. "Make the most of the time. Do some travelling?"

"Alone?" Jack retorted more sharply than he'd intended. He shook his head. "Everyone and everything that matters to me is right here. I've got nowhere else to go. I'm leaving in the morning for the cottage like I planned… I need time to think and try to come to terms with this… but I'll be back in two weeks."

John nodded. He didn't argue, and Jack was grateful for that. "That's fine, Jack. Take whatever time you need."

"Two weeks," Jack reiterated firmly. "Then I'll be back."

"If there's anything…" John began.

"I know," Jack said, cutting him off, not wanting to hear the words. "Thanks, John," he added, hoping his uncharacteristic use of the other man's actual name would convey his need to end the discussion.

They stood together silently for a minute or so. Then Jack turned and clapped his friend on the back. He needed to push everything aside for at least the next hour or two, and try to enjoy their celebration. "Buy me a drink?"

John turned his head and looked at Jack with confusion. "I'm buying all the drinks tonight, Jack. And all the food."

Jack grinned despite himself. "I know. Just humour me. The larger and stronger, the better."

"Come on, then," the older man said with a forced smile, and Jack felt relieved that John seemed to understand.

They made their way over to the bar at the far end of the room, smiling at their colleagues on the way. Owen Harper, their neurology and biogenetics expert, was busy loading up a plate at the buffet while their software genius, Toshiko Sato, looked on with amusement, a glass of white wine held delicately in her slim hand. Owen and Tosh were Jack's two closest friends after John.

Owen, formerly a neurosurgery resident in London, was cynical and somewhat scruffy, but a vital member of their team. He'd become disillusioned with practicing medicine after the tragic loss of his fiancée in a car accident several years ago. Lost in his grief, John had brought him to Cardiff and given him a new start in life.

Similar to Owen, Toshiko had been saved by John after getting into serious trouble when she'd been blackmailed into stealing classified government property. Jack had always wondered how John had managed to secure Toshiko's release, but his friend had remained unusually tight-lipped on the subject. Tosh had a level of intelligence that rivalled John's, and she seemed to have an innate understanding of all manner of technology and electronics. Jack was constantly amazed by her prowess, but he also respected her gentle, unassuming nature and kindness. He'd always felt protective of her. She and Owen had become close recently, and he hoped that something might come of it. They were both lonely, and Jack thought that Tosh could be a positive and calming influence on the often brash and outspoken Londoner.

The rest of the team included Mike Lyndon, Beth Halloran and Alex Hopkins, all three of whom were software specialists with strong backgrounds in artificial intelligence, similar to Jack himself. There was also Suzie Costello, a computer hardware specialist, Charlie Gaskell, who specialised in database implementation and software optimisation, and the youngest member of their team, Tommy Blockless, a talented mathematician who was especially skilled in developing complex software algorithms.

They were an odd group of people, all a bit lost in their own way, but united by John in a common goal. John had brought purpose to their lives, and his unerring faith in each of them challenged them to be the best they could be in their respective fields.

John's mantra was 'the twenty-first century is when everything changes.' Jack had always secretly thought that the words were rather cliché, like something from an over-the-top television show where aliens threatened to take over the world every week. Nonetheless, he had nothing but admiration and respect for John's conviction and determination.

They reached the bar, and John chatted amiably to the bartender for a moment before ordering a double bourbon for Jack and some sort of garish looking concoction for himself. It was a departure from his favoured banana daiquiri, Jack noted absently, but he decided not to press the subject. John sometimes had these exploratory phases where he would try new things with an endearingly child-like glee.

Collecting their drinks, they moved to the nearest table and sat down. Jack clinked his glass against the other man's with a mumbled, "Cheers."

He tossed back half of his drink, relishing the burn as it hit the back of his throat. He decided that he really needed to get blindingly drunk at the soonest possible opportunity. John stared at him worriedly, his hand wrapped around his glass, not bringing it to his lips.

Jack shook his head sadly. "Please, Doc. Don't… don't look at me like that. I'm not going to be able to deal with this if you're going to be all weird and awkward around me."

John seemed to mentally shake himself. "Of course. Sorry."

He smiled apologetically at Jack and then took a sip of his drink, turning to look across at the others. Jack followed John's gaze, feeling a melancholy surge of pride and affection for his friends. They were the closest thing he had to a family. "You did it," he commented a moment later. "I had my doubts at times, but I knew that if anyone could, it was you."

"We did it, Jack," John admonished lightly, looking back at his friend. "I couldn't have done it without you… without all of you."

Jack nodded thoughtfully. When John had first approached him a little over six years ago, Jack had thought his proposal was merely a delusional fantasy – the stuff of science-fiction movies and novels. John's concept had been to create a virtual world; a simulated reality that would be entirely indistinguishable from the real world. He'd further proposed that people would be able to transfer their consciousness into the simulation and inhabit artificial characters, allowing the user to experience the world from their perspective. Jack had initially thought that it all sounded completely absurd.

At the time, the required computer technology had seemed decades away. The necessary processing power and storage capacity alone had been unimaginable. But Moore's Law had prevailed, exactly as John had predicted, and within five years technology had evolved sufficiently to meet their requirements. John's premise wasn't simply to create an artificial environment inhabited by characters that mimicked human behaviour. It was much more profound and far-reaching. His goal was to artificially replicate the human consciousness. These virtual souls would be fully cognitive, living within their simulated world, and wholly unaware that it wasn't real.

Jack had maintained a healthy degree of scepticism for a long time, nonetheless he'd been unable to resist John's offer to join him. If nothing else, it had been far more interesting than any of the other prospects he'd had at the time. John had been passionately adamant, and Jack had quickly realised that this was something he simply had to be a part of. Ever since, he'd been at John's side, steadily helping him to realise his dream, and managing the day-to-day operations of their endeavour. John was their leader and captain, but Jack looked after the numerous practicalities, with which John readily admitted he was a bit useless.

Their work was clandestine, taking place deep underground rainy Cardiff, and privately funded by an unknown benefactor… unknown to everyone except John. Jack had his suspicions, although he had never voiced them, not wanting to put his friend in the difficult position of having to refute or acknowledge his claim. But one man stood out in Jack's mind as having both the means and the desire to bankroll their efforts – Henry Parker, a self-made billionaire, now an elderly man, and known to have failing health. If his suspicion was correct, Jack assumed that Parker would have a front-row seat to experience the simulation for himself. Their technology, once proven, would allow someone like Henry Parker to once again experience the world as a young man in the prime of his life.

And now, finally, they were ready to begin trialling the system. John had insisted on hosting a celebration of their milestone at the St. David's Hotel. Everyone was in good spirits, buoyed with anticipation and excitement, yet tempered with a degree of trepidation. In time, their work could have a profound effect on the world, and the moral issues were not lost on Jack.

John was an idealist, relentlessly pursuing advancement, but Jack had always maintained a more pragmatic view. If their efforts were successful, eventually the technology would make its way out into the world, and inevitably fall into the hands of people with far less altruistic motives. He'd need to make sure there was someone to help John to keep an eye on the bigger picture after he was gone.

"I want to be the first test subject," Jack said suddenly as he took another swig from his glass.

John turned to look at him, his eyes going wide. He shook his head. "No, Jack. Absolutely not. It's too dangerous."

"I've got nothing to lose," Jack argued. "If my brain gets fried…" He shrugged. "Well, it can't be any worse than the alternative. And someone has to be the first to use it." He paused and downed the rest of his drink. "Besides, Owen's confident, and we've done as much testing as we can without performing a live cortical transfer."

John looked like he was about to protest further, but Jack pushed on. "I'm doing this, Doc. If something goes wrong, you'll be able to fix it and make it safer for the next person."

Jack felt like he wanted to squirm under John's piercing, soul-searching stare, but he resolutely held the other man's gaze. He was confident that John would concede to his infallible logic. He didn't want to waste the time he had left. This was something he needed to do.

"All right, Jack," John allowed, giving him a reluctant nod. "If you're sure this is what you want to do, I won't stop you."

Jack smiled grimly. "It is. Thanks, Doc."

They both stood and moved over to join their companions. John quickly launched into an enthusiastic discussion with Toshiko while Jack looked on fondly.

It was the last time that Jack would ever see John Smith alive.