Bay 12 Games Forum

Please login or register.

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

Author Topic: Minecarts for moving magma  (Read 8945 times)

Xinael

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #15 on: May 02, 2013, 01:45:38 pm »

Thanks for the explanation! That's genius. Hope you don't mind, I've added what you wrote on impulse ramps to the wiki, since it didn't have any explanation yet.
« Last Edit: May 02, 2013, 04:24:35 pm by Xinael »
Logged

Xinael

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #16 on: May 03, 2013, 02:00:03 pm »

Sorry for the double-post; but man, these impulse ramps are weird! I created a spiral just like the diagram on the previous page, about 50 z-levels tall. It works just fine in dry testing in terms of getting up the spiral, but if you watch it step-by-step (I wanted to see it go up and not lose it as it crossed the levels so fast) you see some strangeness! The cart sometimes gets to the second up ramp on a level, rolls back onto the first, then somehow gets some momentum from somewhere and rolls back onto the second ramp and then up the hill. At no point does it make it back down the hill, but every few levels it rolls back and forth.

I'm a bit worried that once I get a whole bunch of carts going at once, they're going to get jammed because this rolling back and forth takes about 20 ticks and they're dispensed at one every 8 ticks apparently. We'll have to see how it goes.
« Last Edit: May 03, 2013, 02:02:03 pm by Xinael »
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #17 on: May 03, 2013, 02:14:31 pm »

Sorry for the double-post; but man, these impulse ramps are weird! I created a spiral just like the diagram on the previous page, about 50 z-levels tall. It works just fine in dry testing in terms of getting up the spiral, but if you watch it step-by-step (I wanted to see it go up and not lose it as it crossed the levels so fast) you see some strangeness! The cart sometimes gets to the second up ramp on a level, rolls back onto the first, then somehow gets some momentum from somewhere and rolls back onto the second ramp and then up the hill. At no point does it make it back down the hill, but every few levels it rolls back and forth.

I'm a bit worried that once I get a whole bunch of carts going at once, they're going to get jammed because this rolling back and forth takes about 20 ticks and they're dispensed at one every 8 ticks apparently. We'll have to see how it goes.
Yep! I see that a lot, too. It's extremely weird. I expected the same thing, that it'd jam up the entire stack. But I've left the thing running for years dumping magma out the spout of a giant faucet-shaped tower to fill the ocean with obsidian, and I haven't seen it break yet.

Take that, stupid undead orcas.
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Minecarts for moving magma
« Reply #18 on: May 04, 2013, 03:30:36 am »

The cart sometimes gets to the second up ramp on a level, rolls back onto the first, then somehow gets some momentum from somewhere and rolls back onto the second ramp and then up the hill. At no point does it make it back down the hill, but every few levels it rolls back and forth.

I looked into using impulse ramps like this a while back and, as far as I could tell, a minecart basically ignores an impulse ramp if it immediately follows an up ramp, and a single impulse ramp can send a minecart up 5 levels at a time. So, in your case, the cart will be travelling up those 5 levels, ignoring the impulse ramps as it goes, before losing its momentum and rolling back onto an impulse ramp before continuing its journey.

There are, however, alternatives. If you give a minecart a "run-up" using a series of impulse ramps leading to a tight 2x2 spiral, you can get some impressive results:
Spoiler: Table (click to show/hide)

Of course, for a difference of more than 45 levels you would have to use more than one accelerator. This could comprise of a few large accelerators, or a sequence of smaller ones like this:

z+0     z+1     z+2     z+3     z+4
░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░
░▼═╚╗░░ ░░░░▼░░ ░░░░░░░ ░░░░░╗░ ░░╔╝═▼░
░░░░░░░ ░░░░╚░░ ░░░░▼╝░ ░░░░░▼░ ░░░░░░░
░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░

z+0       z+1       z+2       z+3       z+4       z+5       z+6       z+7      z+8
░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░ ░░░░░░░░░
░▼═╚╚╚╗░░ ░░░░░░▼░░ ░░░░░░░░░ ░░░░░░░╗░ ░░░░░░╔▼░ ░░░░░░▼░░ ░░░░░░░░░ ░░░░░░╗░ ░░╔╝╝╝═▼░
░░░░░░░░░ ░░░░░░╚░░ ░░░░░░▼╝░ ░░░░░░░▼░ ░░░░░░░░░ ░░░░░░╚░░ ░░░░░░▼╝░ ░░░░░░▼░ ░░░░░░░░░
░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░ ░░░░░░░░░

