- UID
- 67833
- 帖子
- 17050
- 积分
- 75043
- 阅读权限
- 90
- 注册时间
- 2007-8-29
- 最后登录
- 2015-6-19
- 在线时间
- 12892 小时
|
本帖最后由 KoMoS 于 2009-3-28 13:27 编辑
昨天看到有人转帖(http://bbs.8da.com/thread-685468-1-1.html)说到用水晶来计算星际里的兵种射程, 方法是不错, 不过星际里的度量单位其实本质就是像素.
众所周知星际是固定分辨率是640X480, 在2D游戏制作中最精确的判断就是像素级别的了.
先引用官方资料里来说明, 一个星际单位 == 32个像素.
Maelstrom
100 100
Cost: 100 ![]()
Range: 10
All living things have minds for the Dark Archon to shape and mold. With a powerful surge of mental energy the Dark Archon can stun a group of erstwhile attackers.
Maelstrom is an area of effect(3 matrix radius, 1 matrix = 32 pixels) ability that will instantlystun (prevents the affected units from moving, attacking, or utilizingany special abilities) all organic ground or air units for 180 cycles(or ~12 seconds on Normal Game Speed). Once cast, be sure to haveattack units ready to strike the frozen units as soon as possible sothat you can take full advantage of the situation in the short timethatthe Maelstrom is in effect.
以上是官方对红球大漩涡的注释, 关键就是说明了一个星际单位的实际大小. 通常龙骑所说的6射程, 就是6X32 = 192个像素.
一个神族Pylon 是64X64. 所以用昨天那贴的论据也可以证明这点 , 64X3 = 192 个像素.
在这里,我用水晶作为工具,来计算射程,如图,射程好之后,为6,中间搁3水晶打中目标,那么平均下,一个水晶为2。
所以星际中的一屏就是宽20个的单位, 高15个单位, 出去小地图和工具栏, 所以坦克纵向是可以打全屏的. 再来说说为什么 坦克和Lurker 的射程在官方资料上都为6,
但是坦克可以平推打Lurker的原因. 坦克的攻击方式是比较特殊的, 没有弹道, 同样的还有Marine. Lurker的攻击也很特殊, 只产生6个小实体单位, 这也是Lurker存在致命一击的原因.
一个小实体地刺是一个单位大小, 32个像素. 如果在程序中判断, 坦克是否可以攻击 用的是 A-B <= 6 , 这样埋地的Lurker和坦克的距离刚好6,也就是192个像素的时候, 坦克就可以发炮,
并命中单位(坦克除了高低地 丛林攻击,应该是不存在miss的), 而Lurker的攻击判定, 是在 A ,B 之间按顺序放下6个地刺实体, 实体单位没用攻击到对象, 是通过像素碰撞,
也就是像素是否重叠来计算的. 所以 A-B == 6 的时候, 就算放出6个地刺, 最后的那个地刺依然没有和坦克产生像素重叠, 也就不能造成伤害, 所以推断地刺的攻击判断是A-B <192 像素
才会发生. 同时地刺的攻击是有溅射的, 溅射半径是50个像素, 所以你在Lurker射程极限的位置,放置一条狗, 强A之, 命中后的溅射可以伤害到射程之外的单位. 上面这些是我的推论,
我也没福气看到星际的源码. 附上官网对LUrker的攻击描述.
Once underground, a Lurker canutilize a series of spines that rip up through the ground in a straightline from the Lurker to its target. These spines continue to theirmaximum attack range, regardless of where the targeted unit lies withinthat path and every enemy unit in the path of the spines will takedamage. Note, however, that the damage will also be inflicted on alliedunits as well, so take caution when attackingwith an ally, lest the Lurkers ravage friendly forces as well.
PS: 龙骑这种攻击方式, 子弹射程为6 , 子弹本身也有碰撞体积, 而且肯定>=1 像素 , 所以坦克平推白打提射龙骑是不可能的 |
|