復(fù)古即時戰(zhàn)略游戲 - D.O.R.F. - 2023.02.18 - 開發(fā)日志 - 移動基地預(yù)覽
所以,根據(jù)之前的民意調(diào)查,你們最想看到的是 NWO 移動基地。好消息是我確實有一個工作預(yù)覽,壞消息是當(dāng)前的引擎限制意味著它暫時會非常糟糕。

如您所見,視覺上有些奇怪,即奇怪的陰影對齊,以及船體不會隨著腿部運動上下擺動的事實。更詳細(xì)地說,引擎當(dāng)前渲染陰影的方法非?;尽幱爸皇歉采w在地面上的一系列單獨的幀。這可能適用于更簡單的 2D RTS,但考慮到 DORF 的 2.5D 性質(zhì)——所有資產(chǎn)都是 2D 精靈,但游戲世界本身是 3D——這實際上行不通。我之前已經(jīng)提到過,但我們確實計劃最終對引擎中的光影工作方式進行全面修訂,這將允許燈光將陰影真實地投射到其他物體上,盡管是 2D 圖形,盡管這有點方式關(guān)閉。擺動效果會更容易實現(xiàn),看到引擎已經(jīng)包含了執(zhí)行此操作的方法,但是它需要一些細(xì)微的調(diào)整。目前bob效果會影響整個物體,所以如果在這里使用它,腿會隨著船體上下傾斜,這是不可用的。?
另外需要注意的是,腿與船體是分開渲染的。這允許使用減少 sprite 表的大小,因為上面結(jié)構(gòu)中的四個腿是同一 sprite 序列的一部分。這些腿也將用于所有 NWO 移動結(jié)構(gòu),以避免必須為每個建筑物創(chuàng)建新動畫的大量工作量,并且(再一次)避免進一步膨脹游戲已經(jīng)很大的精靈表。
當(dāng)然,還需要修改引擎處理靜態(tài)時部署和創(chuàng)建單位的步行結(jié)構(gòu)的方式。為了提供一些游戲玩法見解,NWO 生產(chǎn)結(jié)構(gòu)雖然是移動的,但仍需要通過工人單位建造,并且需要部署才能正常運行。將它們想象成星際爭霸中的人族建筑,只是它們會走路而不是飛翔。另請注意,您不能只是將它們停在敵人基地旁邊并開始抽出單位,因為您需要為他們建立供應(yīng)鏈以確保他們實際上擁有資源來抽出單位。
正如您可能已經(jīng)猜到的那樣,不僅存在視覺問題,而且行走基地的實際功能機制也存在一些問題。尋路邏輯將需要重新設(shè)計以允許單位大小為多個圖塊 - 目前,雖然步兵小于單個圖塊(每個圖塊可以包含五個步兵單位,使用子單元邏輯),但車輛不能大于單個圖塊瓷磚,就碰撞大小而言。因此,這些巨大的行走結(jié)構(gòu)(以及其他大型單位,例如重型坦克和海軍戰(zhàn)艦)在游戲過程中經(jīng)常會穿過彼此和其他物體,直到實現(xiàn)這種新的多圖塊單位碰撞邏輯。
還有一些其他問題:

如您所見,步兵在創(chuàng)建時似乎只是從斜坡上滑下來。這是由于單位在進出建筑物時授予 ZOffset 的疏忽(如果您希望他們上下樓梯,或者在本例中為斜坡),這導(dǎo)致他們被游戲視為空降,因此在它們到達地面之前不會播放動畫。雖然這不是一個非常復(fù)雜的問題,但這只是讓這些步行基地發(fā)揮作用必須克服的眾多問題之一。
需要注意的另一件事是并非*每個* NWO 結(jié)構(gòu)都是可移動的。他們的武器庫將包括諸如墻壁、大門和靜態(tài)防御結(jié)構(gòu)之類的東西,以及一些旨在快速且廉價地建造的支撐結(jié)構(gòu)。
這就是本次更新的全部內(nèi)容,但請注意有關(guān)實施更多 NWO 基地建筑和結(jié)構(gòu)的其他更新。
- 亨斯克

原文內(nèi)容
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