Stellaris開發日誌#149 | 5/23 技術性改進

2021-03-03 牧遊社

牧遊社 牧有漢化翻譯

 

Stellaris Dev Diary #149 - Technical improvements

Moah, Platypus Admirer

 

Hi everyone, this is Moah. I’m the tech lead on Stellaris and today I’m here to talk about the free 2.3 "Wolfe" update that will be arriving together with Ancient Relics, and what it brings to the table in terms of tech.

大家好啊,我是@Moah。作為Stellaris的技術領導,今天由我來介紹將與遠古遺物一同發布的免費2.3版本號更新「沃爾夫Wolfe」(譯註:此處致敬作家吉恩·沃爾夫Gene Wolfe,是美國的科幻及奇幻小說作家,曾各獲得過兩次星雲獎與世界奇幻獎,也獲得過四次坎貝爾紀念獎與軌跡獎,他也曾多次獲得雨果獎提名,在1996年榮獲世界奇幻獎頒發的終身成就獎,代表作《新日之書》),以及這些更新在技術層面上帶來了什麼。

Stellaris is going 64 bits.

Stellaris將轉向64位

 

People have been clamoring for this for a while now, and various factors have led us to finally do this for this patch. I should temper your expectations though: while many have claimed that this would be a miracle cure for all their issues with Stellaris, the reality is somewhat more tame.

大家已經為此吵嚷了一段時間了,而多種因素促使我們最終在這個補丁中將它做了出來。但我應該對你們的期待澆盆冷水:儘管很多人聲稱這會是解決Stellaris一切問題的靈丹妙藥,但現實有時更為骨感。

 

What does it mean?

這意味著什麼?

 

The one solid benefit is that Stellaris is no longer limited to 4gb of memory, and won’t crash anymore in situations where it was reaching that limit. For people who play on huge galaxies, with many empires, many mods or well into 3000s, this will be a boon.

一個可以保證的好處是群星不再限於4GB內存,所以在達到該限制的時候不再會崩潰。對於那些遊玩一個有眾多帝國的巨大銀河系、打了很多MOD或者闖入3000年以後的玩家來說,這將會是一個福音。

 

In terms of performance, though, it doesn’t change much. Without drowning you in technical details, let’s just say that some things go faster because you handle more data at once, some things go slower because you have more data to handle. In the end, our measurements have shown no perceptible difference.

但是,在性能方面遊戲沒有太大變化。就不把你們淹沒在技術細節裡面了,我們就直說有些東西跑得更快了,因為你的遊戲一次能處理更多數據;而有些東西變得更慢了,因為你的遊戲需要處理更多數據。最後,我們的測量結果顯示沒有明顯差異。

 

Finally, the last effect of switching to 64 bits is that the game will no longer playable on 32 bits computers or OSes. We don’t think this will affect many people, but there you have it.

最後,切換到64位的最後一個影響是,遊戲將不再能運行於32位計算機或作業系統。我們認為這不會影響很多人,但你得知道一下。

What about Performance?

那性能又如何?

 

I know that’s everyone’s favourite question, so let’s do our best to talk about it. First, let me dispel some notions floating around in various forums: Stellaris does use multithreading, and we’re always on the lookout for new things to thread. In fact between 2.2.0 and 2.2.7, a huge effort was made to thread jobs and pops, and it’s one of the main drivers of performance improvement between these version.

我知道這是每個人都最喜歡的問題,所以讓我們盡力說明一下。首先,讓我澄清一下出現在論壇各版塊中的一些流言:Stellaris確實是使用多線程的,而且我們總是在留心找新東西來多線程化。事實上,在2.2.0版本號到2.2.7版本號之間,我們在崗位和人口方面做了大量的工作,這是這些版本之間性能改進的主要驅動力之一。

 

Pops and jobs are indeed what’s consuming most of our CPU time nowadays. We』ve improved on that by reducing the amount of jobs each pop evaluate. We』ve also found other areas where we were doing too much work, and cut on:

