Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 23 24 [25] 26 27 ... 46

Author Topic: The "How Does Minecart" Thread  (Read 336675 times)

Burmalay

  • Bay Watcher
  • Sorry for my English
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #360 on: May 20, 2012, 02:13:58 pm »

What if instead of a fortification you put in a retracting wall grate? Can you build that on top of the track? (I think so)

Yes, we can build floodgates & wall grates on top the track & they both works the same way.
We can improve it with a minecart storage to shoot minecarts next to each other.
Logged

Martin

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #361 on: May 20, 2012, 03:17:05 pm »

Ok, I'm building a minecart testing fortress for my next embark so I at least have a notion of what I can and can't do.


I have two rooms connected by a track which forms a big oval - 10 tiles between rooms. They send the cart back and forth reliably. They load the cart from the designated stockpile in room 1 reliably. But I cannot get them to unload the cart in room 2 to the designated stockpile.


In room 2, the hauling rule is pretty simple - give to stockpile, push the cart after 7 days. That's it. I confirmed the stockpile is correct and that the stockpile can receive the items. I can run a take order between the two stockpiles without trouble. But no jobs get generated if it's just the cart.


Thoughts?


I do have a working minecart airlock for non-building destroyers that works very well. I'll be working on the building destroyer one in a bit.

TerryDactyl

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #362 on: May 20, 2012, 04:20:37 pm »

Cart-based power-to-signal converter
Code: [Select]
cross-section:

______
═...^▲
█▲≡▲██


▲ are E/W (or N/S) ramps,
≡ is a roller, highest power, facing right
^ is pressure plate. Will remain on so long as power is on.
= is a rail, used only to push a cart into the system. Cart is then forbidden to prevent dorfs from picking up moving vehicles.
Power input is on the lower level, beside the roller. Rollers can not be powered from above.

Please note that this disproves the going theory that E/W (N/S) ramps are 'U'-shaped.
The design might also depend on their being a roof over top - but not necessarily. It seems doubtful that rollers, at this stage, provide enough impulse to ascend two ramps.

