电脑故障问答网

 找回密码
 立即注册
查看: 110|回复: 10

钢铁雄心4开发日志 | 11/3 技术领队的生活

[复制链接]

1

主题

3

帖子

4

积分

新手上路

Rank: 1

积分
4
发表于 2022-12-14 07:54:37 | 显示全部楼层 |阅读模式
牧游社 牧有汉化翻译

HoI4 Dev Diary - A Tech Lead's Life
MatRopert, HoI4 Tech Lead

Hello everyone, it's your favourite (and only) tech lead, The French Paradox!
大家吼哇,是大家最爱的(也是唯一的)技术领队,French Paradox

In this diary I'll tell you more about our tech, give some insights into the programmer's job, what we've been up to for the past year (and some change) and offer you a chance to ask any question you may have about tech.
本篇日志会和大家多聊点技术层面的问题,提供一些关于码农工作的内情,比如我们过去一年来都整了点啥(以及一些变动),并给大家提供询问技术相关问题的机会。
<hr/>Saying old platforms goodbye
跟老平台说拜拜罢

First, with the upcoming 1.11 patch we will be retiring some old Linux and Mac platforms that aren't maintained by their own developers anymore.
首先,即将到来的1.11版本号补丁会淘汰一些不再由他们自己的开发者维护的旧Linux和Mac平台。

This means that starting next update the minimum OS version to run HoI will be Ubuntu 18.04 (on Linux) and macOS 10.11 (El Capitan) on Mac.
也就是说自下次更新起,运行钢铁雄心的最低操作系统版本将为Ubuntu 18.04(Linux)以及Mac上的macOS 10.11 (El Capitan)。

There shouldn't be much to worry about though, as the previous versions are older than HoI itself at this point and our telemetry shows almost all of you have upgraded long ago.
不过应该没啥要担心的,这些旧版本甚至比钢铁雄心本身还要老,而且我们的遥测数据显示几乎所有的人都在很久以前就已经升级了。

For those on Windows who look anxiously at their aging Windows 7, keep calm and carry on, we have no plans to drop support for it (although as a friendly tech person I'd still suggest you consider upgrading).
对于那些正焦虑地瞥向自己年迈Win7的玩家,保持冷静继续前行,我们没有放弃相关支持的打算(不过作为友好的技术人员,我还是建议你考虑升级系统)。

Why do we make those decisions you may wonder? Two reasons: one maintaining old tech comes with a cost that we would rather spend on improving the game for 99% of the users, and two sometimes it blocks the adoption of new tech that would make our programmers job easier and more efficient.
你可能想问我们为啥咧?原因有二:一是维护旧技术的成本,我们宁可把这些成本花在为99%的用户改进游戏上;二是有时它阻碍了新技术的应用,而新技术会让我们的码农干活更轻松高效。

Without going too much into details, the general idea is that we can only use tech that is supported on all platforms, so basically we're only as modern as the oldest thing we support. If you take the case of Linux for example, the previous Ubuntu release was from 2016, meaning HoI could not use anything released since then (and probably a bit before, as Ubuntu LTS releases usually don't ship with the latest shiny goodies). Some time we can work our way around it, but not always.
不说那么细,总之大体上的意思是,我们只能使用所有平台都支持的技术,我们程序能有多先进基本取决于我们能支持的最旧平台。比如以Linux为例,上个Ubuntu版本是2016发布的,这意味着钢铁雄心不能动用此后发布的任何玩意儿(甚至还可能有之前的,因为Ubuntu的长期支持版本通常不包含最新最炫的好货)。有时我们能绕开这个问题,但也不是肯定能做到。

Speaking of new tech...
说到新技术的话…


<hr/>DirectX 11
迪瑞克特叉壹壹

That's right, the next HoI4 release will join Stellaris and the other more recent PDS games by adding DirectX 11 support.
啊对,下一个钢铁雄心4的发布版本将会像群星和其他最近更新的P社游戏一样,加入对DirectX 11的支持。

DirectX 9 will still be the default for now, but you will be able to select another renderer in the launcher settings.
DirectX 9仍将是默认选项,但你可以在启动选项中选择另一个渲染器。

There shouldn't be any visual difference between DX9 and DX11 (and OpenGL for that matter), we have been working on making sure the experience will be the same.
DX9和DX11(以及类似的OpenGL)应该不会有任何视觉上的差异,我们一直在努力保证提供相同的体验。

The game should load a bit faster however, especially if you use a lot of mods that bring extra textures and models.
但游戏加载应该会快一点,尤其是启用了很多提供额外纹理和模型的mod的话。