人口和崗位確實消耗了我們現在大部分的CPU時間。我們通過減少每個人口計算的崗位數量來改進這一點。我們還發現了其它做了無用功的地方,然後將其消除:

Ships calculating their daily regeneration when they’re at full health

船舶在滿血時仍然計算其每日恢復。

 

Off-screen icons being updated

屏幕外圖標也在被更新。

 

Uninhabitable planets doing the same evaluations as populated planets

非宜居星球與居住星球進行了相同的計算。

Why do these seemingly pointless things happen? Well, we generally focus on getting gameplay up and working quickly so that our content designers can iterate quickly, and sometimes things fall through the cracks. Some of these systems are also quite complex and the scale of the new code is not so easily apparent. Sometimes, not limiting the number of targets is good enough because you’re not doing much but then, months later, someone adds more calculations or the number of objects explodes for unrelated reasons, and suddenly you』ve got a performance issue.

為什麼會出現這些看起來毫無意義的事情?呃,我們通常專注於提升遊戲性並快速推進工作,這樣我們的內容設計師就可以快速迭代,而有時某些東西就會被疏漏過去。其中一些系統非常複雜,新代碼的規模也不那麼明顯。有時候,不對目標數量加以限制也問題不大,因為你也沒處理那麼多;但幾個月後,當有員工加入了更多的計算量,或者目標的數量因為某些無關原因而炸裂後,突然你就發現自己陷進了性能問題中。

Modifiers

修正項

 

One thing that sets Stellaris apart from other PDS title is how much we use (or abuse) modifiers. Everything is a modifier. Modifiers are modified by other modifiers themselves modified by other modifiers, and sometimes by themselves. It’s quite hard to follow, and leads to every value being able to change at any time without your noticing.

群星和其他PDS出品遊戲之間的一個巨大區別,在於我們使用(或者說濫用)修正項的程度。萬物皆是修正項。修正項由其它修正項來修正,而這些其它修正項又由其它修正項來修正,有時也被自己的修正項所修正。這難以為繼,而且會讓每一個值隨時都可能一個不注意就在你眼皮底下改變。

 

「Why don’t you just compute jobs when a new one appears?」 has often been asked around these parts. Well, a short answer to that is it’s really hard to know when a new job appears. You can get jobs from any modifier to: country, planet, pops. Each of these can get modifiers from ethics, traditions, perks, events, buildings, jobs, country, planets, pop, technology, etc.

「當一個新的任務出現時,為什麼不直接計算它呢?「經常有人圍繞著此類問題進行提問。對此一個簡短的回答是,我們很難知道什麼時候會有新的任務出現。你可以從任何修正項那得到新的任務:國家、行星、人口。其中每一個都可以從思潮、傳統、超凡飛升、事件、建築、崗位、國家、行星、人口、科技等方面得到修正。

 

Until now we were trying to calculate modifiers manually, forced to follow the chain in its entirety: when you recompute a country modifier, you then calculate their planets modifiers, and then each planet would recalculate their pops modifiers. Some of our freezes were just that tangled ball of yarn trying to sort itself out.

到目前為止,我們一直在嘗試手動計算修正項,並強迫它整個兒遵循計算鏈:當你的遊戲重新計算一個國家修正時,將先計算它們的行星修正,然後每個行星將重新計算它們的人口修正。我們的一些卡頓現象只是一團糾纏在一塊的毛線球試圖把自己理清楚。

This is our modifier flow charts. It’s not quite up to date, but gives you an idea of the complexity of the system (Unpolished because it’s a dev tool, and not made for the article).

這是我們修正項計算的流程圖。它並不是最新的,但會讓大家對系統的複雜度有個概念(因為它是一個開發工具,而不是專為本文而設計的,所以沒有經過打磨優化)。

 

No More!

沒了!

 

For 2.3 「Wolfe」 we have switched to a system of modifier nodes, where each node register what node they follow, and is recalculated when used, following the chain itself. We have modifiers that are more up to date, and calculated only when needed. This also reduces the number of pointless recalculations.

