Collision/zh: Difference between revisions

From DDraceNetwork
(Updating to match new version of source page)
(Created page with "* 冻结激光的情况较为复杂。我们假定一束冻结激光垂直向上发射,发射点位于底部:(这束激光由最顶部的冻结激光,中间两格网格高的冻结激光,和最底部的光束光源组成。)")
Line 2: Line 2:
<languages/>
<languages/>
{{Stub}}
{{Stub}}
<div lang="en" dir="ltr" class="mw-content-ltr">
'''碰撞'''是一种[[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">
想象一下,每一格网格都是由许多最小的正方形单元构成的,我们称这种最小的正方形单元为单位长度。
==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模式独有的,例如冻结区域和传送区域)的碰撞体积为<code>32*32</code>个单位长度的正方形区域;
</div>
** 死亡区域的碰撞体积为<code>50*50</code>个单位长度的正方形区域;
** 墙体实体(包括可钩墙体,禁钩墙体和钩穿墙体)的碰撞体积为<code>60*60</code>个单位长度的正方形区域;
** 冻结激光的情况较为复杂。我们假定一束冻结激光垂直向上发射,发射点位于底部:(这束激光由最顶部的冻结激光,中间两格网格高的冻结激光,和最底部的光束光源组成。)
**** 对于左右两侧,冻结的判定区域为从中心开始,向左右各延伸<code>28</code>个单位长度;
**** 对于顶部,冻结的判定区域为从中心开始,半径为<code>27</code>个单位长度的圆形区域;
**** 对于底部,冻结的判定区域是从中心开始,向下延伸<code>28</code>个单位长度的区域。
** 单向板的情况会更加复杂一些。请注意——由于单向板容易被穿过,因此在拥有足够大的速度去穿过单向板的情况下讨论单向板的碰撞体积没有多大的意义:
**** 单向板(假定向上)的判定区域为从中心开始,向上延伸<code>34</code>个单位长度的距离,向左、向右和向下延伸<code>16</code>个单位长度的距离,当玩家与之发生碰撞时,单向板会阻止玩家向与箭头相反的方向移动;
**** 双向板(假定向上和向下)的判定区域为从中心开始,向上和向下延伸<code>34</code>个单位长度的距离,向左和向右延伸<code>16</code>个单位长度的距离,当玩家与之发生碰撞时,双向板会阻止玩家向着双向板的方向移动;
**** 全向板的判定区域是从中心开始,向四个正方向分别延伸<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:}}]]

Revision as of 02:30, 16 March 2023

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

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

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

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

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

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

實體碰撞

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

相對於玩家的中心位置:

    • 多數標準DDRace實體(多數實體都是DDRace模式獨有的,例如凍結區域和傳送區域)的碰撞體積為32*32個單位長度的正方形區域;
    • 死亡區域的碰撞體積為50*50個單位長度的正方形區域;
    • 牆體實體(包括可鈎牆體,禁鈎牆體和鈎穿牆體)的碰撞體積為60*60個單位長度的正方形區域;
    • 凍結激光的情況較為複雜。我們假定一束凍結激光垂直向上發射,發射點位於底部:(這束激光由最頂部的凍結激光,中間兩格網格高的凍結激光,和最底部的光束光源組成。)
        • 對於左右兩側,凍結的判定區域為從中心開始,向左右各延伸28個單位長度;
        • 對於頂部,凍結的判定區域為從中心開始,半徑為27個單位長度的圓形區域;
        • 對於底部,凍結的判定區域是從中心開始,向下延伸28個單位長度的區域。
    • 單向板的情況會更加複雜一些。請注意——由於單向板容易被穿過,因此在擁有足夠大的速度去穿過單向板的情況下討論單向板的碰撞體積沒有多大的意義:
        • 單向板(假定向上)的判定區域為從中心開始,向上延伸34個單位長度的距離,向左、向右和向下延伸16個單位長度的距離,當玩家與之發生碰撞時,單向板會阻止玩家向與箭頭相反的方向移動;
        • 雙向板(假定向上和向下)的判定區域為從中心開始,向上和向下延伸34個單位長度的距離,向左和向右延伸16個單位長度的距離,當玩家與之發生碰撞時,雙向板會阻止玩家向着雙向板的方向移動;
        • 全向板的判定區域是從中心開始,向四個正方向分別延伸34個單位長度,當玩家與之發生碰撞時,全向版會阻止玩家向着全向版內部的方向移動。額外需要注意的是,全向版碰撞箱的形狀更類似於符號「+」,而非一個正方形。
        • 玩家可以用 武士刀來穿過單向板
    • 激光門的判定方式與單向板相同,因此也可以用足夠大的速度去穿過。

玩家碰撞

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

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

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


拋射物碰撞

待辦: Add hitboxes for a grenade