钢铁雄心4开发日志 | 9/13 技术相关内容

牧游社 牧有汉化翻译
Developer Diary | Tech
MatRopert, HoI4 Tech Lead
Bonjour friends, it's your favourite Tech Lead again!
朋友们大家吼,大家最喜欢的技术领队又来辣!
Last year already I wrote to you in the final weeks leading to the release of the Barbarossa patch, and we draw close to the go-live of the Avalanche patch, here I appear again.
去年,在巴巴罗萨Barbarossa补丁发布前的最后几周,我已经给你们写过一篇日志。在雪崩Avalanche补丁接近发布的当今,我又再次出现辣。
Old Platforms Retirement Plan
旧平台退役计划
Like the future, technology is always in motion. As new platforms arise, olders need to be taken behind the barn and put down.
就像未来一样,科技总是在变化。随着新平台的出现,旧的平台需要退居幕后并被放弃。
Don't worry, we're not talking about Windows 7 (yet ). Despite the release of Windows 11, we have not elected to make a push to Windows 10 since Microsoft's support for new tech on older releases is still fairly good.
别担心,我们不是在谈论Windows 7(至少目前不是)。尽管Windows 11已经发布,我们还没有选择向Windows 10推进,因为微软的旧版本对新技术的支持仍然相当好。
The same cannot be said for Mac and Linux, sadly. And so, starting the new 1.12.0 release, the minimum OS versions will be macOS 10.14 (Mojave) and Ubuntu 20.04 LTS (Focal Fossa). You will still be able to play older HoI versions on older operating systems by rolling back to previous branches, but Avalanche will refuse to start.
遗憾的是,对于Mac和Linux就不是这样了。因此,从我们最新发布的1.12.0版本号开始,最低的操作系统版本将是macOS 10.14(Mojave)和Ubuntu 20.04 LTS(Focal Fossa)。你仍然能够回滚到旧的发布分支,以便在旧的操作系统上玩旧版本的HOI,但对于雪崩Avalanche补丁来说,游戏将拒绝启动。
Those updates are done in order to introduce new tech to our games (not just HoI) and ensure that all can be built on the same infrastructure within the studio.
这些更新是为了将新技术引入我们的游戏(不仅仅是HOI),并确保所有的游戏都能建立在与工作室内部相同的基础设施上。
New Defaults
新的默认设置
Last year we introduced the option to run the game with DirectX11 rather than the venerable DirectX9. After a long period of observation and very few issues observed, we have decided to make it the default.
去年,我们引入了用DirectX11而不是古老的DirectX9运行游戏的选项。经过长时间的观察,我们观察到的问题极少,因此我们决定将其作为默认选项。
The first time you start the Paradox Launcher on Avalanche, the game will perform a one-time upgrade of your settings from DirectX9 to DirectX11. New installations will also default to DirectX11.
当你第一次在雪崩Avalanche版本的基础上启动Paradox Launcher时,游戏将会对你的设定进行一次性升级,从选择DirectX9升级到选择DirectX11。新安装的游戏也将默认选DirectX11。
If you notice any issue due to this change, first, please make a bug report, and then simply go to the settings page and set the renderer back to DirectX9.
如果你注意到由于这一改动而产生的任何问题,首先,请向我们报告错误,然后只需到设置页面将渲染器设置调回DirectX9。

Visually the game should look absolutely the same, but internally the tools that come with DirectX11 have helped us find a few sneaky graphical bugs that will be fixed in Avalanche, such as weird white squares appearing on the side of some tank models.
仅从视觉上看,游戏应该是完全一样的,但在内部,DirectX11带来的工具帮助我们发现了一些细枝末节的图形错误,这些错误将在雪崩Avalanche中得到修复,例如一些坦克模型的侧面出现了奇怪的白色方块。
Performance Improvements
性能改进
This is I bet the bit most of you were waiting for, the usual question of "will the new patch make the game run faster than previous versions?". And I'm happy to say the answer is yes.
我敢说这是你们中的大多数人都在等待的部分,也就是这个日经问题:“新的补丁会使游戏运行得比以前的版本快吗?”。就此,我很高兴地说,答案是肯定的。
The biggest improvement has been made to the map icons rendering (unit counters, factories, supply hubs, you name it). The number of icons potentially displayed on the map had grown a lot since HoI's release 6 years ago and the historical algorithm wasn't cutting it anymore.
最大的改进是对地图图标的渲染(单位计数器、工厂、补给中心等等,凡是你能想到的)。自从6年前HOI初版发布以来,地图上可能显示的图标数量增加了很多,历史算法已经不能满足需要了。
For example, here are what the FPS and frame time look like on Avalanche on my work desktop (i7700, NVIDIA GTX 1060, vsync off and 150 fps cap):
例如,以下是我的工作环境(i7700,NVIDIA GTX 1060,vsync关闭,150 fps上限)里雪崩Avalanche版本的FPS和帧渲染时间:

Avalanche default zoom雪崩默认缩放
And Full zoomed out:
缩放到最小:

Avalanche Zoomed out雪崩缩小
Finally zoomed back in, but with Speed 5:
最后缩放回来,但开到5速:

