When you create a game, you need to constantly weigh the features and performance. When adding graphics effects and features to the game, the GPU is the most prominent bottleneck, but the game is also subject to CPU limitations.
In addition to the normal CPU load from the game logic, physical and artificial intelligence (AI) computing and graphics that give the immersive experience of the game are CPU-intensive tasks, and in the course of game development, the GPU and CPU are often alternately creating bottlenecks.
Modern microprocessors have powerful single-core performance, but if you can take advantage of multiple CPU cores, the game will be able to achieve better overall performance. To take full advantage of the full CPU compute capabilities, applications run the fastest when using multi-threading, which ensures that the code runs concurrently on all CPU cores.
Video Address: Https://dn-moderncode.qbox.me/game/why-threading-matters-for-ashes-of-the-singularity.mp4
More recently, Oxide games and Stardock Entertainment have developed a real-time strategy (RTS) game, "The Singularity of Ashes," which is shown in this video. You can see how this game provides a more superior gaming experience and performance on systems with more CPU cores.
The strange point of Ashes
Figure 1: "Singularity Ashes" * shows how highly threaded games get higher frame rates on systems with more CPU cores.
Oxide created a new engine and adopted the direct3d* 12, so that "singularity Ashes" can take advantage of all the cores of the processor. The game runs well on common game systems and works better on systems with more cores. You can use the same technology in your game to achieve optimal CPU performance.
The direct3d* 12 eliminates bottlenecks and improves performance.
To get the fastest frame rate in "Singularity Ashes", the Oxide team used the direct3d* 12 version. The earlier version of Direct3D ran well, but there were several bottlenecks, and in version 12th the API made several changes that eliminated the bottleneck that affected the game speed. These changes include the simplification of multiple objects into a pipeline state object, and a smaller hardware abstraction layer that minimizes API overhead and removes resource barriers from the graphics driver.
Direct3D 11 can create commands from multiple threads. However, because older versions of Direct3D require a lot of serialization, the game does not get much speedup from multi-threading. This underlying limitation was completely eliminated by adjusting Api,direct3d 12. Now that the game doesn't need serialization, you can use multiple threads to fill out a list of commands, which significantly improves overall threading performance.
By making the most of these API changes, the singularity Ashes can be run on Direct3D 12.
Nitrous* engine makes a game possible
Oxide wants to create a real-time strategy game that is more complex than previous games, supports larger armies, has more units and a wider map. To create the next generation of real-time strategy games, the development team agreed that a new game engine was needed and that the existing game engine could not support the number of units and map sizes they expected. In order to successfully develop the "singularity of Ashes", they start from scratch to build the Nitrous engine.
Any new engine must first provide high-performance rendering, in order to achieve this goal, they have fully debugged the Nitrous engine to support the latest version of the graphics API, multiple GPUs and asynchronous computing.
The game provides each player with support for multiple units, as well as a large map. Simulating the physical structure of many in-game objects within the vast terrain generates a huge CPU load. More importantly, AI workloads are huge because of the need to emulate the behavior of each unit. The large number of units supported by the game also triggered a burst feature. With the increase in the number of units, players directly manage the difficulty of the unit is increasing. Oxide has created a layered approach to artificial intelligence that enables the military to collaborate rationally to take advantage of the relative advantages of each unit while paying attention to their relative weaknesses.
To achieve this, Nitrous the work into smaller tasks and implements threading of the engine. The task system has a high degree of flexibility, and small tasks can be dispersed across as many CPU cores as possible. Because most Intel? Does the processor contain Intel? Hyper-Threading (HT) technology, Oxide carefully debug the speed-oriented Task Scheduler, the scheduler in the search between the task of local. Tasks that share cached data are dispatched on different logical cores in the same physical CPU core, which leads to optimal performance and task throughput.
Regardless of the approach, there is always a bottleneck in the process of increasing game complexity. When developing a game, you need to consider the expected relative CPU and GPU load. Learn how the game will work when the GPU and CPU become bottlenecks, respectively.
Intel? Cool core? Processor for gaming
Intel? Cool core? The processor can make your game shine like the singularity of ashes. During the design and optimization of the game, you should aim at the midrange processor and provide the ability to scale to the highest-end processing.
With this technology, "singularity Ashes" in the first-class Intel? Cool core? The I7-6950X Processor Extreme Edition works well, with 10 physical CPU cores and a high-capacity cache for optimal overall performance. After the work is broken down into tasks, with the powerful GPU, the game's frame rate increases with the number of CPU cores. On the same system with different CPU cores, the frame rate increases steadily to a maximum of 10 physical cores.
The game also includes large maps. Due to the large number of players and units, a fully equipped group of players will create a huge artificial intelligence burden. After careful debugging, "singularity Ashes" with the Task Scheduler, automatically assign the work to all the core, only in the CPU core (six or more) a large number of systems to display the map. This is a good way to emulate: if you want to selectively enable features, you can use functions such as getsysteminfo () to detect the number of cores in your system.
Scalable effects make the game better
Although the game focuses on how to raise the frame rate on a system with a large number of cores, it can still surprise players with a small amount of CPU space. As the number of cores increases, singularity Ashes automatically enables advanced particle effects in some units and also enables temporal motion blur.
Why threads are critical in the ashes of Singularity