Suspicious formattingContinue reading
If you are a software developer working in the video game industry and wondering what else you could do to improve the quality of your product or make the development process easier and you don’t use static analysis – it’s just the right time to start doing so. You doubt that? OK, I’ll try to convince you. And if you are just looking to see what coding mistakes are common with video-game and game-engine developers, then you’re, again, at the right place: I have picked the most interesting ones for you.
How do you think, which of existing programs can be called the greatest? Can you say about one of your programs that it is cooler than the others? There is an opinion which is not unreasonable that such program was written by David Horn in 1983: “1kb chess on the ZX81”.
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.