(Track bends are all ramps. The straight track could also be an impulse ramp here, but it doesn't seem to make a difference.)

As you can see, the last "frames" are mirrors of the first ones, and the sequence continues logically. The 8-level one is slightly quicker than the 4-level one, but the 4-level one is what I would recommend. The reason for this is because if there is ever any reason (obstruction/glitch) that a cart fails to make it up to the next accelerator, it will roll back down to the first impulse ramp and only ever make it up 5 levels before rolling back again. In the case of the 4-level accelerator, this isn't a problem.

In theory a 5-level accelerator sequence would also work, but would also be a pain to designate.
« Last Edit: May 04, 2013, 03:36:18 am by rhesusmacabre »
Logged

Xinael

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #19 on: May 04, 2013, 04:36:14 am »

In the four-level example, are you saying that on subsequent levels you keep following that pattern, or that it changes following some kind of rule when you say "continues logically"? It just seems strange to me that z+0, with an impulse ramp, follows z+4, which also has an impulse ramp. I can't see what configuration of those example levels would keep the ramp from moving laterally except that one, which seems a strange thing to do.
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Minecarts for moving magma
« Reply #20 on: May 04, 2013, 07:37:29 am »

By "continues logically" I just meant the pattern repeats but mirrored, so in the first example z+4 would be followed by mirrored versions of z+1,2,3, before reverting back to z+0.
Logged

Xinael

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #21 on: May 04, 2013, 07:59:27 am »

That makes more sense.

To return to gchristopher's design from the previous page for the magma collection room - I've set this thing up now and it's working quite well. One problem, though - when the bridge is extended, dwarves run into the room and drag the carts away, either to the start of the hauling route, if they're assigned one, or to a stockpile. Because I have to have a gear coming into the room to power the pump and roller, there's no way to block the room off completely and stop them pathing inside. Is my best bet just to forbid the cart after it's launched and reclaim it later if I need it for something else?
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Minecarts for moving magma
« Reply #22 on: May 04, 2013, 08:19:20 am »

Yeah, once a minecart has been added to a system like this, you should forbid it and unassign it from its route for good measure.

Also, if you want to seal your system completely, you could use the front half of a "dry" screwpump (i.e. with nothing to pump) as a substitute wall that can also transfer power. Alternatively you could transfer power into the system vertically.
Logged

Xinael

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #23 on: May 04, 2013, 10:10:38 am »

Having now finished getting all this working - this system is definitely one of the best methods for getting magma upstairs, I think. Very little power required, barely any impact on fps, no need for temperature tweaks, no need for a clear vertical run from the magma to the target area, and practically nothing to produce so you can get it started very early compared to other methods. There's not very much repetitive designation (you go down the whole spiral designating the channels - it's safe to do that all at once because none of them are directly above one another) and then back up doing the tracks, and that's it. The only real downside is that you can't carve or build tracks on constructed ramps, so you have to get your designations right first time and you won't be able to get it above the surface without making an enormous cart accelerator.

Only thing I would add is that this setup produces a ton of magma mist in the room with the channel (presumably where the carts are dropping in) and the system is very fast so you're likely to get a bit of magma on the floor if you're not careful. I'd recommend building it, then sealing off both rooms while the magma dumping is happening, then pulling the lever to halt the system before unsealing it again.

All in all, an excellent day's work!
« Last Edit: May 04, 2013, 10:16:52 am by Xinael »
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #24 on: May 04, 2013, 06:46:40 pm »

I looked into using impulse ramps like this a while back and, as far as I could tell, a minecart basically ignores an impulse ramp if it immediately follows an up ramp, and a single impulse ramp can send a minecart up 5 levels at a time. So, in your case, the cart will be travelling up those 5 levels, ignoring the impulse ramps as it goes, before losing its momentum and rolling back onto an impulse ramp before continuing its journey.

There are, however, alternatives. If you give a minecart a "run-up" using a series of impulse ramps leading to a tight 2x2 spiral, you can get some impressive results:
Spoiler: Table (click to show/hide)

Of course, for a difference of more than 45 levels you would have to use more than one accelerator. This could comprise of a few large accelerators, or a sequence of smaller ones like this:

z+0     z+1     z+2     z+3     z+4
░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░
░▼═╚╗░░ ░░░░▼░░ ░░░░░░░ ░░░░░╗░ ░░╔╝═▼░
░░░░░░░ ░░░░╚░░ ░░░░▼╝░ ░░░░░▼░ ░░░░░░░
░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░ ░░░░░░░

z+0       z+1       z+2       z+3       z+4       z+5       z+6       z+7      z+8
░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░ ░░░░░░░░░
░▼═╚╚╚╗░░ ░░░░░░▼░░ ░░░░░░░░░ ░░░░░░░╗░ ░░░░░░╔▼░ ░░░░░░▼░░ ░░░░░░░░░ ░░░░░░╗░ ░░╔╝╝╝═▼░
░░░░░░░░░ ░░░░░░╚░░ ░░░░░░▼╝░ ░░░░░░░▼░ ░░░░░░░░░ ░░░░░░╚░░ ░░░░░░▼╝░ ░░░░░░▼░ ░░░░░░░░░
░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░ ░░░░░░░░░

(Track bends are all ramps. The straight track could also be an impulse ramp here, but it doesn't seem to make a difference.)
In theory a 5-level accelerator sequence would also work, but would also be a pain to designate.
That's a good explanation! I like those designs a lot better. I'm most fond of the 2x5 spiral as a repeating pattern. Is should be possible to create a helix-friendly version so you can raise magma and water in the same tower structure.

Also, this discussion helps to demonstrate the value of a quantum-piling choke-point. As long as that's the slowest throughput part of a loop, then you can get away with inefficient designs like the spiral I presented.
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Minecarts for moving magma
« Reply #25 on: May 04, 2013, 10:56:55 pm »

Hi there, intresting thread, I was thinking about the same thing, and I'd like your opinion on what I came up with:

In my next fort I want to build something similar, but a bit more reusable: a double helix - powered minetrack system that can go from any floor to any floor...sort of. :)


You can see the basic setup on the attached picture, the double helix is a loop in on itself as the two ramps connect at the very top and the bottom, rollers are installed on every second floor, and you need about 5-8 power/level to operate it depending on what you want to build it with: axles or mechanisms. Plus the additional scaffolding, and the minecart logic system to drive the whole thing...so yeah, that's a lot. :) I use newton's cradles for control in the prototype I built, but a simple ramp based can work I guess.

There is one logic circuit per ride, (SYS) and one central logic piece, the loop system (LOOPSYS). It's function is to keep every green door closed when a cart is in the spiral, not because of collision, but to make sure that carts exit where they should.