對於2.3版本號「沃爾夫Wolfe」來說,我們已經將系統更換為一個由修正項節點組成的系統,其中每個節點記錄它們所跟隨的節點,並在使用節點時重新計算,遵循整個計算鏈本身的流程。我們使得修正項更符合最新狀態,並且只在需要時才計算。這也減少了無意義的重新計算的數量。

 

This system has shown remarkable promise, and cut the number of 「big freezes」 happening around the game (notably after loading, for example). It has some issues, but as we continue working with it, it』ll get better and help both with performance and our programmers』 sanity.

這個系統展示出了非凡的前景,並且減少了遊戲中發生的「重大卡頓」的數量(例如,在加載遊戲之後)。它還存在一些問題,但是當我們繼續努力後它會變得更好,並且對遊戲性能和保持我們程序驢的理智值都有幫助。

So, what’s the verdict?

那麼,結論是什麼?

 

In our tests, 2.3 「Wolfe」 is between 10% and 30% faster than 2.2.7 right now. Hopefully it』ll stay that way until release, but the nature of the beast is that some of these optimizations break things and fixing the issues negate them, so we can’t promise anything.

在我們的測試中,2.3版本號「沃爾夫Wolfe」比2.2.7版本號要快10%到30%。希望它會一直保持這種狀態直到發布,但問題的本質是,其中的一些優化會搞壞掉一些東西,而修復這些問題又會抵消優化,所以我們不能在這裡做出任何承諾。

Measurements provided by @sabrenity , using detailed info from the beta build. It’s worth noting the 「SHIPS_SERIAL」 purple line has since been eliminated.

測試數據由@sabrenity提供,使用來自beta版本的詳細信息。值得注意的是,「SHIPS_SERIAL」的紫線已經被削除。

AI

人工智慧

 

Another forum favorite, we have done some improvements to the AI. First, with @Glavius ’s permission, we』ve used his job weights to improve general AI job distribution. We』ve also done the usual pass of polish and improvements, and of course taught the AI how to use all our new features.

另一個論壇上最喜歡討論的話題。我們對AI做了一些改進。首先,在@glavius的許可下,我們利用他的任務權重來改進AI的整體任務分配。我們也做了一些常規的優化和改進,當然還教會了AI如何使用我們所有的新功能。

What else is new?

還有哪些東西是新的?

 

We’re also getting a new crash reporter that will send your crash report as soon as they happen rather than next time you start the game. We』ve improved our non-steam network stack for connectivity issues, etc.

我們也搞了個新的崩潰報告器,它將在你的遊戲崩潰發生時發送報告,而不是下次開始遊戲時。我們也改進了我們的非Steam網絡棧以解決連接問題等等。

All right, enough of my yammering. This has turned into a GRRM length novel, and even though there are many more areas we could cover, we』ll just turn this for your perusal.

好吧,我說得夠多了。這已經變成了一部喬治·R·R·馬丁的長篇小說,儘管我們可以涵蓋更多的領域,但我們只列舉出了這些來方便你們閱讀。

翻譯:子炎君 Lithium

校對:萬豪頓 三等文官猹中堂

 

歡迎關注鬥魚主播小牧Phenix

歡迎關注牧遊社微信公眾號和知乎專欄!微信公眾號近期改版為信息流,歡迎置頂訂閱不迷路,即時獲得推送消息!

歡迎加入牧有漢化,致力於為玩家社群提供優質內容!翻譯人員募集中!