Working remotely for more than a year, we also noticed less issues playing with remote desktop and the like, which might not be a big deal for most of you but was quite appreciable for our devs during development.
在一年多的远程工作中,我们同样注意到了用远程桌面进行游戏的问题较少,这可能对多数玩家来说不是什么大事,但对开发人员来说可是开发过程中的幸事。

Finally it did help us tweaking & fixing the new railways & trains graphics (as most graphics debugging tools have dropped support for DX9).
最后,它确实帮我们调整修复了最新的铁路/火车模型(因为大多数模型调试工具已经放弃了对DX9的支持)。
<hr/>Performance
性能

We know that performance is always at the heart of every discussion about our games and as a Tech Lead I have been keeping a close eye on it.
我们知道性能始终是游戏相关讨论的核心,而作为技术负责人,我也一直在密切关注它。

So far it looks like our release candidate is roughly on par with the current 1.10 patch, performance wise.
目前看来,待发布版本在性能上与目前的1.10版本号补丁基本持平。

Why not better, I can already hear you typing? The main reason is that the game on 1.11 is a different beast 1.10 (which itself is quite different from the original 1.0 release).
当然,我也猜到大家正打字在问“为啥没有改进”。主要原因在于游戏的1.11版本号和1.10版本号相差甚远(1.10本身与1.0原版也很不同)。

Namely, the supply simulation is now much more deep and complex, and needs to account for all those railways across the world and the fact that now allies can supply each other.
重点在于,现在的补给模拟要更深入复杂,还要考虑到世界各地的所有铁路以及盟友间可以互相补给的情况。

While I am writing those words, our compatibility lab is working hard at running the game on various hardware configurations to give us a more complete picture and perhaps a few suggestions for an updated recommended configuration, as the one you can see on Steam right now dates back from the original release.
在我写日志的同时,我们的兼容性实验组正努力在各种硬件配置上运行游戏,以便提供更广泛的情况,或许还有一些更新推荐配置的建议,毕竟现在Steam上的推荐配置还是最初发布时的版本。


Toying with a 11th generation i9 and a RTX 3090. Will it take off?
耍一耍11代i9和3090,看它能否起飞。

On the topic of measuring performance, the Barbarossa update will include an in-game profiler that you can use to measure how your machine performs.
关于性能测试的话题,在巴巴罗萨更新中将会加入一个游戏内的分析器,你可以用它来测试你机器的性能。

You should be able to spawn it from the console using the magic line imgui show profiler.
你可以用“imgui show profiler”这句咒语来从控制台生成该工具。

For example here is the current release candidate on my home i7-10700 with a RTX 2080 SUPER:
例如,这是在我家里的i7-10700与RTX 2080 SUPER上运行的待发布版本:


1936 fresh start, speed 5, Direct 11, vsync off
1936默认开局,5速,Direct 11环境,垂直同步关闭



1943 test save, speed 5, Direct 11, vsync off
1943年的测试存档状况,游戏速度为5,Direct 11环境,垂直同步关闭

As you can see this offers a few metrics that can be collected by toggling the Enable/Disable Collection button at the top.
正如上图所示,这个界面显示数个可以由顶部的启用/禁用收集按钮控制。

A few things you can get from it:
你能从这个界面了解到这些信息:

Render time: the average time to render one frame over the last second
渲染时间:过去一秒钟内,渲染一帧所需要的平均时间

Render time excluding present: same as previous but excludes the time spent waiting on the GPU to actually present the frame on screen. The difference is usually due to vsync.
排除显示的渲染时间:和上一个概念一样,除了不计算花在等待GPU将画面投放到屏幕上的时间。两者的差别往往来自垂直同步。

Frames per second: the FPS count, you know this one
每秒帧数:大家最爱的大名鼎鼎的FPS。

Ticks per second: how many in-game hours were simulated over the course of the last second
时间速率:过去一秒内模拟的游戏内时间变化,以小时为单位。

Last tick: the time it took to simulate the last hour or new day/week/month
上个时间变化:模拟游戏内最后一小时,或者是加载新的一天、一周或一月所需要的时间

Last 24 ticks average: same as previous but averaged from the last 24 (or less depending on how much time was spent collecting data)
过去24次时间变化的平均值:和前一个概念一样,但取值来自最近的24个数值(减少收集数据所消耗的时间带来的影响)

Next you have a nice graph representation of where (in which system) that time was spent. We use it to quickly eyeball a performance report, especially when external programmer tools are not available (for example when it happens on a non-dev machine).
之后就会产出一个精美的图表,用于了解电脑都把时间花在哪了。我们利用这个分析器来快速制作运行报告,尤其是在外部编程工具不可用的时候(比如在一台非开发用设备上运行测试的时候)。

