This article relates to the game "Team Fortress 2". Click here for more information.
这篇条目有关 Source引擎。如需详情,点击这里。

Zh/Team Fortress 2 engine branch: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
(翻译一部分)
Line 1: Line 1:
{{wip}}{{translate}}
{{wip}}{{translate}}
{{tf2 topicon}}{{src topicon}}
{{tf2 topicon}}{{src topicon}}
{{LanguageBar}}
{{LanguageBar|title=军团要塞2分支}}


{{update|All first party {{src13mp}} games run on this branch now. Update all other pages to mention {{tf2branch|1}} instead of {{src13mp|1}}, and add new features to this page (if there are any). If something says {{src13mp|only}}, say {{src13mp|since}} instead.}}
{{update|所有第一方游戏现均已运行在此分支上。更新所有其他页面,将提及的{{src13mp|1}}替换为{{tf2branch|1}},并为此页面添加新功能(若有)。若某处标注{{src13mp|only}},请统一改为{{src13mp|since}}}}


The {{tf2branch|4}} (also referred as '''Source 2013 Multiplayer v2''', or '''TF2 branch''' for short) is a newer version of {{src13mp|2}}, developed from updates to {{tf2|2}}. {{hl2dm|1}} was also upgraded to this branch after the 20th Anniversary update. All remaining {{src13mp|1}} games ({{css}}, {{hldms}}, {{dods}} and {{src13mp}} SDK) were upgraded to this branch on 18 February 2025.
{{tf2branch|4}} (亦称'''Source 2013多人模式v2'''或简称'''TF2分支''') 是 {{src13mp|2}} 的更新版本,基于 {{tf2|2}} 的持续更新开发而成。在“半条命2”的20周年更新后, {{hl2dm|1}} 也升级至该分支。截至2025年2月18日(CST:2月19日),所有剩余的 {{src13mp|1}} 游戏({{css}}, {{hldms}}, {{dods}} {{src13mp}} SDK)均已升级至此分支。


The branch also adds new features, including one from {{hl2|1}} 20th Anniversary Update, {{l4dbranch|1}} and later branches.
该分支新增了多项功能,其中包含源自 {{hl2|1}} 20周年庆更新的技术特性,以及 {{l4dbranch|1}} 及后续分支的兼容性改进等优化方案