Designed to replace fluid-logic equivalent (http://dwarffortresswiki.org/index.php/DF2012:Pre-Toggled_Mechanical_Logic#Power_to_signal_converter)

Martin

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #363 on: May 20, 2012, 04:57:41 pm »

Figured out the hauling issue.


Each stop on the hauling route allows you to set what the cart desires and what the cart wants to keep. The screens look exactly like the stockpile screens, so I confused them with the stockpile screen, and set the stop where the dwarves were supposed to remove the gabbro to the same settings as the stockpile which receives gabbro. Instead of causing gabbro to be hauled to the stockpile, it caused the cart to want to keep the gabbro. On the load stop, that 'mistake' is what caused it to work. On the unload stop that mistake is what caused it to fail.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #364 on: May 20, 2012, 06:51:53 pm »

...
it appears the more power you put into the rollers, the faster they will roll! I just watched as a dwarf calmly pushed a cart on the left hand rail, that one requires 29 power, but is being supplied with 40, 11 excess power. the cart shot off the rail with enough force to cause the dwarf it hit to fly over the moat and detonate upon impact with the wall beyond!the cart is now lodged in the fortifications on the other side of the moat. good lord, THE POWER!!

Quote from another thread, but worth takeing a look at. Anyone have a mega-water-reactor with thousands of power units handy?

Martin

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #365 on: May 20, 2012, 07:08:14 pm »

Quote from another thread, but worth takeing a look at. Anyone have a mega-water-reactor with thousands of power units handy?


Now that I have a minecart testing fortress, I might be able to come up with something… There's a nice long stretch of river just screaming for 30 waterwheels to be attached.

The Grackle

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #366 on: May 20, 2012, 11:47:08 pm »

...
it appears the more power you put into the rollers, the faster they will roll! I just watched as a dwarf calmly pushed a cart on the left hand rail, that one requires 29 power, but is being supplied with 40, 11 excess power. the cart shot off the rail with enough force to cause the dwarf it hit to fly over the moat and detonate upon impact with the wall beyond!the cart is now lodged in the fortifications on the other side of the moat. good lord, THE POWER!!

Quote from another thread, but worth takeing a look at. Anyone have a mega-water-reactor with thousands of power units handy?

I've got about 10k power, but... I don't know what to compare it to.  I've never used windmills.  Three rollers can get a cart up several stories and around bends, but that seems normal. They'll even launch into the air without roofs over the ramps, but only a few z levels, not like to the stratosphere.  I can rig up a quick test, but I am skeptical of this claim.  Especially from someone who thinks 11 extra urists needs all caps and two exclamation points.

----
results:
one roller, one ramp, one cart weighing 24 urists
96/100 power= a small arc of about 5 tiles, then the cart rolls to about 70 tiles away
1581/10900 power = the same
« Last Edit: May 21, 2012, 12:33:50 am by The Grackle »
Logged

Martin

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #367 on: May 21, 2012, 01:06:50 am »

There's really no such thing as 'extra' power. The rollers are either powered or they aren't. But my testing fortress continues to expand. I'm walling it in now that I'm getting real attackers, but the 10z high ramp is sending copper carts zooming across the 5x5 embark. I have 180 tiles of straight track, and the cart moves in excess of one tile per tick just from the push and the ramp. It then travels another 50 tiles across grass at 1 tile per tick before hitting the wall.

I had one of my farmers ride the cart this last time. The cart struck the wall at the usual speed, and sent the farmer flying over the wall until he hit the edge of the map. The cart gave him a compound fracture of the leg, and the collision with the edge of the map gave him 4 more compound fractures and a variety of other lesser injuries.

The airlock works well. It's very simple:

= track
H hatch
P pressure plate
D door

Code: [Select]
=HPD=
The hatch is over a pit, the pressure plate triggers on any cart, and is hooked to both the door and the hatch. There are walls along both sides. Because doors and hatches trigger instantly, the cart sails through and at no point can a non-building destroyer path through, unless they're a flier. Even in the case of a flier, a 15 long  track with the door at the end should prevent almost anything from pathing through. It'd need to be at the end of the tunnel, path instantly, and move 6 tiles per tick before the door shuts. Building destroyers can still path through, however. I'll work on a variation using drawbridges, but it'll need a fair bit of distance to deal with the 100 tick delay on trigger. We'll need to experiment with how to regulate the carts speed.

Update:

The speed I'm getting off the bottom of the ramp is pretty reliably 10 tiles in 9 ticks. I added 10 rollers to the bottom of the ramp, and I'm still getting 10 tiles in 9 ticks off the end of the rollers. It definitely looks like a rocketsled shooting across the map.
« Last Edit: May 21, 2012, 02:41:51 am by Martin »
Logged

Martin

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #368 on: May 21, 2012, 12:01:38 pm »

I extended the track the full 240 tiles across the map. 9 are ramp. The rollers are off. At the end I built the following construction:

Code: [Select]
<<<   
Code: [Select]
v ^   
Code: [Select]
>>^===
The track turns north, loops counter-clockwise and exits back along the track without connecting, with walls keeping the cart on the track.

Pass 1: The cart exits the ramp and travels 108 tiles in 100 ticks, crosses the map, jumps the track and takes the loop clockwise, and travels 7 tiles back up the ramp before starting pass 2
Pass 2: The cart exits the ramp and travels 91 tiles in 100 ticks, jumps the track and again takes the loop clockwise, and travels 5 tiles back up the ramp.
Pass 3: The cart exits the ramp and travels 79 tiles in 100 ticks, jumps the track and again takes the loop clockwise, and travels 3 tiles back up the ramp.
Pass 4: The cart exits the ramp and travels 63 tiles in 100 ticks, jumps the track and again takes the loop clockwise, and travels 1 tile back up the ramp.
Pass 5: The cart exits the ramp and travels 47 tiles in 100 ticks does NOT jump the track and properly takes the loop counter-clockwise, and travels 0 tiles back up the ramp (but still bounces back).
Pass 6: The cart exits the ramp and travels 26 tiles in 100 ticks and travels a total of 303 tiles, including the loop properly before coming to a stop.

The track is 214 tiles long from the bottom of the ramp to the turn into the loop. The loop is 4 turns and 4 straight tracks. End-to-end, excluding ramp, it is 436 tiles.

From initial push, the cart travels 2524 tiles in total, including the runs up and back down the ramp. 24 of those tiles are turns, 2500 are straight track. Speed losses per run:

Run 1: 17 tiles/100 ticks
Run 2: 12 tiles/100 ticks
Run 3: 16 tiles/100 ticks
Run 4: 16 tiles/100 ticks
Run 5: 21 tiles/100 ticks
Run 6: >21 tiles/100 ticks as the cart fails to return to the bottom of the ramp.

It's possible Run 2 was mismeasured. I'll repeat the experiment later, but the tile the cart ends on has been the same for each run - I did this about 20x before I got everything right, and got runs where I didn't get a pause/recenter in the middle of the effort. It's very reliable WRT distance. I got the same distance when the rollers were activated, so I believe the 9z ramp gets the cart to maximum velocity (a shorter ramp may as well, not tested here).

I chose 100 ticks because it's a reasonable period of time to get a measurement with a minimum amount of rounding error. It's also the duration for a pressure plate to signal a drawbridge, so it's a useful measure in that way. For example, if you're going for maximum velocity and want to trigger a bridge to lower, you'll need somewhere in the neighborhood of 110 tiles between the pressure plate and the drawbridge to keep the cart from slamming into the bridge.

Some theories:

1) Toady intended the max cart speed to be 1 tile per tick, but there's a bug causing the cart to exceed this value. I've done some programming along these lines, and dealing with cases where objects travel farther than your sample rate is a lot harder than when objects are limited to your sample rate. I suspect this will be changed, and cart max speed lowered in a future update because of 2) below.
2) Because carts can travel more than 1 tile per tick, we get 'tunneling'. I've had the cart fly through a solid wall several times, and strike another solid wall. I believe what's happening is that each tick the game determines any 'leading' interactions (like a dwarf steps in front of the cart) resolves those, takes the speed of the cart, reduces it through friction, calculates where the next position of the cart should be looks ahead to that position, and determines if there's a wall or other 'trailing' interaction that should prevent the cart from going to that position. If there isn't, it advances the cart. If there is, it deals with that accordingly. In the case where the cart is going more than one tile per tick, it's possible that the current position is one tile short of a wall and the next position is one tile past the wall and the game never sees the wall, because it doesn't bother to check if those positions are >1 tile apart and check the intermediate positions because it assumes a 1 tile per tick max speed. Whether the cart tunnels is purely a rounding error. Move the wall one tile closer or farther and it won't tunnel. I'm going to test this with floodgates on levers.
3) The internal calculations for speed and position are more accurate than the display. If it wasn't, the speed/distance would be quickly clamped to integers. It's not. If my measurements above are correct, there is a rounding error still that is apparent. You'd expect the distance/time falloff to be more predictable - linear, geometric, etc. but it doesn't seem to be exactly either. And we're not off by one tile here or there, but several. I'm using a script that pushes the one-step button exactly 100 times, so I've taken counting out of the equation in this. I'll redo this and see if anything changes, in the event that I mismeasured, etc.

