Video games are a big business. Total revenue for the U.S. video game industry reached $23.5 billion last year, a 5 percent increase from 2014. Behind every video game are programmers who help develop the product. Although programming languages vary by game, a few are the most popular. Here’s a look at the languages powering video game development.
In May 2016, German game-development company Crytek made a decision to upload the source code of their game engine CryEngine V to Github. The engine is written in C++ and has immediately attracted attention of both the open-source developer community and the team of developers of PVS-Studio static analyzer who regularly scan the code of open-source projects to estimate its quality. A lot of great games were created by a number of video-game development studios using various versions of CryEngine, and now the engine has become available to even more developers. This article gives an overview of errors found in the project by PVS-Studio static analyzer.
The fragment is taken from the Unreal Engine 4 project. Ineffective code is detected by the following diagnostic: V803 Decreased performance. In case ‘itr’ is iterator it’s more effective to use prefix form of increment. Replace iterator++ with ++iterator.
The fragment is taken from the game ‘Wolf‘. The code contains an error that analyzer diagnoses in the following way: V511 The sizeof() operator returns size of the pointer, and not of the array, in ‘sizeof (src)’ expression.
Open-source engines in C++ are much more common than those written in C#. But there are exceptions: Xenko is one such engine, open-source and written in C#. In this article, you will learn about interesting issues we managed to find in this project.