The system looks like this: (let's take a ride from lvl20 to lvl1.)
When a dwarf finished loading a cart from the stockpile (TS) on lvl20, it's pushed towards the roller. If the spiral is in use by another car the green door is closed, so the cart goes into a loop. When the door opens, the cart activates the first pressure plate (PP1), which signals the hauling route's minecart logic (SYS1).  SYS1 turns on LOOPSYS and opens the The dark blue door on lvl1 and the orange door on lvl20 (and any other doors that may be on the way.) The minecart makes the round, autodumps it's contents, returns and resets the system with PP2.
The beauty of the system is that it works as long as two different colored doors are opened, (at worst case you travel the helix twice,) you can add more destinations easily to a ride (for eg. food dsitribution to a new block?), and you can reuse an existing ride by connecting a different helix-door and modifying the hauling route - great if you move your stripmining operations to a different level.


It's possible to design advanced switching logic to let more than one cart use the structure, but that task is for another day, as the ride in the spiral + the potential wait in the loop should be negligible compeared to the time it takes to load a cart. (with the obvious exception being water and magma, which lines need a delay timer built in so other carts do not get stuck in a loop.) You can exit the spiral on every second level, but it's pretty easy to reach any level on the map with 2 additional ramps.

EDIT: If you use different materials for the carts, set up the PP2 plates with the weights accordingly, and add a door operated by PP2 to the return side to only let the proper cart in, then you can launch multiple carts into the helix at the same time. The launching loop is not needed, that's also one less logic circuit. The number of routes is limited by the number of minecarts with different weights. 11 routes with vanilla metals plus the woodtypes. hmmm.... :)

One thing I want to use it is to transfer magma to a reservoir at the top, that can be repurposed with a single lever into a magma catapult device. The idea was to have 5 carts with the same program in a row, and gchristopher's pump-roller design is genius for that, thx, I'm going to use that!
Otherwise I have yet to come up with a general fort/stockpile design to take advantage of this system so it's actually useful, and not just a gimmick, so I can say I can juggle 20 minecarts around at the same time. :)

So? Any thoughts?

PS: What do you use to format your code into this compact form? I tried pasting in code from excel/.csv files, but the formatting i get is unreadable. :(
« Last Edit: May 05, 2013, 05:43:41 am by fricy »
Logged

Perroquet

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #26 on: May 14, 2013, 04:09:03 am »

You can find another design for moving magma in this post:
http://www.bay12forums.com/smf/index.php?topic=115102.msg3540946#msg3540946
You have only to replace the helix version (I don't use the impulse ramps.) There is also a helix version with on roller for 7 z-levels but I can't find it in the moment.
In this design I use only a single helix and a drop shaft.
Logged

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: Minecarts for moving magma
« Reply #27 on: May 14, 2013, 05:58:16 pm »

You can find another design for moving magma in this post:
http://www.bay12forums.com/smf/index.php?topic=115102.msg3540946#msg3540946
You have only to replace the helix version (I don't use the impulse ramps.) There is also a helix version with on roller for 7 z-levels but I can't find it in the moment.
In this design I use only a single helix and a drop shaft.
I use a very similar design to yours with one small change to the loading area.
Code: [Select]
Z-1
##P####
##P####
#>>>R##
####*##
#######
The Ps are screw pump pumping from a magma reservoir from the north.
>>R are a 3x1 roller from west->east that covers a ramp.
* is a gear.
Next level up...
Code: [Select]
Z
#######
#######
#....V#
#^*-*R#
#D#####
V is the 1x2 north->south roller (roller covers R, the upward ramp). This continues up to the spiral tower
^ and D together is a 1x2 roller from south->north on SLOW speed. The minecarts drops down to D, and gets pulled into the magma loading trench. You only need 3 magma safe mechanisms here (2 for the roller, 1 for the mechanism in Z-1)
Rest of the rollers are at fastest speed.
Basically, the idea is that the slow roller regulates how fast minecart can enter the system, and therefore preventing a jam (also let my screwpump refill the trench fast enough).
Furthermore, IF there's somehow a jam, I've linked the ^D mechanism to a lever allowing me to disengage the loading system. Then I just have to wait for all the Minecarts to clear the system. Then I just re-engage the loading system to have it resume loading minecarts one by one at a fixed interval).
I've used this system with half the number of roller in the spiral ramp (1 set of roller per every other z-level), and it seems to work reliably.
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

Gigaz

  • Bay Watcher
    • View Profile
Re: Minecarts for moving magma
« Reply #28 on: December 25, 2013, 10:09:51 am »

I'm having a little problem with my magma minecarts.

My track goes down into a 5*3 magma reservoir, filled 7/7. The minecart uses this track and it is for like 10 frames submerged in magma, but when it leaves the reservoir, it is empty. Nothing is dumped in the end.
Do I need a bigger reservoir so that the magma has more time to fill the minecart? Any other ideas?
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Minecarts for moving magma
« Reply #29 on: December 25, 2013, 01:09:25 pm »

I'm having a little problem with my magma minecarts.

My track goes down into a 5*3 magma reservoir, filled 7/7. The minecart uses this track and it is for like 10 frames submerged in magma, but when it leaves the reservoir, it is empty. Nothing is dumped in the end.
Do I need a bigger reservoir so that the magma has more time to fill the minecart? Any other ideas?

Cart movement in liquids is always erratic, the logic is different than on regular tracks. My first guess is your cart is too fast, so it leaves empty, you should try building some track stops to slow it down before sending it into the magma pit. How are the tracks designed? Are using rollers, or impulse ramps to accelerate the carts? How fast do you think your cart is when it enters the magma?

My experiments with minecarts and magma showed that if the speed is right the cart will always collect from 7/7 magma, but if the liquid level is at 6/7 the cart will always leave empty on the first run, and when sent into the magma a second time it will collect again. weird. If I remember correctly magma "collection" happens on the entering ramp, and water "collection" happens on the exit ramp(, or vica-verse). But never have I seen a cart getting filled in the in-between tiles, so the length of the magma pit does not influence the collection according to the !!SCIENCE!! I did.
Pages: 1 [2] 3