相關焦點

  • Stellaris開發日誌#113 | 5/3 New Anomalies, Systems and Leviathans
    大家好,歡迎來到另一篇Stellaris的開發日誌。今天我們會繼續聊聊和2.1版本號尼文Niven更新一同到來的遙遠的星辰Distant Stars故事包,主題內容包括探索以及發現銀河中的新事物。如同之前的開發日誌一樣,我們也不會過於深入細節以防劇透太多關於你在新故事包中能夠探索的內容。
  • Stellaris開發日誌#166 | 1/23 聯邦問答
    在上周的開發日誌中,我們說過在接下來的幾篇開發日誌裡我們將會使用到新的問答格式。我們呼籲各位把自己對聯邦重做的問題都發帖說出來,而現在看到數量如此多的問題我們也感到非常高興!A: There are currently 14 categories of laws, with each category having 2-5 laws.問:現在有多少聯邦法律?答:現在一共有14類法律,每類之下各有2-5條法律。
  • Stellaris開發日誌#110 | 4/5 Creation and Beyond
    又輪到我來給大家寫新的日誌了,這篇日誌對於我而言這是非常特別的。如果你還不認識我的話,我叫Björn Iversen,是PDS的音頻總監。有趣的是,自從歐陸風雲I開始我就一直有在接觸PDS開發的遊戲。所以你們就自己想想吧,當我第一次走進辦公室時,毫無防備地發現自己要接手的竟然是PDS的一個新IP,而且還是個科幻遊戲,當時我該有多麼爽到啊!能參與到這樣的遊戲的製作之中就是每個音效師的理想啊!有誰不想做點雷射啊爆炸啊什麼的嗎!
  • Stellaris開發日誌#97 | 12/7 Tech Progression in Cherryh
    嗨大家吼啊,歡迎來到又一篇Stellaris的開發日誌。今天的開發日誌是關於如下主題的:2.0版本號切莉Cherryh升級中的科技,以及人型生物種族包將於今天開始發售騙錢,歐洲中部時間15:00時就會發布且可以購買啦。
  • Stellaris開發日誌#192 | 11/19 完美平衡,渾然天成……
    這周的日誌中我們將聊聊我們計劃中對遊戲的改進,同時也回顧一下前幾篇日誌中提到的試驗的最新進展。 Thank you for the massive amount of feedback in those threads.感謝玩家們在這些帖子中提供的大量反饋。
  • Stellaris開發日誌#100 | 1/11 Titans and Planet Destroyers
    大家吼,歡迎來到這個非常特殊的編號為三位數(#100)的Stellaris開發日誌。今天的日誌標誌著我們正式開始討論啟示錄擴展包Apocalypse Expansion,這個擴展包將伴隨著2.0版本號切莉Cherryh升級一同發布。
  • 歐陸風雲4開發日誌 | 11/5 批量建造與和談改進
    勿忘,勿忘,十一月五(譯註:火藥陰謀梗)...在這篇開發日誌發布的日期,我們正非常符合情景地在鄰角的莫斯納城堡MosznaCastle舉辦歐陸風雲4聯機遊戲派對——這肯定會充滿密謀、陽謀和諸多樂趣。和去年一樣,我們會出席派對並直播整場活動,所以記得周四在Paradox Interactive的Twitch頻道準時觀看。
  • Stellaris開發日誌#172 | 3/5 AI重做
    我進入開發團隊時的歡迎禮物以及第一個任務,就是重做軍事AI。在那個陰鬱又漆黑的瑞典冬日之中,我設法鼓搗了一些改進,今天可以展示給大家看看。 First of all, I worked on visualization to help us debug how the AI 「thinks」.
  • Stellaris開發日誌#128 | 10/4 決議和行星轟炸
    大家吼啊,我們現在回來更新另一篇Stellaris開發日誌啦。今天我們將繼續討論2.2版本號勒吉恩Le Guin更新,就像我們上周承諾過的那樣,本周的主題是決議Decisions和行星轟炸Planetary Bombardment。
  • Stellaris開發日誌#146 | 5/2 新的先驅者文明與相關改動
    這就是本周開發日誌中我們必須分享的全部內容。下周我們將再次回歸,那也恰好將會是Stellaris的3周年紀念日。  翻譯:MatrixEssenes校對:萬豪頓 三等文官猹中堂 歡迎關注鬥魚主播小牧Phenix!
  • Stellaris開發日誌#102 | Edicts, Campaigns and Unity Ambitions
    歡迎來看這次的Stellaris開發日誌。
  • Stellaris開發日誌#150 | 5/30 2.3版本號「沃爾夫」補丁日誌
    * 在2.3版本號中星域得到了很大的改進,允許玩家更好地控制星域的創建方式和位置,如果你想專注於更龐大的視角,也提供了更強大的自動化工具讓它們自己運行。* Low habitability now also reduces pop growth and job output by 0.5% per missing habitability* 低宜居度下,每降低1點宜居度現在同時降低了0.5%的人口增長速度和工作產出。
  • 1121開發日誌 本小姐婚後光子登場
    大家好,我是婚後光子,今天的開發日誌由本小姐代班。什麼?你們竟然不認識我?
  • Stellaris開發日誌#106 | 3/2 2.0.2 patch notes and the Road Ahead
    今天的開發日誌是關於2.0.2_beta版本號的內容:新的版本內容已經作為Steam用戶可選的Beta內容推出了(請Paradoxplaza Launcher的用戶注意:我們現在選擇了Steam作為Beta測試平臺,如果你想嘗試的話請用在Paradoxplaza購買時附帶的Steam秘鑰在該平臺進行激活)。
  • 【歐陸風雲桌遊】開發日誌#1
    我們很高興能發布歐陸風雲桌遊的第一個開發日誌。我們知道你們中的一些人已經等不及了。現在終於來了,接下來還會有一系列的開發日誌。您可能已經知道,P社和Aegir Games已經開始著手讓歐陸風雲重回桌遊。對遊戲略有了解的人都知道,歐陸風雲是一個有許多機制的複雜遊戲。因此,歐陸風雲桌遊應該一款史詩般的4X桌遊,有很多不同的方面,為玩家提供所應具備的各種選項和選擇。
  • 鋼鐵雄心4開發日誌 | 2/20 炮手就位全面總結
    鋼鐵雄心4開發日誌 | 9/5 海軍將領特質與模組開發主力艦現在最多可以有5個船塢同時進行建造,而其他艦艇的船塢限制為10個,運輸船沒有特別的船塢使用上限。 鋼鐵雄心4開發日誌 | 9/12 海軍建造、維修與損壞
  • 帝皇:羅馬開發日誌#1 | 5/28 遊戲設計思路
    嗨,大家好,歡迎來到我們的新遊戲帝皇:羅馬Imperator: Rome的第一份開發日誌!在正式版發布之前的每個周一,我們都會按時更新開發日誌(休假除外)!Today we』ll betalking about the vision for this game.
  • 【模模搭開發日誌019】BOSS陳的任性日誌
    昨晚小編對我說:「明天開發日誌輪到你寫了。」「什麼,我也要寫嗎?!」(BOSS居然沒有免寫權!你還打算繼續在這個公司混下去嗎?)
  • 《聖歌》2.0開發日誌:機甲技能樹系統詳解
    雖然不再是遊戲社區內的關注對象,但BioWare依舊正在努力地重新開發和發售《聖歌》。自今年8月BioWare發布更新日誌以來已經過去了將近3個月時間,近日BioWare又在官網發布了新的博客,重點介紹《聖歌》2.0的機甲,技能樹,可以解鎖的能力和大致玩法。目前,BioWare專注的是設計計劃,而非具體細節。
  • 《俠隱閣》開發日誌:明年二月推出第二年更新
    《俠隱閣》官方在今日公開遊戲的的開發日誌:《俠隱閣》第二年內容的開發工作已近尾聲,預計於2021年2月正式推出,屆時價格也會進行調整,已經購買的玩家將享受免費升級。俠隱閣開發日誌-20201221:各位玩家們好,感謝各位玩家們的耐心等候,在冬至這一天,除了向各位玩家送上祝福,團隊也想和各位玩家宣布有關俠隱閣開發進度的最新消息。