Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Idea for implementing ships (Adventure Mode)  (Read 1261 times)

ribab

  • Escaped Lunatic
    • View Profile
Idea for implementing ships (Adventure Mode)
« on: March 30, 2016, 10:38:13 pm »

I have an idea for how to implement ships while reusing current features in Dwarf Fortress. My idea works despite Dwarf Fortress being tile-based.

My idea is that ships can only be controlled while in a mode similar to fast-travel. Ranged ship-to-ship combat is also in the "fast-travel" mode, however boarding and anchoring brings the game back to the regular mode.

Attacking another ship would have the same controls as shooting a ranged weapon, and boarding/ramming a ship would have the same controls as melee-attacking. The difference is once the ship has been boarded, the players transition to ship-to-ship-boarding-mode where the two ships are lined up side by side and the player and NPCs fight like normal.

When a ship is parked, it is either horizontal or vertical, and you can walk around it. Parking a ship in a shipyard is as simple as "boarding" with a shipyard. Another way of parking a ship is to just anchor it and then leave it and row or swim to shore. The rowboats have the same mechanic of "fast-traveling" as ships do, with the option of being able to dock on any shore, albeit being a lot slower than ships, making long journeys unfeasible due to hunger/thirst issues.
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Idea for implementing ships (Adventure Mode)
« Reply #1 on: March 30, 2016, 11:16:48 pm »

It would be good if ships suffered realistic damage too. Tile-based Ultima IV and V used to have a similar combat system. Ranged cannons, close-up battle screen for boarding and being attacked by giant squid.

All very fun, but I want a giant sperm whale to be a terrifying encounter. One that without some kind of magic, or a quick, well placed blow to the skull will have you swimming around the wrekage of your boat in no time (before being eaten). I'm assuming here that multi-tile monstrosities will already be implemented by the time we get to boats which would make encounters very Fun.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Idea for implementing ships (Adventure Mode)
« Reply #2 on: March 30, 2016, 11:34:59 pm »

Fast travel as a way of avoiding the hassles of making multi-tile structures move would not really help much of anything. 

For starters, Toady already wants moving fortress pieces, and by extension, the capacity for multi-tile vehicles existing inside Fortress Mode, so there would be little reason to try making a "shortcut" that he'd have to take the long way around eventually, anyway.

Another issue is that the multi-tile vehicle like a ship would still need to move from one location to another, it's just that fast travel movement would make a "large jump" in position that is actually tracked.  (That is, the game would need to recognize what tiles are "part of the ship", and what tiles aren't, so as to recognize what things move when you start sailing, and what is left behind.  Some vehicle mods with Minecraft have problems with this, with zepplins taking chunks of nearby hills with them as they fly away, for example, just because it was caught up in the zone declared "part of the ship".)

If you are capable of moving a ship one jump in position, you're capable of moving it many successive jumps in position, so you obviate the need for a fast travel mode, as well. 

Really, the biggest problem is likely just the fact that, being a totally grid-based system, DF has to deal with "snapping" 90 degree turns (or deal with a possibly even stranger or more complex 45 degree turn system)... plus that whole fact that DF's map system just flat-out isn't made for moving pieces of terrain.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Etc_Guy

  • Bay Watcher
    • View Profile
Re: Idea for implementing ships (Adventure Mode)
« Reply #3 on: April 01, 2016, 09:28:57 am »

Boats could be similar to wagons. They hold goods, entities, and float to shore instead of always being on land. hUmans and elves could trade with your fort with goblins coming by too even if on an isolated island. So boats won't just be usable in adventure mode by the player if they act similar to wagons.... I think.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Idea for implementing ships (Adventure Mode)
« Reply #4 on: April 01, 2016, 10:45:31 am »

Boats could be similar to wagons. They hold goods, entities, and float to shore instead of always being on land. hUmans and elves could trade with your fort with goblins coming by too even if on an isolated island. So boats won't just be usable in adventure mode by the player if they act similar to wagons.... I think.

Have you noticed how wagons actually work, though? There's a reason they're a lone exception.

Their pathfinding relies upon them only having one "real" tile the occupy, in the middle.  The eight edge tiles are just painted on, which is why most of the wagon can hover over the edge of a mountain when going over ramps. The connectivity map that tells them where they can go basically just looks for impassible walls like normal, then pushes in one more tile - something only applicable to a 3x3 "creature", not any other shape. 

Then there's combat.  Wagons are very shy and currently cease existing if they see a hostile creature or a corpse.  This is a quick-and-dirty hack to keep them from crashing the game, which is why they weren't in the game for several versions before that.  If a wagon was ever seen as a target (which enemies would do, because there are no vehicles in DF, there are wagon creatures made of wagon wood creature tissue) then they would start attacking and bruising the wagon wood.

Meanwhile, wagons take up no physical space, and "wear" its cargo.  A ship would require it have actual cargo holds and places for crew to actually stand so that they don't drown.  Player ships for adventure mode will probably demand crew cabins, as well, which requires being capable of navigating a solid structure that takes up multiple tile of physical gamespace.

So no, wagons are totally different from ships, and would require massive rewrites to the fundamental structure of DF so that something in between a "creature" (something that has location and can move, but does not take up/block space/pathfinding) and a "construct" (something that has location and takes up space/blocks pathfinding, but cannot move) can exist.

Keep in mind, the few moving fortress parts we already have (liquids and bridges) are absolute FPS killers, already, due to the way that DF has a connectivity map.  EVERY change in where the water flows causes DF to have to rebuild its own pathfinding map, which causes significant, observable lag. Until Toady switches to some different method of pathfinding, every time a ship moves, it will break the map.  (This is presumably part of why ribab was trying to offer "fast travel" as a way to make ships a "static building".)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare