Collision/zh: Difference between revisions

From DDraceNetwork
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{MigrateTranslation}}
<languages/>
<languages/>
{{Stub}}
{{Stub}}
<div lang="en" dir="ltr" class="mw-content-ltr">
'''碰撞'''是一种[[Special:MyLanguage/world|地图]]中会发生在玩家与实体、拋射物之间的交互效果。
'''''Collision''''' occurs between tiles, tees, and projectiles in the [[Special:MyLanguage/world|world]].
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
介绍碰撞前,我们需要理解单位长度的概念。
Imagine each [[Special:MyLanguage/Tiles|tile]] being made up of a matrix of smaller, sub-squares. Each of these sub-squares represents a single, unique position that a tee can occupy at any given time, with one sub-square representing a possible center of a tee's position.
* One tile in the world has a width and height of 32 units. (This means a tee can occupy a total of 1024 unique positions inside a single tile.)
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
想象一下,每一格网格都是由许多最小的[[Special:MyLanguage/Tiles|正方形单元]]构成的,我们称这种最小的正方形单元为单位长度。
==Tile Collision==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
每一个单位长度都代表着可以一个玩家在任何一个给定的时间里占据的一个单一的、独一无二的位置。每一个单位长度都可能代表一个玩家的中心位置。
Different tiles have different collision hitboxes. In respect to the center position of a tee:
</div>
*<span lang="en" dir="ltr" class="mw-content-ltr">Standard DDRace tiles (the vast majority of tiles unique to DDRace modes, such as [[Special:MyLanguage/Freeze|freeze]] and [[Special:MyLanguage/teleporter|tele]]) have a square hitbox of <code>32x32</code> units.</span>
*<span lang="en" dir="ltr" class="mw-content-ltr">{{TileLink|{{Tile|game|2}}|Death|Kill}} [[Special:MyLanguage/Tiles|tiles]] have a square hitbox of <code>50x50</code> units.</span>
*<span lang="en" dir="ltr" class="mw-content-ltr">Solid [[Special:MyLanguage/Tiles|tiles]] ({{Tile|entities|3}} unhookable, {{Tile|entities|1}} hookable, hookthrough) have a square hitbox of <code>60x60</code> units.</span>
*<span lang="en" dir="ltr" class="mw-content-ltr">Freeze lasers are complicated. Assuming a freeze laser pointing upwards with the source entity at the bottom (which creates a "top" freeze laser at the uppermost tile, 2 full tiles of vertical freeze laser in the middle, and a bottom "source" laser tile.):</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">From the side, they will freeze a distance of <code>28</code> units left and right from the center.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">From the top, they have a hitbox radius of units <code>27</code> units upwards from the center.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">From the side, they will freeze a distance of <code>28</code> units downwards from the center.</span>
*<span lang="en" dir="ltr" class="mw-content-ltr">Stoppers are a little more complicated. Be aware - since stoppers are easily skippable, these hitboxes don't mean much due to the fact that one can easily skip several units through a stopper with speed.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">{{Tile|entities|60}} 1-way stoppers (assumed to be pointing upwards) will prevent further downwards motion starting a distance <code>34</code> units upwards from the center but <code>16</code> units leftwards, rightwards, and downwards from the center.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">{{Tile|entities|61}} 2-way stoppers (assumed to be pointing up and down) will prevent inwards motion starting a distance <code>34</code> units upwards and downwards from the center but <code>16</code> units left and right from the center.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">{{Tile|entities|62}} 4-way stoppers will prevent inwards motion starting a distance <code>34</code> units in all directions from the center. Keep in mind that the hitbox is "+" shaped rather than square shaped.</span>
**<span lang="en" dir="ltr" class="mw-content-ltr">Tees can dash through [[Special:MyLanguage/Stoppers|stoppers]] with {{Ninja}}</span>
*<span lang="en" dir="ltr" class="mw-content-ltr">Doors are handled internally the same as stoppers, so are skippable the same way with speed.</span>


<div lang="en" dir="ltr" class="mw-content-ltr">
* 一格网格在地图中的大小为一个<code>32*32</code>个单位长度的正方形,这表明一名玩家可以在一格网格中占据<code>1024</code>个独一无二的位置。
==Tee Collision==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Tile_Collision"></span>
Tees collide with other tees as circles with diameter of 28 units, although tees already interact if they come as close as 35 units. Tees gain speed in the opposite direction of the interaction point, and the amount of speed gained depends on the distance between the two tees during the collision (the farther away the less speed gained) as well as the angle at which they bump into each other (when moving directly into the direction of the other tee, the most speed is added). [[Special:MyLanguage/Hook#Weak hook .2F strong hook|Strong and weak]] also play a role, with strong tees bumping a bit more than tees with weak.
== 实体接触 ==
</div>


不同的实体拥有不同的碰撞箱体积。


<div lang="en" dir="ltr" class="mw-content-ltr">
考虑玩家的中心点,在靠近某些实体后会判定和实体发生接触(碰撞):
== Projectile Collision ==
** 多数标准DDRace实体(多数实体都是DDRace模式独有的,例如[[Special:MyLanguage/Freeze|冻结]]区域和[[Special:MyLanguage/teleporter|传送]]区域)的碰撞体积为<code>32x32</code>个单位长度的正方形区域,玩家接触会触发对应效果;
</div>
** {{TileLink|{{Tile|game|2}}|Death/zh|死亡}} [[Special:MyLanguage/Tiles|区域]]的碰撞体积为<code>50x50</code>个单位长度的正方形区域,玩家接触会触发[[Special:MyLanguage/Death|死亡]];
** [[Special:MyLanguage/Tiles|墙体]](包括{{Tile|entities|3}}不可钩墙体,{{Tile|entities|1}}可钩墙体和可穿透墙体)的碰撞体积为<code>60*60</code>个单位长度的正方形区域,会阻止玩家进入其中;
** 冻结激光方块的情况较为复杂。我们假定一束冻结激光垂直向上发射,发射点位于底部:(这束激光由“顶部”,中间两格高的光线,和最底部的光源组成。)
**** 对于中间光线的左右两侧,冻结的判定区域从中线开始,向左右各延伸<code>28</code>个单位长度;
**** 对于“顶部”,冻结的判定区域从中心点开始,半径为<code>27</code>个单位长度的圆形区域;
**** 对于底部光源,冻结的判定区域是从中心开始,向下延伸<code>28</code>个单位长度的区域。
 
需要注意的一点是冻结激光是可以平移和旋转的,这种情况下判定十分复杂。
** 阻滞器的情况会更加复杂一些。请注意——由于阻滞器容易被穿过,因此在拥有足够大的速度去穿过阻滞器的情况下讨论单向板的碰撞体积没有多大的意义:
*** {{Tile|entities|60}}单向阻滞器(假定向上)的判定区域为从中心开始,向上延伸<code>34</code>个单位长度的距离,向左、向右和向下延伸<code>16</code>个单位长度的距离,当玩家与之发生碰撞时,单向阻滞器会阻止玩家向与箭头相反的方向移动;
**** {{Tile|entities|61}}双向阻滞器(假定向上和向下)的判定区域为从中心开始,向上和向下延伸<code>34</code>个单位长度的距离,向左和向右延伸<code>16</code>个单位长度的距离,当玩家与之发生碰撞时,双向阻滞器会阻止玩家向着双向板的方向移动;
**** {{Tile|entities|62}}四向(全向)阻滞器的判定区域是从中心开始,向四个正方向分别延伸<code>34</code>个单位长度,当玩家与之发生碰撞时,全向版会阻止玩家向着全向版内部的方向移动。额外需要注意的是,四向阻滞器碰撞箱的形状更类似于符号“+”,而非一个正方形。
**** 玩家可以用{{Ninja|武士刀|zh}}来穿过[[Special:MyLanguage/Stoppers|阻滞器]]
** 激光门的判定方式与阻滞器相同,因此也可以用足够大的速度去穿过。
 
<span id="Tee_Collision"></span>
== 玩家间碰撞 ==
 
Tee的碰撞体积为一个直径为<code>28</code>个单位长度的圆,但实际上当两个玩家的中心距离为<code>35</code>个单位长度时就已经发生了交互。
 
玩家之间发生碰撞后,玩家会获得与碰撞作用点相反方向的速度,获得的速度大小取决于玩家之间发生碰撞时的中心距离(发生碰撞时,中心距离越远,获得的速度越小)以及发生碰撞时的角度(当碰撞的方向与两名玩家的中心连线重合时,可以获得最大的速度)。
 
玩家拥有的[[Hook/zh#弱钩/强钩|钩索强弱等级]]也会影响到碰撞速度。拥有强钩的玩家发生碰撞时会稍微多产生一点速度。
 
 
<span id="Projectile_Collision"></span>
== 拋射物碰撞 ==


{{Todo|Add hitboxes for a [[Special:MyLanguage/Grenade|grenade]]}}
{{Todo|Add hitboxes for a [[Special:MyLanguage/Grenade|grenade]]}}


[[Category:Game-Mechanic{{#translation:}}]]
[[Category:Game-Mechanic{{#translation:}}]]

Latest revision as of 17:54, 4 May 2024

此條目仍需進行內容補充,您可以幫助我們編輯和修訂以擴充其內容。

碰撞是一種地圖中會發生在玩家與實體、拋射物之間的交互效果。

介紹碰撞前,我們需要理解單位長度的概念。

想像一下,每一格網格都是由許多最小的正方形單元構成的,我們稱這種最小的正方形單元為單位長度。

每一個單位長度都代表着可以一個玩家在任何一個給定的時間裏佔據的一個單一的、獨一無二的位置。每一個單位長度都可能代表一個玩家的中心位置。

  • 一格網格在地圖中的大小為一個32*32個單位長度的正方形,這表明一名玩家可以在一格網格中佔據1024個獨一無二的位置。

實體接觸

不同的實體擁有不同的碰撞箱體積。

考慮玩家的中心點,在靠近某些實體後會判定和實體發生接觸(碰撞):

    • 多數標準DDRace實體(多數實體都是DDRace模式獨有的,例如凍結區域和傳送區域)的碰撞體積為32x32個單位長度的正方形區域,玩家接觸會觸發對應效果;
    • 死亡 區域的碰撞體積為50x50個單位長度的正方形區域,玩家接觸會觸發死亡
    • 牆體(包括不可鈎牆體,可鈎牆體和可穿透牆體)的碰撞體積為60*60個單位長度的正方形區域,會阻止玩家進入其中;
    • 凍結激光方塊的情況較為複雜。我們假定一束凍結激光垂直向上發射,發射點位於底部:(這束激光由「頂部」,中間兩格高的光線,和最底部的光源組成。)
        • 對於中間光線的左右兩側,凍結的判定區域從中線開始,向左右各延伸28個單位長度;
        • 對於「頂部」,凍結的判定區域從中心點開始,半徑為27個單位長度的圓形區域;
        • 對於底部光源,凍結的判定區域是從中心開始,向下延伸28個單位長度的區域。

需要注意的一點是凍結激光是可以平移和旋轉的,這種情況下判定十分複雜。

    • 阻滯器的情況會更加複雜一些。請注意——由於阻滯器容易被穿過,因此在擁有足夠大的速度去穿過阻滯器的情況下討論單向板的碰撞體積沒有多大的意義:
      • 單向阻滯器(假定向上)的判定區域為從中心開始,向上延伸34個單位長度的距離,向左、向右和向下延伸16個單位長度的距離,當玩家與之發生碰撞時,單向阻滯器會阻止玩家向與箭頭相反的方向移動;
        • 雙向阻滯器(假定向上和向下)的判定區域為從中心開始,向上和向下延伸34個單位長度的距離,向左和向右延伸16個單位長度的距離,當玩家與之發生碰撞時,雙向阻滯器會阻止玩家向着雙向板的方向移動;
        • 四向(全向)阻滯器的判定區域是從中心開始,向四個正方向分別延伸34個單位長度,當玩家與之發生碰撞時,全向版會阻止玩家向着全向版內部的方向移動。額外需要注意的是,四向阻滯器碰撞箱的形狀更類似於符號「+」,而非一個正方形。
        • 玩家可以用 武士刀來穿過阻滯器
    • 激光門的判定方式與阻滯器相同,因此也可以用足夠大的速度去穿過。

玩家間碰撞

Tee的碰撞體積為一個直徑為28個單位長度的圓,但實際上當兩個玩家的中心距離為35個單位長度時就已經發生了交互。

玩家之間發生碰撞後,玩家會獲得與碰撞作用點相反方向的速度,獲得的速度大小取決於玩家之間發生碰撞時的中心距離(發生碰撞時,中心距離越遠,獲得的速度越小)以及發生碰撞時的角度(當碰撞的方向與兩名玩家的中心連線重合時,可以獲得最大的速度)。

玩家擁有的鈎索強弱等級也會影響到碰撞速度。擁有強鈎的玩家發生碰撞時會稍微多產生一點速度。


拋射物碰撞

待辦: Add hitboxes for a grenade