From an early stage, the plan depended on Epic's payment system being rejected, read an email between Epic executives disclosed in court records. At that point: "The battle begins. It's going to be fun!"

Epic co-founder Mark Rein predicted there was a greater than 50% chance Apple would immediately remove "Fortnite" from its platforms, according to an Epic employee deposition cited in court records. "They may also sue us to make an example." Mr. Rein declined to comment.

While it worked on the technical attack, Epic also planned to cut prices on certain items in the console and PC versions of "Fortnite" by 20% -- essentially creating a reason for players to eschew the mobile alternative offered by Apple.

But first, Epic would go to the front door and ask a favor of Apple and Google: The company wanted permission to run its own competing store and payment system.

In a late June email to Apple CEO Tim Cook, according to court records, Mr. Sweeney sought an exemption from App Store rules. Most important, he wanted to stop paying Apple's 30% fee.

Apple rejected the request in a July 10 letter, laying out many of the same arguments it would make in defending itself against the eventual Epic lawsuit. Epic had other ways to sell its game, Apple's lawyer added, as well as noting Epic collects royalties from games built on its software.

"Yet somehow, you believe Apple has no right to do the same, and want all the benefits Apple and the App Store provide without having to pay a penny," the letter concluded. "Apple cannot bow to that unreasonable demand."

Mr. Sweeney on July 17 responded with another email to Mr. Cook and others calling the response a "self-righteous and self-serving screed." He promised to "continue to pursue this, as we have done in the past to address other injustices in our industry."

Behind the scenes, Epic's Project Liberty team met regularly and devised a way to present their plan to a judge and the public. The team included as many as 200 Epic staffers, outside lawyers and public-relations advisers. It developed an argument that Apple violated antitrust laws with its requirements that all apps offered on its iPhones and iPads go through its App Store and that all purchases of digital content go through the tech giant's in-app purchase system.

It wasn't a unique gripe. Other app makers, including Netflix Inc. and Spotify Technology SA, have also butted heads with Apple on its slice of fees and control. Apple says the walled mobile-software garden it built in 2008 is now responsible for more than a half-trillion dollars in commerce.

Epic's team worried it wouldn't be a sympathetic character in a public fight and that gamers would blame the company if Apple and Google ultimately decided to yank "Fortnite." So it strategized on how to bring in additional companies, including smaller, sympathetic developers, to advocate for its cause, records say. It also studied past Apple responses to major public fights, focusing on its battle with the Federal Bureau of Investigation over demands to create a backdoor into the iPhone of a shooter in a 2015 terrorist attack in San Bernardino, Calif. The controversy subsided when the government found an alternative way into the device.

The Epic team concluded that Apple could be thin skinned when it came to its public image. "Nothing moves Apple to change other than notable consumer pressure," an Epic memo noted.

As August approached, Epic's board of directors was briefed on the project's final pieces in a presentation dubbed "battle plan." By this point, the board was told, Epic had spent time helping form the Coalition for App Fairness, an advocacy group, to support its crusade and it tested the payment system that would eventually be uploaded to Apple's and Google's app stores.

Mr. Sweeney sent emails to Sony, Microsoft and Nintendo alerting them to the upcoming price changes in "Fortnite," a prelude to the "fireworks show."

On Aug. 13, he lighted the fuse. "Epic will no longer adhere to Apple's payment processing restrictions," Mr. Sweeney wrote at about 2 a.m. in an email to Apple. Hours later, Epic flipped the switch on the new payment system and a public-relations campaign to rally gamers to its fight.

Project Liberty was in play.

Apple and Google both booted the game by day's end, springing the second part of Epic's plan: a legal battle.

A trial date hasn't been set in Epic's lawsuit against Google, though the situation is distinct. Devices that run Google's Android operating system can download software from other app marketplaces in addition to the Google Play store. Google has said that Epic violated its app store's policies as well, which are designed to keep it safe for users.

In the months after its lawsuit, Epic pursued complaints with regulators around the world and supported lobbying efforts among statehouses and Congress for changes that would crimp Apple's power. It also released an online video that echoed Apple's famous 1984 ad, a nod to George Orwell's dystopian novel, that framed the computer maker as the underdog against the then-mighty IBM.

This time around, the image of a televised Big Brother was replaced by one of a talking Apple wearing glasses similar to those of Mr. Cook. The call to action at the end read: "Join the fight to stop 2020 from becoming '1984.' "

Write to Tim Higgins at Tim.Higgins@WSJ.com and Sarah E. Needleman at sarah.needleman@wsj.com

Corrections & Amplifications

This article was corrected April 26, 2021 because the last name of Joe Babcock, the former chief financial officer of Epic Games Inc., was misspelled in one instance as Babock in the original version.

(END) Dow Jones Newswires

04-24-21 0014ET