If you invested in video game stocks this year, chances are good that you earned a solid return. Just about every company engaged in producing either the hardware or the software that caters to the industry beat the broader market by a wide margin in 2017.

A notable exception was GameStop, which badly underperformed as investors overlooked its steady sales and profit trends to focus on worries that the retailer's exposure to disruption as demand shifts to digital sales channels.

Two young men celebrate while playing a video game.

Image source: Getty Images.

Barring that slump, 2017 was an epic year for video game stocks, and here are the three that generated the biggest returns for investors.

NVIDIA -- up 80% in 2017

In 1999, NVIDIA (NVDA -2.68%) created the graphics processing unit that helped push video game graphics to a new level. And the company continues to cash in on its industry leadership position. Sure, emerging business segments such as artificial intelligence and autonomous driving have caught investors' imaginations lately, but NVIDIA has relied on its core gaming business to deliver the most growth in 2017.

An engineer works on a chip.

Image source: Getty Images.

Third-quarter revenue in the GPU segment jumped 31% as customers snapped up its latest line of GeForce gaming platforms. The gaming business has roughly doubled over the past two years, rising to $1.6 billion last quarter from $761 million in the third quarter of fiscal 2016.

The demands placed on video game graphics systems are rising because of esports and the increased adoption of virtual reality. That means NVIDIA will need to continue pushing the industry further if it wants to maintain its leading market position. With $13 billion directed toward research and development since its inception -- and $1.5 billion spent on that category in just the last year -- the company is dedicated to achieving that result.

Nintendo -- up 86% in 2017

Nintendo (NTDOY -1.31%) doesn't always succeed with its innovative console gaming device releases, but when it does, the results tend to be dramatic. This year's Switch, powered by NVIDIA's Tegra chip, is a good example. The console is currently outpacing sales of the Wii U by a wide margin even though the product was launched in early March rather than during the holiday shopping season -- as in the case of both the Wii U and the original Wii. At this rate, the Switch might even challenge the Wii, which was a blockbuster hit for Nintendo, for sales within its first year from release.

The Switch joins a popular new installment in the 3DS franchise in helping push hardware sales higher, even as the gaming giant pursues its strategy of using intellectual property such as Super Mario and Animal Crossing to attack the mobile gaming market. Revenue is up sharply over the past six months, but executives see a long runway for growth ahead as supply rises to meet demand for the Switch console. Nintendo's latest forecast calls for sales to double in the fiscal year that ends in March as operating profit rises by over 300%.

Take-Two Interactive -- Up 117% in 2017

Take-Two Interactive (TTWO -2.69%), which trails both Activision Blizzard and Electronic Arts in its sales footprint, beat those two publishers in stock price gains this year. The company achieved that unlikely result through a string of surprisingly strong earnings results. In just the latest example, Take-Two logged a 52% spike in digitally delivered revenue as its sports titles, especially NBA 2K18, paired up with the blockbuster Grand Theft Auto franchise to deliver 20% higher bookings last quarter. And, as it has for EA and Activision, the tilt toward digital sales is pushing Take-Two's profitability up to new highs.

A fresh Grand Theft Auto release is likely in the next year or so, given that it's been four years since the last major installment was launched. Take-Two's relatively small portfolio of franchises means its results are much more volatile than EA's or Activision's. That difference sometimes translates into significant stock price outperformance, as it did in 2017.

These market-beating gains have raised investor expectations for Take Two, Nintendo, and NVIDIA. But as long as the companies keep up their streak of delivering surprisingly strong sales growth, the stocks should continue rising.