While imprisoned in Balduq, Adol is cursed and becomes a Monstrum. With his newfound powers, he must stop the Grimwald Nox from consuming the city.
With Ys IX finally releasing on PC, we've reached the most critical point of one of the most challenging porting projects we have undertaken so far. Some of these challenges were unavoidable, while others were of our own making, but we believe we've overcome the vast majority of them and are ready to provide a great version of the game. In this article we'd like to go into a bit of detail on some of [b]PC-specific features[/b] and the [b]optimization work[/b] which went into this version of the game.
[h1]Feature Overview[/h1]
Some of us here at PH3 are PC gaming enthusiasts. While this is hopefully a good thing for everyone who plays our ports, it also means that we frequently create substantial workloads for ourselves by introducing features that weren't strictly necessary -- and that is certainly the case for Ys IX.
[h3]Full Mouse/Keyboard Support[/h3]
In porting Ys IX to PC, we implemented full mouse/keyboard support. This includes not just the basics of controlling the game (with [b]raw mouse input[/b] for camera control!), but also rebinding of all actions with up to [b]two bindings each[/b], [b]pointer controls[/b] in all menus, [b]mouse wheel scrolling[/b] where appropriate, and [b]adaptive prompts[/b] depending on your preferred input device and binding.
[img]{STEAM_CLAN_IMAGE}/38138293/eabf891ddc4be65418fb86d025bd37932712b7d8.png[/img]
These might sound like trivial changes, but in a game with a substantial amount of custom UI that was only ever designed for a controller, they are more laborious than you might think.
[h3]Support for High Frame Rates[/h3]
Ys IX was originally designed for 60 FPS, but in an action game having the possibility to reach higher framerates is always desirable, especially for those with a high-end PC. Our beta testers helped us find all the large and small ways in which the game could break when going beyond 60 FPS, and step by step we managed to make everything work at up to[b] 144 FPS [/b]with full support.
[h3]Ultrawide Aspect Ratio[/h3]
Many console games are built with the assumption that 16:9 is the only aspect ratio which needs to be supported, and going beyond it can introduce all manner of issues, especially related to UI but also with other rendering such as special effects. As such, fully supporting wider aspect ratios, including UI, in such games is much more than just a small hack, but we committed to this for Ys IX and hope you'll love the result.
[img]{STEAM_CLAN_IMAGE}/38138293/43fc7c37dffecf6b39f64347444e91571a782911.jpg[/img]
[h3]Other Features and Options[/h3]
Here is a list of additional features and options added to the PC version:
[list]
[*][b]Arbitrary resolution support[/b] (tested up to 8k)
[*]Camera [b]field of view[/b] adjustment setting
[*]General [b]Sampling Rate[/b] option (supports sub-sampling for low-end systems and supersampling for high-end systems)
[*][b]Draw distance[/b] and [b]Foliage Density[/b] settings to go beyond console on the high-end or gain extra performance on the low end
[*][b]Shadow Filtering[/b] (including PCSS) and [b]Shadow Resolution[/b] options
[*]Various individual [b]Postprocessing[/b] options, including HBAO+ ambient occlusion
[*]Color blindness accessibility filters
[/list]
[h1]Performance Optimization[/h1]
With the initial state -- fundamentally improved since -- of Ys VIII on PC still in mind, performance was a key concern when bringing Ys IX to PC. This is doubly important as Ys IX is actually an inherently far more challenging game to run than its predecessor, as the latter was still designed to also work on the PlayStation Vita.
By the time we were ready to ship an initial version of Ys IX to our PC beta testers, we had already improved performance by around a factor of 2 compared to the very first version on PC, by fixing various of the more obvious bottlenecks. We labeled this initial closed beta version [b]0.9.0[/b].
[img]{STEAM_CLAN_IMAGE}/38138293/844672167a7b666c339705de7fe73ef42f0de369.png[/img]
But still, reaching roughly 68 FPS in the CPU limit on my development PC (Intel 9900k) seemed quite lacking, even taking into account the increased draw distance compared to console and the fact that this measurement was taken in the most challenging location in the game from a performance perspective.
This started a deep investigation of the game's performance characteristics, and improvements and sometimes outright rewrites of several aspects of it. Before we go into a bit more detail for each version, I'd like to note that all of these are [b]true optimizations[/b]: the output and behaviour of the game remains exactly the same.
[list]
[*]In [b]0.9.1[/b] we introduced various [b]parallelization and asynchronous execution[/b] features to optimize the DX11 drawing process. [url=https://developer.nvidia.com/nsight-systems]Nsight systems[/url] was a really invaluable tool for this purpose, since it provides insight into the behaviour of each thread at each point in a frame. While this parallelization provided a very substantial performance improvement, it actually slightly increased frametime instability as well.
[*]Version [b]0.9.2[/b] re-implemented the way in which the engine deals with [b]sampler states[/b], pre-generating them and using this set of pre-generated samplers rather than re-generating new ones on demand during each frame, as well as a few more minor optimizations.
[*]When comparing FPS, version [b]0.9.3[/b] doesn't seem like too big a step, but it included the replacement of the game's [b]memory allocator[/b] with the excellent [url=https://github.com/mjansson/rpmalloc][b]rpmalloc[/b][/url], which also lead to a more consistent performance profile and decreased loading times.
[*]In version [b]0.9.4[/b] we completely reimplement [b]D3D11 buffer handling[/b] for both dynamic geometry and instancing-related memory buffers. Not only did this significantly improve performance, it did so while allowing us to get rid of one of the threads introduced in the earlier parallelization.
[*]Finally, in [b]0.9.5[/b] we reduced the latency of the graphics pipeline and resolved some clipping issues, getting rid of a few unnecessary drawing operations. No changes which could be expected to affect performance were made after this point, which is also confirmed by the benchmark results.
[/list]
[h3]Video Comparison and Performance in Special Situations[/h3]
This FPS comparison alone does not tell the whole story of course. The difference in stability can also be substantial, as illustrated in these videos of [url=https://www.youtube.com/watch?v=wIcmZwsukw8]version 0.9.0[/url] and [url=https://www.youtube.com/watch?v=juzQQY0lnXQ]version 0.9.3[/url].
[img]{STEAM_CLAN_IMAGE}/38138293/6885d783a29a8051a4604ff7e11ebba41e046ebf.png[/img]
Beyond that, there are some particular situations which show an even more substantial improvement, such as the infamous "[i]black fish fog[/i]" incident -- pointed out by one of our beta testers above -- which prompted the investigation and ultimate replacement of the D3D11 buffer handling infrastructure.
[h3]Limitations and Expectations[/h3]
After reading the above, you might be tempted to think that Ys IX is now a masterclass in performance, and that everyone will be able to run it at maximum settings without any issues. [i]That is decidedly not the case[/i]. The game still has substantial GPU performance requirements, and several of the settings we introduced exact a very severe performance toll -- above all the general supersampling option.
But even with those options disabled or scaled back, and all the performance optimization discussed above, it is still a game which is [b]inherently substantially more difficult to run well than Ys VIII[/b]. However, we did introduce some options that should make it possible for those on lower-end systems to have a smooth experience, including the possibility to fully disable dynamic shadowing, reduce the sampling rate of the 3D rendering, decrease the draw distance, and reduce the density of foliage.
[h1]Conclusion[/h1]
This port would not have been possible without the fantastic work of our indefatigable beta testers, the excellent contributions of my fellow developers at PH3, and the support of NISA. Hopefully it will be an enjoyable experience for you.
- Peter "Durante" Thoman, CTO, PH3