The Facebook-owned company Oculus has been ordered to pay half a billion dollars to the games company ZeniMax after a jury determined that the Oculus CEO, Palmer Luckey, failed to comply with a non-disclosure agreement.

ZeniMax sued the virtual reality startup in May 2014, months after it was acquired by Facebook. The game maker alleged Oculus had improperly used code from ZeniMax to build it’s Rift VR headset.

ZeniMax is the parent company of ID Software, maker of the Doom and Quake games, whose co-founder John Carmack is now the chief technology officer of Oculus. Luckey exchanged emails with Carmack, who was still at ID Software, when he was developing a prototype of the company’s flagship headset.

Oculus plans to appeal the decision and said that the company was committed to the “long-term success of VR”.

The news came as Facebook announced a 51% jump in its fourth-quarter revenue, driven by its mobile advertising business, which accounted for 84% of revenue. Bad publicity over fake news failed to leave any mark on the quarter, which ended 31 December. Revenues rose to $8.81bn and Facebook’s quarterly profit more than doubled to $3.57bn, from $1.56bn a year earlier. Some 1.86 billion people were active on Facebook at the end of December, up 17% from a year earlier.

In short, Facebook can afford the $500m.

During closing arguments, ZeniMax’s attorney called for a much larger award – $2bn in compensation and $2bn in damages. Oculus’s attorney, Beth Wilkinson, argued that the lawsuit was driven by jealousy and anger, not facts.

During the three-week trial, Facebook’s chief executive, Mark Zuckerberg, testified, characterizing the plaintiffs as opportunists.

“It’s pretty common when you announce a big deal that people just come out of the woodwork and claim they own some part of the deal,” he said.

The case was tried in a district court in the north district of Texas. Of the $500m, Luckey will have to pay $50m in the lawsuit, while the former Oculus CEO Brendan Iribe has been ordered to pay $150m – both for false designation. The company must also pay $200m for non-disclosure agreement (NDA) violation, $50m for copyright infringement and $50m for false designation. The jury decided that Oculus didn’t steal trade secrets, as alleged by ZeniMax.

“The heart of this case was about whether Oculus stole ZeniMax’s trade secrets, and the jury found decisively in our favor,” an Oculus spokeswoman said in a statement.

“We’re obviously disappointed by a few other aspects of today’s verdict, but we are undeterred. Oculus products are built with Oculus technology. Our commitment to the long-term success of VR remains the same, and the entire team will continue the work they’ve done since day one – developing VR technology that will transform the way people interact and communicate. We look forward to filing our appeal and eventually putting this litigation behind us.”