Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Stepladder Uses Suggestion  (Read 3331 times)

Bien

  • Bay Watcher
    • View Profile
Stepladder Uses Suggestion
« on: June 06, 2015, 09:24:13 pm »

Now that we have stepladders in game, why not let dwarves use them to move from from one z-level to another? I imagine it would act as a virtual up/down ramp or stairs pair once picked up by a dwarf. I imagine it would be useful for constructing outdoor structures, especially in the roofing department.
Logged

Evil One

  • Bay Watcher
  • [Champion Elfslayer]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #1 on: June 06, 2015, 09:59:27 pm »

Considering how dwarves used to cause such death and destruction just de-constructing a floor, I'd hate to think what they could do with stepladders.

I can just imagine a dwarf climbing up a Z-level and then while standing in the gap, picking up the stepladder that he's standing on... With inevitable results.
Logged
Dwarf!  Indeed, a devious delight fond of drink and industry deceived as both do-gooder and devil by the delusions of deities.  This demander, no daft demeanor, is a driving force of the deadly diocese, now disappointed, delirious from goblin deception.  However, this delicious derangement of a demolished diamond stands determined!

Bien

  • Bay Watcher
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #2 on: June 06, 2015, 11:35:20 pm »

Ah, yeah. I suppose the AI would need tweaking to avoid that. One could perhaps require a stepladder to be 'built' first but I suppose that would make it redundant.

Either that or floors could be de/constructed from below.
Logged

Alfrodo

  • Bay Watcher
  • [IS_STUPID]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #3 on: June 07, 2015, 12:26:02 am »

I think he means that stepladders be used as they are now, but for constructions and the like.

So a stepladder in the game just lifts a dwarf 3 meters up so they can get at some juicy nectarines or Bayberries.  So a dwarf could just lift himself on top of a step ladder to make the job of building a second floor easier.  It'd have a few uses for megaprojects and the making of ceilings, that's for sure.

Logged
Bins stacked full of mangoes were laid out in rows. On further inspection of the market, Cog came to the realization that everything was mangoes.

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #4 on: June 07, 2015, 07:03:42 am »

Yeah! ALso as temporary support maybe? First time I tried to build a tower, an unexplained cave-in occurred.
Logged
One wheel short of a wagon

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #5 on: June 07, 2015, 10:08:59 am »

The primary problem is that stepladders present a rather significant challenge to pathfinding. 

Keep in mind, the current long-distance pathfinding algorithms are incapable of handling anything but purely terrestrial movement, and sentient beings are incapable of pathing into water (even if they are aquatic) and flying pets are suddenly ground-bound because they forget they can fly when tamed. 

Dwarves already can climb if forced (my channel-diggers unfortunately choose to do so all too often instead of coming out the other side...) but it causes massive, jarring, obvious lag spikes because it requires they break the pathing system as it stands, and use of stepladders even in the limited, simple manner they are used now causes problems.  This is why dwarves and other creatures climb only as an absolute last resort when all other paths are blocked.

When creatures try to path through air, they use specialized AI that is basically purposefully blind to all but a few tiles away to save FPS.  (Flying HFS critters break that rule, which is why they murder your FPS, as well as dwarves.)

Hypothetically, in the future, if Toady overhauls all of pathfinding, this might be solved with a more dynamic pathfinding system that can recognize multiple types of movement over long distance, but players have been suggesting many different types of pathfinding for years, (search for "jump point search", "vector pathfinding", and, why not, "embarrassingly parallel") and it doesn't seem like Toady is ready to completely replace the pathfinding system for the foreseeable future. 

Rather, if there's a use of stepladders as a "get up a tile" idea, then it would probably work better if they were built, rather than dynamically towed.  "Scaffold" items in some other games are capable of being an upstair and a downstair on the next floor up in one building, and a stepladder might work like that, and combine it with an instant building and unbuilding speed to make it more practical than standard up and down stairs. 

Having siegers bring some ladders with them would also be a perfectly sensible idea, as well.  If built, they bypass the need to climb by at least one z-level, letting other goblins chase after the ladder-carrier quickly. 
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

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #6 on: June 07, 2015, 10:21:04 am »

Having siegers bring some ladders with them would also be a perfectly sensible idea, as well.  If built, they bypass the need to climb by at least one z-level, letting other goblins chase after the ladder-carrier quickly.

This. That would make seiges actually epic, and make castle defences pointful and fun. Also, why not have ladders as a buildable (so no pathfinding loss) but easily decontructed and several z-lvl high scaffold? Better than stupid stone stairs and bridges that always result in collapses.
Logged
One wheel short of a wagon

Pearofclubs

  • Bay Watcher
  • Servant of -it-
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #7 on: June 07, 2015, 02:26:16 pm »

Considering how dwarves used to cause such death and destruction just de-constructing a floor, I'd hate to think what they could do with stepladders.