Source mods and tools that are built on {{src13mp|1}} (also referred as '''{{src13mp|name}} Legacy''') will not work on this branch, due to incompatible [[WP:Application binary interface|ABI]](s).
需要注意的是,基于{{src13mp|1}(也称为'''{{src13mp|name}} 旧版''')开发的模组和工具将无法在此分支运行,因存在[[WP:Application binary interface|ABI]](应用程序二进制接口)不兼容问题。


== Features ==
== 特性 ==
New since the {{src13mp|2}} branch is:
{{src13mp|2}} 分支更新以来:


; {{w|64-bit|64-bit binaries}} {{also|{{gmod}}}}
; {{w|zh:64-bit|64 位二进制文件}} {{also|{{gmod}}}}
: Allows the game to access more than 4GB RAM and have slightly better performance. Additionally, tools such as {{hammer|1}}, map compilers ({{vbsp|1}}, {{vvis|1}}, {{vrad|1}}), etc... also have 64-bit binaries.
: 使游戏可访问超过4GB内存,性能略有提升。SDK 工具中的 {{hammer|1}}、地图编译器({{vbsp|1}}{{vvis|1}}{{vrad|1}})等也提供64位版本。
: {{Note|64-bit is not available on Mac.}}
: {{Note|Mac平台不支持64位运行}}


; {{L|VScript}} {{also|{{mapbase}} {{nmrih}} {{l4dbranch}} {{p2branch}} {{csgobranch}} }} <!-- GLua ≠ vscript; don't mention gmod here -->
; {{L|VScript}} {{also|{{mapbase}} {{nmrih}} {{l4dbranch}} {{p2branch}} {{csgobranch}} }} <!-- GLua ≠ vscript; don't mention gmod here -->
: A powerful new scripting system primarily using {{sq|2}}. Third-party games may have different VScript implementation.
: 基于{{sq|2}}语言的全新脚本系统,支持深度游戏逻辑定制。第三方游戏可能采用不同的VScript实现方案


; {{L|WebM}} video playback {{also|{{hdtf}} {{gmod}} {{csgo}} {{strata}}}}
; {{L|WebM}} 视频播放 {{also|{{hdtf}} {{gmod}} {{csgo}} {{strata}}}}
: Used for game intros or cutscenes in some games. Replaces {{L|Bink}} video. WebM allows smaller file sizes without significant degradation in video quality.
: 替代{{L|Bink}}视频编解码器,用于游戏开场动画与过场动画。WebM格式在保持画质前提下显著缩小文件体积。


; {{L|Vulkan}} renderer {{also|{{hl2}} {{portal}} {{l4d2}} {{p2branch}} {{csgobranch}} {{strata}} {{xe}}}}
; {{L|Vulkan}} 渲染器 {{also|{{hl2}} {{portal}} {{l4d2}} {{p2branch}} {{csgobranch}} {{strata}} {{xe}}}}
: A low-overhead, cross-platform graphics API, successor to {{L|OpenGL}}.
: 跨平台低开销图形API, 继承{{L|OpenGL}}
: First introduced in 2022 with the release of Steam Deck update for {{hl2|1}} and {{portal|1}}, and later added to {{tf2|1}} during the 64-bit update. {{portalrtx|1}} also uses Vulkan as part of the RTX Remix runtime. Using DXVK, a library used to translate Direct3D calls to Vulkan. This is disabled by default, but can be enabled in supported games by passing {{code|-vulkan}} into the game's launch options.
: 2022 年随适配 Steam Deck {{hl2|1}} {{portal|1}} 更新首次推出,后在 {{tf2|1}} 64位更新期间(2024 年)正式集成。{{portalrtx|1}} 也采用 Vulkan 作为光追改造(RTX Remix)的一部分。使用DXVK,一个用于将Direct3D调用转换为Vulkan的库。默认禁用,可通过启动项添加 {{code|-vulkan}} 启用。


; {{L|VGUI}} High {{w|Dots per inch|DPI}} support {{also|{{hl2}} 20th}}
; {{L|VGUI}} {{w|zh:Dots per inch|DPI}} 支持 {{also|{{hl2}} 20周年更新}}
: VGUI elements are now properly scalable on higher resolutions such as 4K (3840x2160).
: 实现4K(3840x2160)等高分屏下界面元素的精准缩放


; [https://partner.steamgames.com/doc/features/multiplayer/networking Steam Networking]
; [https://partner.steamgames.com/doc/features/multiplayer/networking Steam 网络]
: Allows self-hosting using [https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay Steam Datagram Relay], meaning users can easily create joinable servers without port forwarding.
: 通过[https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay Steam 数据报中继]实现自建服,无需端口转发即可创建可加入的服务器。


; {{w|Bicubic}} lightmap filtering {{also|{{hl2}} 20th {{hls}}}}
; {{w|zh:Bicubic}} 贴图过滤 {{also|{{hl2}} 20周年更新 {{hls}}}}
: Introduced in 2024, bicubic filtering is used on {{L|lightmap}}s when {{cmd|r_lightmap_bicubic}} is enabled, smoothing out aliasing caused by the lower resolution of lightmaps. It can be also enabled by setting the Shader detail to "Very High".
: 2024年新增特性,在启用 {{cmd|r_lightmap_bicubic}} 参数后,可平滑处理{{L|lightmap|光贴图}}低分辨率导致的锯齿问题。也可通过将"着色器细节"设为"极高"自动启用。


; {{L|env_fog_controller|Radial fog}} {{also|{{mapbase}} {{l4dbranch}} {{asbranch}} {{p2branch}}{{csgobranch}} {{strata}} {{hl2}} 20th}}
; {{L|env_fog_controller|径向雾效果}} {{also|{{mapbase}} {{l4dbranch}} {{asbranch}} {{p2branch}}{{csgobranch}} {{strata}} {{hl2}} 20周年更新}}
: Unlike planar-based fog, radial fog does not strengthen or weaken the apparent amount of fog in a particular spot when you rotate the camera.
: 区别于平面雾效,摄像机旋转时不会改变特定区域的雾浓度表现(增强/减弱)。
: You can either use radial fog or planar-based fog by changing {{ent|env_fog_controller}} "Use Radial Fog {{mono|(fogRadial)}}" KeyValues.
: 可通过 {{ent|env_fog_controller}} "使用径向雾{{mono|(fogRadial)}}"关键帧值,可以使用径向雾或基于平面的雾。


; Texture streaming {{also|{{csgobranch}}{{tfbranch}}}}
; Texture streaming {{also|{{csgobranch}}{{tfbranch}}}}
Line 56: Line 56:
: See [https://github.com/ValveSoftware/source-sdk-2013/issues/562 GitHub post].
: See [https://github.com/ValveSoftware/source-sdk-2013/issues/562 GitHub post].


== Availability ==
== 可用性 ==
Source code (game, tools) for this branch is available on [https://github.com/ValveSoftware/source-sdk-2013/tree/master GitHub].
此分支的源码(游戏、工具)现于[https://github.com/ValveSoftware/source-sdk-2013/tree/master GitHub]可用。


==== Valve ====
==== Valve ====
* {{Code|2004}} {{css|2}} (formerly {{src13mp}}, {{srcmp}}, {{src06}}, {{src04}})
* {{Code|2004}} {{css|2}} (从前于 {{src13mp}}, {{srcmp}}, {{src06}}, {{src04}})
* {{Code|2004}} {{hl2dm|2}} (formerly {{src13mp}}, {{srcmp}}, {{src06}}, {{src04}})
* {{Code|2004}} {{hl2dm|2}} (从前于 {{src13mp}}, {{srcmp}}, {{src06}}, {{src04}})
* {{Code|2005}} {{hldms|2}} (formerly {{src13mp}}, {{src06}}, {{src04}})
* {{Code|2005}} {{hldms|2}} (从前于 {{src13mp}}, {{src06}}, {{src04}})
* {{Code|2005}} {{dods|2}} (formerly {{src13mp}}, {{srcmp}}, {{src07}}, {{src06}})
* {{Code|2005}} {{dods|2}} (从前于 {{src13mp}}, {{srcmp}}, {{src07}}, {{src06}})
* {{Code|2007}} {{tf2|2}} (formerly {{src13mp}}, {{srcmp}}, {{src07}})
* {{Code|2007}} {{tf2|2}} (从前于 {{src13mp}}, {{srcmp}}, {{src07}})
* {{Code|2014}} {{src13mp|4.1|nt=0}} (formerly {{src13mp}}; {{Steam|launch/243750|Click to Install}})
* {{Code|2014}} {{src13mp|4.1|nt=0}} (从前于 {{src13mp}}; {{Steam|launch/243750|点击安装}})
:: {{Note|Mods built on {{src13mp|2|nt=0}} prior to the upgrade to the {{Tf2branch|1}} may not work properly if the mod is launched with updated SDK Base 2013 MP, so if you want to use legacy version of {{src13mp|1|nt=0}} to play older mods (or use older tools), follow the instructions:
:: {{Note|基于{{src13mp|2|nt=0}}(旧版)开发的模组在升级至 {{Tf2branch|1}} 后可能无法正常运行。若需使用旧版{{src13mp|1|nt=0}}运行早期模组(或使用旧版SDK工具),请按以下步骤操作:
::# Open Steam, go to '''Source SDK 2013 Multiplayer''', right click Properties
::# 启动 Steam 客户端,找到 '''Source SDK 2013 Multiplayer''' 右键选择"属性"。
::# A window will open. Go to "Betas", select {{Code|previous2021}} beta branch.
::# 在弹出的属性窗口中,进入"测试版"标签页,选择 {{Code|previous2021}} 测试版分支。
::# Steam will automatically re-download the files. Once it's done, run Source SDK Base 2013 MP as normal, or use it's tools.
::# Steam 将自动重新下载旧版文件(版本回滚)。下载完成后,可正常启动"Source SDK Base 2013 MP"或使用其配套工具
}}
}}
{{Branch-navbox}}
{{Branch-navbox}}
{{ACategory|First-party engine branches}}
{{ACategory|First-party engine branches}}

Revision as of 23:13, 22 February 2025

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)

English (en)Русский (ru)中文 (zh)Translate (Translate)
Broom icon.png
This article or section needs to be updated to include current information regarding the subject because:
所有第一方游戏现均已运行在此分支上。更新所有其他页面,将提及的起源2013 多人分支替换为军团要塞2分支,并为此页面添加新功能(若有)。若某处标注(存在于 起源2013 多人分支 之中),请统一改为(存在于自 起源2013 多人分支 以来)
Remember to check for any notes left by the tagger at this article's talk page.

军团要塞2分支 军团要塞2分支 (亦称Source 2013多人模式v2或简称TF2分支) 是 起源2013 多人分支 起源2013 多人分支 的更新版本,基于 军团要塞2 军团要塞2 的持续更新开发而成。在“半条命2”的20周年更新后, 半衰期2:死亡竞赛 也升级至该分支。截至2025年2月18日(CST:2月19日),所有剩余的 起源2013 多人分支 游戏(反恐精英:起源, 半衰期死亡竞赛:起源, 胜利之日:起源起源2013 多人分支 SDK)均已升级至此分支。

该分支新增了多项功能,其中包含源自 半衰期2 20周年庆更新的技术特性,以及 求生之路 引擎分支 及后续分支的兼容性改进等优化方案

需要注意的是,基于{{src13mp|1}(也称为起源2013 多人分支 旧版)开发的模组和工具将无法在此分支运行,因存在ABI(应用程序二进制接口)不兼容问题。

特性

起源2013 多人分支 起源2013 多人分支 分支更新以来:

Wikipedia icon 64 位二进制文件 (也存在于 Garry's Mod 之中)
使游戏可访问超过4GB内存,性能略有提升。SDK 工具中的 Hammer、地图编译器(VBSPVVISVRAD)等也提供64位版本。
Note.png注意:Mac平台不支持64位运行
VScript(en) (也存在于 Mapbase 地狱已满 求生之路 引擎分支 传送门 2 引擎分支 CS:GO 引擎分支 之中)
基于Squirrel Squirrel语言的全新脚本系统,支持深度游戏逻辑定制。第三方游戏可能采用不同的VScript实现方案
WebM(en) 视频播放 (也存在于 Hunt Down the Freeman Garry's Mod 反恐精英:全球攻势 地层起源 之中)
替代Bink(en)视频编解码器,用于游戏开场动画与过场动画。WebM格式在保持画质前提下显著缩小文件体积。
Vulkan(en) 渲染器 (也存在于 半衰期2 传送门 求生之路2 传送门 2 引擎分支 CS:GO 引擎分支 地层起源 Xengine 之中)
跨平台低开销图形API, 继承OpenGL(en)
2022 年随适配 Steam Deck 的 半衰期2传送门 更新首次推出,后在 军团要塞2 64位更新期间(2024 年)正式集成。Portal with RTX 也采用 Vulkan 作为光追改造(RTX Remix)的一部分。使用DXVK,一个用于将Direct3D调用转换为Vulkan的库。默认禁用,可通过启动项添加 -vulkan 启用。
VGUI(en)Wikipedia icon DPI 支持 (也存在于 半衰期2 20周年更新 之中)
实现4K(3840x2160)等高分屏下界面元素的精准缩放
Steam 网络
通过Steam 数据报中继实现自建服,无需端口转发即可创建可加入的服务器。
Wikipedia icon zh:Bicubic 贴图过滤 (也存在于 半衰期2 20周年更新 半衰期:起源 之中)
2024年新增特性,在启用 r_lightmap_bicubic 参数后,可平滑处理光贴图(en)低分辨率导致的锯齿问题。也可通过将"着色器细节"设为"极高"自动启用。
径向雾效果(en) (也存在于 Mapbase 求生之路 引擎分支 异形丛生 引擎分支 传送门 2 引擎分支CS:GO 引擎分支 地层起源 半衰期2 20周年更新 之中)
区别于平面雾效,摄像机旋转时不会改变特定区域的雾浓度表现(增强/减弱)。
可通过 env_fog_controller 的"使用径向雾(fogRadial)"关键帧值,可以使用径向雾或基于平面的雾。
Texture streaming (也存在于 CS:GO 引擎分支泰坦陨落 引擎分支 之中)
Reduces system RAM and graphics card VRAM usage by streaming textures as needed instead of loading them all when loading the map.
Swaying trees(en) (也存在于 Garry's Mod Mapbase 求生之路 引擎分支 异形丛生 引擎分支 传送门 2 引擎分支 CS:GO 引擎分支 地层起源 Xengine 之中)
Introduced in Jungle Inferno update. A material parameter that gives the effect of trees swaying in the wind.
Removal of Miles Sound System middleware
Uses open-source minimp3 minimp3 for MP3(en) playback instead. Files related to Miles Sound System will remain on the game's 🖿bin folder, but left unused.
Updated shader compilation tools
Now by default SCell555's shader compiler is included in the SDK.
Numerous security fixes
See GitHub post.

可用性

此分支的源码(游戏、工具)现于GitHub可用。

Valve

Note.png注意:基于起源2013 多人分支 Source SDK Base 2013 - Multiplayer(旧版)开发的模组在升级至 军团要塞2分支 后可能无法正常运行。若需使用旧版Source SDK Base 2013 - Multiplayer运行早期模组(或使用旧版SDK工具),请按以下步骤操作:
  1. 启动 Steam 客户端,找到 Source SDK 2013 Multiplayer 右键选择"属性"。
  2. 在弹出的属性窗口中,进入"测试版"标签页,选择 previous2021 测试版分支。
  3. Steam 将自动重新下载旧版文件(版本回滚)。下载完成后,可正常启动"Source SDK Base 2013 MP"或使用其配套工具