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 3332 times)

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #15 on: June 08, 2015, 01:54:14 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.

The problem, again, is making the computer figure out how to place a limited resource without having to pathfind all possible alternatives, which can literally require billions of queries to RAM.

In essence, just plain climbing is much easier on the CPU, since it doesn't require the siegers to speculate upon what difference changes to the map will make. 

Any sort of speculative pathfinding takes a more advanced pathfinding algorithm that is probably long overdue for replacement, but again, you're not likely to see any time soon.  In fact, pathfinding for fliers really only takes making a third connectivity map, and the second connectivity map is the one that is only used by wagons (which is a massive PITA, itself).
« Last Edit: June 08, 2015, 01:55:53 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

Dirst

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

The problem, again, is making the computer figure out how to place a limited resource without having to pathfind all possible alternatives, which can literally require billions of queries to RAM.

In essence, just plain climbing is much easier on the CPU, since it doesn't require the siegers to speculate upon what difference changes to the map will make. 

Any sort of speculative pathfinding takes a more advanced pathfinding algorithm that is probably long overdue for replacement, but again, you're not likely to see any time soon.  In fact, pathfinding for fliers really only takes making a third connectivity map, and the second connectivity map is the one that is only used by wagons (which is a massive PITA, itself).
That's why I said some heuristic to placing the ladders (and later sappings), rather than some deliberative process to figure out the ideal place to modify the map.  Otherwise, you're right, the game would freeze upon announcing a siege, as it tried to figure out if the four ladders should be daisy-chained in one spot or used in four different points of attack.  Not to mention placing siege catapults and ballistae.

Ladders and other map modifications really really should occur alongside demoting the siege from omniscient knowledge of the map inside the fortress, otherwise we'll end up with a new class of the "overlooked diagonal route" design flaw that will crush newbies.
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

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #17 on: June 08, 2015, 03:18:05 pm »

That's why I said some heuristic to placing the ladders (and later sappings), rather than some deliberative process to figure out the ideal place to modify the map.  Otherwise, you're right, the game would freeze upon announcing a siege, as it tried to figure out if the four ladders should be daisy-chained in one spot or used in four different points of attack.  Not to mention placing siege catapults and ballistae.

Ladders and other map modifications really really should occur alongside demoting the siege from omniscient knowledge of the map inside the fortress, otherwise we'll end up with a new class of the "overlooked diagonal route" design flaw that will crush newbies.

Actually, digging is much easier to solve than ladder placement or even climbing.

Expwnent's even gone so far as to just plain code it as a plugin into DFHack, and it apparently mostly works just fine.  All you really needed to do is declare walls as severely high-weight pathing costs, and throw all of them into the connectivity map.  That's even easier than climbing or jumping, which requires a different type of connectivity map (showing scalable surfaces, which notably cannot include fortifications or smoothed stone) to be useful.

The main reason digging isn't in the game already is just that it would be highly controversial and potentially raise balance issues.  (Digging is already far too easy for players, and invaders making swiss cheese of your maps isn't going to be popular when there are serious advantages for smoothed natural stone walls and floors over constructions.)

The problem with limited use items is that you have to use a much more advanced heuristic, while digging and climbing are infinite-use. 

And again, what the game really needs is multiple layers of connectivity maps, which would increase RAM footprint, and make connectivity updates take longer (which occur every time you have a lever-operated bridge or door open or fluids moving around, potentially cutting off paths).  Alternately, you can make a single connectivity map that contains multiple movement types within it, but depending on how you set that up, it could require many more queries per tile than other movement types would. (Meaning: Pathfinding's FPS lag would be inflated for every pathfinding creature, which would be a serious blow to FPS.)

Now, yes, there are some ways of reformatting pathfinding, but those are, again, things that Toady has not yet really talked about considering doing.  Wholesale reformatting of the pathfinding system to something like jump point search, vector pathfinding, or hierarchical pathfinding may well solve some of these problems, but that's a whole different argument.
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

Alfrodo

  • Bay Watcher
  • [IS_STUPID]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #18 on: June 08, 2015, 04:20:01 pm »

How about, instead of "placing" a stepladder, the creature carrying it (Let's just assume it's a Human with a Lit degree) pathfinds as if 3m tall cliffs were ramps. And instantly climbs them, as if he had placed the stepladder, walked up it, and brought it up with him. 

It shouldn't be quite "instant." but I don't think that would cause lag to the point of turning your PC into a fried mass of molten beige plastic, potatoes, and solder.
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.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #19 on: June 08, 2015, 04:28:42 pm »

How about, instead of "placing" a stepladder, the creature carrying it (Let's just assume it's a Human with a Lit degree) pathfinds as if 3m tall cliffs were ramps. And instantly climbs them, as if he had placed the stepladder, walked up it, and brought it up with him. 

Again, that requires a wholly different type of connectivity map than the one we have.  (And one that is more complex than climbing alone, as it requires measuring how tall a cliff is, rather than simply adding up climbable walls, and looking if there is a connection through them.)
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

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Stepladder Uses Suggestion
« Reply #20 on: June 08, 2015, 11:25:54 pm »

How about, instead of "placing" a stepladder, the creature carrying it (Let's just assume it's a Human with a Lit degree) pathfinds as if 3m tall cliffs were ramps. And instantly climbs them, as if he had placed the stepladder, walked up it, and brought it up with him. 

It shouldn't be quite "instant." but I don't think that would cause lag to the point of turning your PC into a fried mass of molten beige plastic, potatoes, and solder.
It doesn't really add anything to the game. He might as well have just climbed. Players will just build taller walls or roof over their exterior areas to compensate.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?
Pages: 1 [2]