I can just imagine a dwarf climbing up a Z-level and then while standing in the gap, picking up the stepladder that he's standing on... With inevitable results.
Urist McWildBlueYonder cancels construct wall: Interrupted by flying.
I think we've just figured out dwarven flight.
Logged

Witty

  • Bay Watcher
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #8 on: June 07, 2015, 08:45:29 pm »

As Kohaku said, the biggest roadblock here is the poor pathfinding. That would need to be overhauled first before anything cool could be done with stepladders outside of their fruit gathering purposes.
Logged
Quote from: Toady One
I understand that it is disappointing when a dwarf makes a spiked loincloth instead of an axe.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #9 on: June 08, 2015, 01:07:05 pm »

As Kohaku said, the biggest roadblock here is the poor pathfinding. That would need to be overhauled first before anything cool could be done with stepladders outside of their fruit gathering purposes.
If invaders only pathed to entry points (rather than to some meeting hall zone that they've never seen), then using ladders might not be so bad.  Once inside, it's unlikely that the pathing algorithm could come up with something useful for the stepladders, thus they get left outside.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #10 on: June 08, 2015, 01:22:27 pm »

Would something like

-If invader with stepladder
-Sees cliff (scalable)
-See what's over cliff/count cliff as one step?

This is what I imgine what the code for a cliffchack would look like, in layman's terms. As a layman, this does not seem quite as complex as flying or climbing generally in lag terms, but I could definitely be wrong.
Logged
One wheel short of a wagon

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #11 on: June 08, 2015, 01:35:53 pm »

Would something like

-If invader with stepladder
-Sees cliff (scalable)
-See what's over cliff/count cliff as one step?

This is what I imgine what the code for a cliffchack would look like, in layman's terms. As a layman, this does not seem quite as complex as flying or climbing generally in lag terms, but I could definitely be wrong.

Actually, it is as complex as flying or climbing, because it requires breaking the connection map in exactly the same way as climbing does. 

Dwarf Fortress uses modified A* Pathfinding with a Manhattan heuristic.  This requires a connectivity map, and uses the traffic designations as weights (if the weight is greater than 1 -and it defaults to 2- more pathfinding is done to find a route with less weights, even if it is longer in absolute terms). 

The A* pathfinding is absolutely incapable of recognizing ways to alter the map.  If you build a stepladder, you are changing the map, and the A* connectivity map must be rebuilt to include this. 

Because of this, things like climbing are only done as a last resort, as it requires either a kludge or a totally different pathfinding algorithm to be done.  If you switch to a different algorithm, then the game will first flood-fill every single tile the creature can reach, which can mean performing as many as a million independent cache misses and queries to RAM (which MURDERS your FPS) and then starting on a much less efficient algorithm that works by trying each and every way a stepladder could be built.  It's even worse if you just use brute force A* with this as that would take testing every place a stepladder could be placed, and then running A* again with the new placement, this will cause the game to basically freeze for several seconds each time anyone tries to use a pathfinding code like this, because you're talking about thousands of permutations that each can cause millions of cache misses. 

As far as I can tell, what it really works with is just making climbing-based movement take a weight of 1000 or something extreme, so that it's done only as a last resort, but doesn't take up needing to speculatively compare optimal placement of limited ladder resources.  As such, from a programming standpoint, dynamically-placed ladders are more complicated than climbing.
« Last Edit: June 08, 2015, 01:48:07 pm by NW_Kohaku »
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

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #12 on: June 08, 2015, 01:42:15 pm »

Oooops. Well, no more speculation from me today  :P

Would it take a lot of pathfinding to make invaders check for walls constructed, run to them and build a ladder to their tops? Might result in exploits, but then again, we can already build deathtraps pretty easily.
Logged
One wheel short of a wagon

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #13 on: June 08, 2015, 01:47:02 pm »

It feels like there should be some middle ground here.  Such as a heuristic on where ladders get placed in a siege, and siegers who path on the assumption that those ladder actually get placed.  Similar logic can be used later on for sappers.

The ladder and sapper logic will probably be quite predictable at first, but can have some randomness in it to keep things from getting too bad (the entire siege magically knows the randomness, so the fighters know where to expect ladders and sappers).  One behavior that needs some thought is what to do when these ladder-bearers and sappers get injured or killed.  Does an able-bodied sieger take over the task?  Only if he/she was in the same squad?  At what point do they give up on that ladder?

You probably don't want a single stepladder to be the irresistible bait that got dozens of goblins killed.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

NJW2000

  • Bay Watcher
  • You know me. What do I know?
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #14 on: June 08, 2015, 01:49:16 pm »

Well, if they really swarm, and there's a great fighter at the top of the wall, that would be fine, right?

F***ING Helm's Deep, mate!
Logged
One wheel short of a wagon
Pages: [1] 2