Nyotor Lizardhammers

  • Bay Watcher
  • This adorable animal can't work.
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #369 on: May 21, 2012, 01:25:11 pm »

All this minecart talk and I still can't figure out how to make tracks connect. I've been messing with this one constructed ramp ALL DAY and still can't get these goddamn routes to connect.

How the hell are you people doing it?
Logged
Nyo Ho Ho!

Rafal99

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #370 on: May 21, 2012, 02:50:28 pm »

Has anyone tried shotgunning magma-filled minecarts yet? :D
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Crashmaster

  • Bay Watcher
  • CARP, Canada's new helth care plan for the elderly
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #371 on: May 21, 2012, 02:52:06 pm »

Not yet into minecart, question though: is there a way to get enemies into/ to ride carts? Can you load cages into carts? What happens when an enemy (or dwarf) is dropped onto a stopped (or moving) cart?

TerryDactyl

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #372 on: May 21, 2012, 03:36:05 pm »

All this minecart talk and I still can't figure out how to make tracks connect. I've been messing with this one constructed ramp ALL DAY and still can't get these goddamn routes to connect.

How the hell are you people doing it?

The most important thing to note is that the NSEW describes the 'exits' from a tile. A NS track will move your cart north or south. A 'N' track will move your cart only north. Unless you have enough power to derail the cart entirely and continue south. Ramps it would seem follow the same logic - though the behaviour of cart on turning ramps (ie. NE, SW) is still unknown. There are peculiarities. It also takes a good deal of energy to climb z-levels. Get your routes down pat with 'guide' orders first, before attempting to automate. It is extremely dangerous to let carts run off on their own. You have been warned.

Has anyone tried shotgunning magma-filled minecarts yet? :D
The results are reportedly disappointing.

Not yet into minecart, question though: is there a way to get enemies into/ to ride carts? Can you load cages into carts? What happens when an enemy (or dwarf) is dropped onto a stopped (or moving) cart?
As yet unknown.

I extended the track the full 240 tiles across the map. 9 are ramp. The rollers are off. At the end I built the following construction:
Not sure what you built there exactly, Martin, but it sounds like you're getting some really solid data. Good compromise on measurements, too. Any idea how much friction is caused by the track jump as opposed to simply travelling the loop? Can you graph the velocity deceleration curve for straight tracks? How much do turns slow a cart down?

The Grackle

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #373 on: May 21, 2012, 04:12:14 pm »

All this minecart talk and I still can't figure out how to make tracks connect. I've been messing with this one constructed ramp ALL DAY and still can't get these goddamn routes to connect.

How the hell are you people doing it?

If the cart is going up a ramp, it might need a ceiling overhead.  Took me awhile to figure out why one of my routes wasn't working, then I realized the cart was hopping up, hitting a wall, and falling back on the track, although it looked like was just stopping for no reason.   
Logged

GoldenShadow

  • Bay Watcher
    • View Profile
Re: The "How Does Minecart" Thread
« Reply #374 on: May 21, 2012, 04:31:10 pm »

you can build weapon traps over tracks and they won't impede minecart movement. I still have problem with kobold thieves using them as express tunnels to the inside of the fort. But I am using guide mode for safety and reliability. Once carts are flying through at 60mph, it shouldn't be a problem.
Logged
Pages: 1 ... 23 24 [25] 26 27 ... 46