Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Minecart derail + roller strange behaviour  (Read 458 times)

13thEssence

  • Bay Watcher
    • View Profile
Minecart derail + roller strange behaviour
« on: January 30, 2013, 11:16:58 pm »

Rollers function oddly when a cart derails onto them while activated.

I've got a circular track set up where the start and end tiles do not connect, with a roller like so

Code: [Select]
Track   Mech   Pos Ref
░░░░░   ░░░░░   ░░░░░
 ══╗░   ☼►═╗░    123░
░║░║░   ░⌂░║░   ░8░4░
░╚═╝░   ░╚═╝░   ░765░
░░░░░   ░░░░░   ░░░░░

░=Wall, ╗=Track, ☼=Gear, ►=Roller, ⌂=Pressure Plate

I planned to use this as a delayed off switch one a trigger activates the roller, turning everything off including the roller itself.

A minecart starts in position 1, atop the roller.  The roller is set to push W->E at maximum velocity.  When the gear is engaged and power is provided to the roller, the minecart moves east through positions 2 to 8, where it derails, lands on position 1, hits the wall and stops at position 1.

At this point, if the roller is off, the cart is reset to it's original position and is ready for the roller to activate again, functioning properly and repeating the movement without problems.

However, if the roller is powered when the cart derails to position 1, the roller pushes the cart only one tile east to position 2.  There it stops and remains until a dwarf picks it up to replace it in position 1.

I cannot understand this behaviour.  The roller IS pushing the cart on the second time around, but at extremely reduced speed, or the cart is simply being tossed onto pos 2 without rolling at a set speed.  Is there some non-instant bumping and friction going on with the wall after the derailment? Is the change in velocity (direction) happening after the roller infuses the cart with eastward momentum, and the north and east momentum are cancelling each other out?  Is this just a bug?  I'm out of guesses.  Someone please explain!  If there's a different example of this very same DF physics principle I'd be interested in seeing it, too.  Thanks.
Logged

JAFANZ

  • Bay Watcher
    • View Profile
Re: Minecart derail + roller strange behaviour
« Reply #1 on: January 31, 2013, 02:01:14 am »

I have no idea what is causing the issue, but a recent reference to the "impulse ramp abuse" thread gave me an idea for a possible work-around.

If you build such an impulse ramp (presumably NE or SE Track Ramp) on spot #2, I believe that it should kick off the minecart again even when the roller doesn't impart sufficent momentum.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Minecart derail + roller strange behaviour
« Reply #2 on: January 31, 2013, 10:04:53 am »

This issue might have been referred to tangentially here.
Quote
The roller on z+2 has some issues 'catching' the minecart when it's approaching from beneath, causing the minecart to pause on the ramp [one tile beyond the roller] before rolling downwards onto the roller and being boosted correctly. Extending the roller one tile to the south will stop it from rolling backwards

It seems as though minecarts retain momentum in ways that are consistent but not intuitive -- it's possible to aim a minecart so that it turns a flat corner and then comes back around it with no ramps or rollers being involved (see thread linked above).
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

13thEssence

  • Bay Watcher
    • View Profile
Re: Minecart derail + roller strange behaviour
« Reply #3 on: February 02, 2013, 07:54:14 am »

It seems as though minecarts retain momentum in ways that are consistent but not intuitive -- it's possible to aim a minecart so that it turns a flat corner and then comes back around it with no ramps or rollers being involved (see thread linked above).

Thanks for finding that.  Two interesting solutions there.

I had tossed aside this design for a straight track approach with a roller at each end, but that didn't work out well for my layout.  I revisited the original idea.  When I converted the long straight track into a loop, doubling back with only 1x1 roller and no ramp, I still had the problem. Strangely, when I smoothed the track and shortened the loop to 3x2 I no longer experienced the issue.  Creating the loop in another area but rotated 90-degrees once again worked fine.  I don't know why, but I guess there's more involved in this and it is a bug.  I also want to try dropping the cart from one z up directly onto the activated roller to see if it has the same behaviour.

Logged

Garath

  • Bay Watcher
  • Helping to deforest the world
    • View Profile
Re: Minecart derail + roller strange behaviour
« Reply #4 on: February 02, 2013, 08:07:17 am »

!science! approved
Logged
Quote from: Urist Imiknorris
Jam a door with its corpse and let all the goblins in. Hey, nobody said it had to be a weapon against your enemies.
Quote from: Frogwarrior
And then everyone melted.