Final tip: if the profiler doesn't show up with the magic console command, try turning it off and on again using imgui off then imgui on.
最后一点建议:如果你输入控制台指令后分析器还是没出现,试着用imgui off和imgui on指令重启分析器
<hr/>A personal pet peeve
个人小活

Programmers at PDS are rarely just that. Most of us get involved in the game development by offering insights on design, balance or content, and I am no exception.
当然PDS码农不光负责这些。大多数成员还会以提供设计、平衡和内容方面建议的方式参与到游戏开发之中,我也一样。

So now is the time to talk about French Communism.
那么趁机来讲讲法国共产党。

If you remember the French focus tree from La Résistance, if you go communist you get this guy:
抵抗运动La Résistance拓展包的法国国策树中,如果你选择走共产线,你就会遇到这个老哥:



Maurice Thorez was historically the leader of the Parti Communiste Français (PCF).
史实中的莫里斯·多列士曾是法国共产党(Parti Communiste Français)的领袖。

If you walk through some cities in France you can even find streets bearing his name still today.
时至今日,若在法国某些城市中漫步,你甚至还能找到一些仍以他命名的街道。

But he had one characteristic trait: he was a die-hard Stalinist who followed the Moscow line until his death in 1964. He had a city and an institute named after him in the USSR.
而他有个特点:这人是个铁了心的斯大林派,直到他在1964年去世之前他都坚定地追随着莫斯科路线。苏联甚至以他的名字命名了一座城市(指多列士,位于乌克兰顿涅茨克州)和一所学院(莫里斯·多列士莫斯科国立外国语师范学院,1990年更名为莫斯科国立语言大学并沿用至今)。

On the day the Molotov-Ribbentrop Pact was signed, he is in vacation in the Alps and the PCF changes its stance on Germany and Poland overnight following Moscow's instructions without asking him. When he comes back, he just shrugs and goes along with it.
在莫洛托夫-里宾特洛甫条约签订当天,他正在阿尔卑斯山度假,而法共也遵循莫斯科的要求,迅速且干脆地改变了其对德国和波兰的立场。莫里斯从阿尔卑斯返回后,也只是耸了耸肩顺应了时势。

With that in mind, I felt that it was weird you would keep him as a leader if you do not go for the "Loyalty To Moscow" sub-tree.
有了以上背景,我感觉如果你不选“忠于莫斯科”这条国策路线,那还让他作为国家领袖看起来怪怪的。

I did some research in French sources and found a better candidate to replace him. Behold:
我参考了一些法国文献,找到了一个更好的候选人。让我们热烈欢迎:



René Nicod was a member of the PCF in 1939, but when the party decided to realign itself following the Pact, he and a couple other MPs quit the party and founded the Union Populaire Française (UPF) or French Popular Union in English. They denounced the Pact and supported the government's decision to stand with Poland.
勒内·尼克德在1939年曾是法共的一员,但当法共在《苏德互不侵犯条约》签订后进行路线调整时,他和其他几个议员决定退党并成立了法国人民联盟(French Popular Union, Union Populaire Française, abbr. UPF)。他们公开谴责该条约并支持政府与波兰共进退。

In Barbarossa if you own La Résistance and go either Anti-Fascist Coalition or Loyalty to the cause you will get a new party and leader:
巴巴罗萨Barbarossa更新中,如果你已经拥有抵抗运动La Résistance,并且任选“成立反法西斯同盟”和“忠于事业”两者其一,你会获得新的政党名字和领袖:


反法西斯联盟
完成时间:70天
需要完成国策制宪大会
法兰西公社完全独立
和以下国策相互排斥:忠于莫斯科,忠于事业
该国策的进度在条件不满足的情况下将会被取消
效果:
勒内·尼科德成为共产政党领袖
勒内·尼克德获得特性:不情愿的老兵
适役人口修正:+5%
战争支持度:5%
共产政党将会被称为“法国人民联盟”
英国:触发事件:法兰西公社寻求加入同盟国



忠于事业
完成时间:70天
需要完成国策摧毁反革命
法兰西公社完全独立
和以下国策相互排斥:反法西斯联盟,忠于莫斯科
该国策的进度在条件不满足的情况下将会被取消
效果:
勒内·尼科德成为共产政党领袖
勒内·尼科德获得特性:无产阶级国际主义者
非核心人力+2.5%
战争支持度+5%
共产政党将会被称为“法国人民联盟”
设定规则:可以建立阵营
建立阵营:巴黎协约
雅克·杜克勒成为特工

