C++: how to make the most out of this powerful language
Despite its age and complexities, C++ continues to be one of the top programming languages in the world.
The 2021 TIOBE Index rankings, a well known and widely used tool to rank the popularity of different programming languages in the software developer community, highlighted once more how C++ remains one of the world’s top programming languages. The May 2021 ranking, for example, showed C++ in a comfortable 4th position overall and second in growth, among the top twenty programming languages.
Even if it traces its roots all the way back to the early 80s, several iterations have kept C++ as a current, powerful and versatile language. At the moment of writing these lines, C++ 20, introduced in 2020 is its latest standard version, with C++ 23 already in the cards.
Although this longevity and capacity for reinvention of C++ are remarkable in themselves, this shouldn’t come as a surprise to anyone in the business of creating visually-rich software applications requiring lots of computational power.
Interestingly, the latter may include some everyday applications that most people use without giving much thought to the complex processes taking place behind the scenes. You could argue this is part of the beauty of C++, crunching complex computational problems in such an elegant way that it becomes unnoticeable to the front end user.
Take slot machines, for example, behind the bells and whistles and the varied attention-catching visual effects used to draw the attention of players there is a good deal of technical sophistication and a large amount of computational power involved.
The multiple combinations of symbols changing very quickly, accompanied by light and sound effects and, at times, displayed alongside several small size videos playing simultaneously, require solving a complex graphics optimization problem.
In the case of slot machines, as with other applications that rely on physical terminals as access points, C++ is one of the programming languages of choice because it is a suitability for tasks that would typically be in the domain of low-level programming. C++ is “close to the hardware”, as some programmers say, because it makes it possible to execute code on the hardware without any intermediates. On the other hand, it can be considered a high-level programming language because it provides a convenient level of abstraction that makes it possible to implement almost any algorithm without having to dive into the details of hardware implementation.
In our particular example, of slot or gaming machines, the terminals are connected to a network, but the games and other key elements of the system are installed locally in the machine (in great part to prevent security vulnerabilities) and most functions may be executed locally as well. C++ is a good tool to optimize these functions.
The C++ Standard Library is a useful and comprehensive repository of code (including classes, functions, macros, templates and other constructs used regularly in C++ programming) and, yet, it remains a demanding language that is relatively difficult to master.
1PT Group development family
At 1PT we have devoted considerable attention to C++, since it’s a keystone of many of the projects we do for our customers. This means that, in addition, to having built a considerable amount of expertise, we have also developed our own resources codebase and singular approach to design and implement C++ projects from the ground up.
For example, we believe complexity doesn’t have to mean a slower or more sluggish pace for your C++ projects. We are ready to share our vision at the implementation and discuss details to make the final product more stable and effective to use.
First of all, we build upon solid foundations: we count on our own code library, created a few years ago and expanded since then. Developers can clunk together pre-existing “bricks” of code and even use them in more than one project, just as you would do with pieces in a lego set (an intangible one in this case!).
But also fundamental is our integrated approach, through which programmers work closely together with our art, musician, math and, later, testing teams.
From the very moment customers describe their desired game design (which includes the art, sounds, gameplay and math aspects), all team members get involved in the discussion. This way it is possible to organize in parallel the work of almost all teams involved in the project and reduces considerably the amount of potential misunderstandings, bottlenecks and related waiting times.
This high throughput, which extends also to the later testing stage, is only possible because of the availability, at 1PT, of professionals highly experienced and trained in C++.