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