Avalanche at Speed 55速的雪崩
(If you forgot last year's dev diary, you can pop up the ingame profiler by typing imgui show profiler in the debug console).
(如果你忘记了去年的开发日志,你可以在控制台中输入imgui show profiler来弹出游戏内置分析器。)
Contrast those numbers with the ones from the current live build (Barbarossa 1.11.13):
将这些数字与当前版本(Barbarossa 1.11.13)中的数字进行对比:

Barbarossa default zoom巴巴罗萨默认缩放
Note that Barbarossa denotes rendering performance in “render time” rather than “frame time”, which is only the GPU part, while Avalanche counts both CPU and GPU rendering time, so the numbers look different.
请注意,巴巴罗萨Barbarossa用“渲染时间”而不是“帧渲染时间”来表示渲染性能,前者只计算GPU部分,而雪崩Avalanche同时计算CPU和GPU的渲染时间,所以数字看起来不同。

Barbarossa zoomed out巴巴罗萨缩小

Barbarossa at speed 55速的巴巴罗萨
Since PDS games from HoI's generation tie up rendering and game simulation, this will translate in faster tick speed (on top of a few smaller performance optimizations we added to the simulation itself). Although, to be clear, faster rendering does not translate perfectly in faster game speed. It mostly means a more fluid experience when playing (especially unpaused in Speed 4-5), and then some improvement to the speed of the game simulation.
由于HOI这一代的PDS游戏将渲染和游戏模拟结合起来,这些改动将转化为更快的游戏运行速度(这种改善超越我们为游戏模拟本身添加的一些小的性能优化)。但是这里要明确的是,更快的渲染并不能完美地转化为更快的游戏速度,它主要意味着在游玩时有更流畅的体验(特别是在4速或5速中不卡顿),然后对游戏模拟的速度有一些改进。
Speaking of which, I have read and seen a bunch of "guides" to HoI performance over the past months sharing tips & tricks on how to improve the game speed, so let me give you mine: consider disabling VSync in your graphics settings, unless you have a high refresh rate monitor.
说到这里,我在过去几个月里阅读品鉴了一堆关于HOI性能的“指南”,分享了如何提高游戏速度的技巧和窍门,所以我也和你们分享一下我的诀窍:考虑在你的图形设置中禁用VSync,除非你有一个高刷新率的显示器。
The way the game simulation waits for rendering to be done to continue, with a slow refresh rate your CPU might end up spending precious time waiting on your monitor VSync which is not ideal. This root of the issue is difficult to address on HoI4 especially with DirectX9, but with DirectX11 becoming the default we will see if there is a way we can address this in the future. No promises though.
游戏模拟是等待渲染完成后才继续进行的,在刷新率较慢的情况下,你的CPU可能最终花费宝贵的时间来等待显示器的VSync,这并不理想。这个问题的根源在HOI4上很难解决,特别是在DirectX9上,但随着DirectX11成为默认选项,我们将看看是否有办法在未来解决这个问题,虽然不能保证解决这个问题。
Final Thoughts
最后的想法
Last year I had some extra French content to show, but I'm afraid this patch I was a bit short on time to bring you more. Although if you like Tech and History, I recently wrote a technical presentation on how to crack Enigma on a modern computer, with a focus on bringing the works of Marian Rejewski to light (as he and the Polish Cipher Bureau tend to be left aside in favour of Alan Turing and Bletchley Park in many stories). There's no recording available yet, but I'm scheduled to deliver twice more this year at tech conferences so they'll be on Youtube eventually.
去年我展示了一些额外的法国内容,但这个补丁恐怕时间有点紧,无法给你带来更多的内容。如果你喜欢技术和历史,我最近写了一篇关于如何在现代计算机上破解恩尼格玛的技术展示,重点是让人们了解Marian Rejewski的作品(因为在许多故事中,他和波兰密码局往往被抛在一边,而更多地谈及图灵和布莱切利公园)。目前还没有录音,但我今年计划在技术会议上再讲两次,所以最终会在Youtube上播出。
Speaking of Poland, have you all found my secret event in Barbarossa yet?
说到波兰,你们发现我在巴巴罗萨里面塞进的秘密事件没有?

安娜斯塔西娅·罗曼诺夫的命运
随着波兰及其盟友攻占莫斯科,我们的特工从NKVD的档案里面发现了一些记录,揭示了罗曼诺夫家族的悲惨命运。这份报告确定,整个皇室,包括安娜斯塔西娅,都被布尔什维克党人在1918年7月处决。如果我们不赶快采取行动,全世界很快就会发现我们女王的真实身份并不是她展现出来的那个样子的。
- 掩盖证据,全世界永远不会知道。
- 需要另一个人来戴上波兰的王冠!(熊熊佛伊泰克成为中立主义政党的领导人)
That'll be all for today, but I'll be happy to answer your questions, tech or otherwise!
今天的全部内容就是这些,我很乐意回答大家的问题,包括技术问题和其它的一些问题!
翻译:月蚀
校对:zzztotoso 三等文官猹中堂
欢迎关注UP主和主播小牧Phenix!
欢迎关注牧游社微信公众号和知乎专栏!微信公众号改版为信息流,欢迎【置顶订阅】不迷路,即时获得推送消息!
B站在关注分组中设置为【特别关注】,将会在私信内及时收到视频和专栏投稿的推送!
欢迎加入牧有汉化,致力于为玩家社群提供优质内容!组员急切募集中!测试群组822400145!
本作品英文原文著作权属Paradox interactive AB所有,中文译文著作权属牧有汉化所有。