A Dallas video-game developer whose company was bought by Facebook has filed a federal lawsuit against his former employer, saying it owes him more than $22.5 million and refuses to pay because of "sour grapes."

John Carmack, the chief technology officer of Facebook-owned Oculus, sued ZeniMax Media on Tuesday, saying it still owes him money from buying the video game studio that he founded. Maryland-based ZeniMax bought id Software, a Richardson-based video game studio, in 2009. Carmack left the company in 2013 to become Oculus' CTO.

John Carmack, CTO of Oculus

The lawsuit says ZeniMax agreed to pay $150 million for the purchase. Now, nearly eight years after the sale, it says ZeniMax refuses to pay the final installment of cash it owes Carmack or let him convert it into shares of stock.

At the time of the sale, the lawsuit says Carmack was the majority shareholder of id Software and received a convertible promissory note valued at more than $45.1 million. He converted half of that into shares of ZeniMax stock, which he received.

The lawsuit asks the court to compel ZeniMax to pay the other half that it owes Carmack, according to the terms of the sale. "Sour grapes is not an affirmative defense to breach of contract," it says.

A spokeswoman for ZeniMax sent an email to The Dallas Morning News calling the claims "completely without merit" and noting that a court had rejected a previous claim by Carmack that ZeniMax had violated his employment agreement.

"Apparently lacking in remorse, and disregarding the evidence of his many faithless acts and violations of law, Mr. Carmack has decided to try again," the statement said.

Carmack's attorney Richard Smith declined to comment.

The lawsuit comes on the heels of another high-profile federal lawsuit involving the same parties. ZeniMax sued Facebook -- which owns Oculus -- claiming that it owned the technology behind the Oculus Rift, a ground-breaking virtual reality headset. During the lawsuit, it argued that Carmack developed the underpinnings of the virtual reality technology while working for id Software. Meanwhile, Carmack unsuccessfully sought damages in a counterclaim that alleged ZeniMax violated his employment agreement.

The lawsuit brought Facebook CEO Mark Zuckerberg to Dallas to testify. In February, a Dallas jury awarded ZeniMax $500 million. An Oculus spokeswoman said the company will file an appeal.

The lawsuit filed by Carmack says that ZeniMax won't pay the remaining sum for id Software because of the intellectual property lawsuit -- but it notes that the jury did not find Carmack liable for misappropriation of trade secrets or copyright infringement.

"ZeniMax's invocation of the same alleged acts that it just went to trial on is an exercise in bad faith and distraction, not a legitimate basis to avoid paying the money it owes from its purchase of id Software," the lawsuit says.

Read the lawsuit:

{"raw":"No embeds for private docs","providerType":"scribd","providerLink":"http://www.scribd.com/services/oembed","embedType":null}

{"raw":"No embeds for private docs","providerType":"scribd","providerLink":"http://www.scribd.com/services/oembed","embedType":null}