欢迎光临散文网 会员登陆 & 注册

复古即时战略游戏 - D.O.R.F. - 2023.02.18 - 开发日志 - 移动基地预览

2023-02-19 07:41 作者:Oscar-Mervin_陈辰尘  | 我要投稿

所以,根据之前的民意调查,你们最想看到的是 NWO 移动基地。好消息是我确实有一个工作预览,坏消息是当前的引擎限制意味着它暂时会非常糟糕。


如您所见,视觉上有些奇怪,即奇怪的阴影对齐,以及船体不会随着腿部运动上下摆动的事实。更详细地说,引擎当前渲染阴影的方法非常基本——阴影只是覆盖在地面上的一系列单独的帧。这可能适用于更简单的 2D RTS,但考虑到 DORF 的 2.5D 性质——所有资产都是 2D 精灵,但游戏世界本身是 3D——这实际上行不通。我之前已经提到过,但我们确实计划最终对引擎中的光影工作方式进行全面修订,这将允许灯光将阴影真实地投射到其他物体上,尽管是 2D 图形,尽管这有点方式关闭。摆动效果会更容易实现,看到引擎已经包含了执行此操作的方法,但是它需要一些细微的调整。目前bob效果会影响整个物体,所以如果在这里使用它,腿会随着船体上下倾斜,这是不可用的。 

另外需要注意的是,腿与船体是分开渲染的。这允许使用减少 sprite 表的大小,因为上面结构中的四个腿是同一 sprite 序列的一部分。这些腿也将用于所有 NWO 移动结构,以避免必须为每个建筑物创建新动画的大量工作量,并且(再一次)避免进一步膨胀游戏已经很大的精灵表。

当然,还需要修改引擎处理静态时部署和创建单位的步行结构的方式。为了提供一些游戏玩法见解,NWO 生产结构虽然是移动的,但仍需要通过工人单位建造,并且需要部署才能正常运行。将它们想象成星际争霸中的人族建筑,只是它们会走路而不是飞翔。另请注意,您不能只是将它们停在敌人基地旁边并开始抽出单位,因为您需要为他们建立供应链以确保他们实际上拥有资源来抽出单位。

正如您可能已经猜到的那样,不仅存在视觉问题,而且行走基地的实际功能机制也存在一些问题。寻路逻辑将需要重新设计以允许单位大小为多个图块 - 目前,虽然步兵小于单个图块(每个图块可以包含五个步兵单位,使用子单元逻辑),但车辆不能大于单个图块瓷砖,就碰撞大小而言。因此,这些巨大的行走结构(以及其他大型单位,例如重型坦克和海军战舰)在游戏过程中经常会穿过彼此和其他物体,直到实现这种新的多图块单位碰撞逻辑。

还有一些其他问题:

如您所见,步兵在创建时似乎只是从斜坡上滑下来。这是由于单位在进出建筑物时授予 ZOffset 的疏忽(如果您希望他们上下楼梯,或者在本例中为斜坡),这导致他们被游戏视为空降,因此在它们到达地面之前不会播放动画。虽然这不是一个非常复杂的问题,但这只是让这些步行基地发挥作用必须克服的众多问题之一。

需要注意的另一件事是并非*每个* NWO 结构都是可移动的。他们的武器库将包括诸如墙壁、大门和静态防御结构之类的东西,以及一些旨在快速且廉价地建造的支撑结构。

这就是本次更新的全部内容,但请注意有关实施更多 NWO 基地建筑和结构的其他更新。

- 亨斯克

原文内容


So, based on the previous poll, you guys mostly wanted to see NWO mobile bases. Good news is I do have a working preview of that, the bad news is current engine limitations means it will be pretty janky, for the time being.


As you can see, there is some strangeness going on visually, namely odd shadow alignments, and the fact that the hull doesn't bob up and down with the leg movements. To get into greater detail, the engine's current method of rendering shadows is extremely basic - shadows are just a separate series of frames that are overlaid onto the ground. This might work in a more simple 2D RTS, but given the 2.5D nature of DORF - where all assets are 2D sprites, but the game world itself is 3D - this won't really work. I've mentioned it before but we do plan on eventually implementing a total revision of the way light and shadows in the engine work, which will allow for lights to cast shadows onto other objects realistically, despite the 2D graphics, though this is a little ways off. The bobbing effect will be much easier to implement, seeing as the engine already includes a way to do this, however it needs some slight tweaking. Currently the bob effect will affect the entire object, so if it were used here, the legs would dip up and down along with the hull, which isn't useable. 

An additional note is that the legs are rendered separately from the hull. This allows use to reduce the sprite sheet size, since the four legs in the structure above are part of the same sprite sequence. These legs will also be used for all NWO mobile structures, to avoid the massive workload of having to create new animations for every single building, and (once again) to avoid further bloating the game's already large sprite sheet.

Of course, there will also need to be revisions to how the engine handles things in regards to walking structures deploying and creating units when static. To give some gameplay insights, NWO production structures, while mobile, will still need to be constructed via worker units, and will need to deploy to function properly. Think of them like Terran buildings from Starcraft, except they walk instead of fly. Also note that you can't just park these next to the enemy base and start pumping out units, since you will need to establish a supply chain to them to ensure that they actually have the resources to pump out units in the first place.

As you may have guessed, there's not just visual issues, but also some jank with the actual functional mechanics of walking bases. Pathfinding logic will need to be reworked to allow for units that are multiple tiles in size - currently, while infantry are smaller than a single tile (each tile can contain five infantry units, using subcell logic), vehicles can be no bigger than a single tile, in terms of collision size. So these massive walking structures (as well as other large units, such as Heavy Tanks and naval warships) will often clip through eachother and other objects during gameplay, until this new multi-tile unit collision logic is implemented.

There's a few other issues, too:


As you can see, the infantry seems to just slide down the ramp when created. This is due to an oversight that units granted a ZOffset when moving in or out of buildings (in case you want them moving up or down stairs, or in this case, a ramp), which results in them being considered as airborne by the game, and thus no animation is played until they reach the ground level. While not a massively complex issue, this is just one of many problems that will have to be overcome to get these walking bases working.

One more thing to note is not *every* NWO structure will be mobile. Their arsenal will include things such as walls, gates and static defensive structures, as well as a few support structures meant to be built quickly and cheaply.

That's all for this update, but look out for additional updates regarding implementing more NWO base buildings and structures.

- Henske



复古即时战略游戏 - D.O.R.F. - 2023.02.18 - 开发日志 - 移动基地预览的评论 (共 条)

分享到微博请遵守国家法律