Each branch will give a different flavour of Nicod inspired by his published opinions pieces during the Great War (he both supported in the French Army and lost his hand in the trenches but also denounced the war on ideological grounds and hoped the French and German workers would unite in a common cause).
不同“风味”的尼科德将会由这两条国策线提供给玩家,以此体现他在一战期间发表的评论思想。(他支持法军,并在战壕中失去自己的双手,但同时也反对这场基于意识形态立场的战争,并希望德法两国工人可以在共同的事业中联合起来。)

Finally, it turned out to be a bit difficult to find a good portrait for our artists. My initial research in the French National Assembly online database only yielded a low-res blurry picture.
最后,看起来给美工找合适的画像并不容易。我最开始在法国国民议会的线上数据库里的研究只找到了一些模糊的低分辨率画像。

But luckily a small French shop decided to sell its stock of old photos on eBay and his mayor portrait was one of the articles.
但万幸的是,一家名不见经传的法国小店决定在eBay上出售他们库存里的老照片,而尼科德的画像就是其中之一。

We could have stopped there and used the ad's preview picture as a source, but of course we had to buy and ship to Sweden.
当然到这儿其实就够了,我们本可以用广告上的预览图作为作画参考,但我社肯定要买下这画像,再让他们送到瑞典。

So here he is, looking over the HOI corner in our Stockholm office!
所以他来了,在我们斯德哥尔摩的办公室俯视钢铁雄心之角





And with that, I'll happily take your questions
就到这里吧,我也很期待你们的问题

PS: a few back we talked about Modding Changes. @Aurelien Delay looked at your feedback and has more insights to share that should help you convert your mod to the new character system
注:先前我们提到过模组制作变动,@Aurelien Delay都看了各位的反馈,并为如何将mod适配新人物系统提供了更深入的介绍。

https://forum.paradoxplaza.com/forum/threads/nsb-modding-tool-for-easy-character-system-conversion.1496450/

翻译:Raymond 月蚀
校对:zzztotoso 三等文官猹中堂

欢迎关注UP主和斗鱼主播小牧Phenix
欢迎关注牧游社微信公众号和知乎专栏!微信公众号近期改版为信息流,欢迎置顶订阅不迷路,即时获得推送消息!牧有汉化Official已进驻B站,欢迎关注!
欢迎加入牧有汉化,致力于为玩家社群提供优质内容!组员急切募集中!测试群组822400145!
回复

使用道具 举报

1

主题

4

帖子

4

积分

新手上路

Rank: 1

积分
4
发表于 2022-12-14 07:55:14 | 显示全部楼层
(北洋)五色旗正统在斯德哥尔摩[惊喜]
回复

使用道具 举报

0

主题

4

帖子

6

积分

新手上路

Rank: 1

积分
6
发表于 2022-12-14 07:55:51 | 显示全部楼层
迪瑞克特叉壹壹笑死不过蠢驴的某些作风还是值得肯定的,比如买下照片这件事。
回复

使用道具 举报

0

主题

5

帖子

6

积分

新手上路

Rank: 1

积分
6
发表于 2022-12-14 07:56:04 | 显示全部楼层
这个profiler会引入其他游戏吗
回复

使用道具 举报

0

主题

1

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2022-12-14 07:56:41 | 显示全部楼层
迪瑞克特叉壹壹这个翻译是认真的吗[捂脸]
回复

使用道具 举报

0

主题

1

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2022-12-14 07:57:41 | 显示全部楼层
cpu单核性能测试标杆[惊喜]
回复

使用道具 举报

0

主题

3

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2022-12-14 07:57:59 | 显示全部楼层
什么?钢丝居然还是dx9游戏么?!
回复

使用道具 举报

1

主题

4

帖子

7

积分

新手上路

Rank: 1

积分
7
发表于 2022-12-14 07:58:06 | 显示全部楼层
为啥不一步到位支持到dx12或者vulkan 。。
回复

使用道具 举报

0

主题

2

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2022-12-14 07:59:02 | 显示全部楼层
莫子时候能支持多核啊[思考]
回复

使用道具 举报

1

主题

9

帖子

9

积分

新手上路

Rank: 1

积分
9
发表于 2022-12-14 07:59:35 | 显示全部楼层
法共这个小细节做的挺不错的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

云顶设计嘉兴有限公司模板设计.

免责声明:本站上数据均为演示站数据,如购买模板可以上DISCUZ应用中心购买,欢迎惠顾.

云顶官方站点:云顶设计 模板原创设计:云顶模板   Powered by Discuz! X3.4© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表