Bay 12 Games Forum

Please login or register.

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

Author Topic: Perpetual Motion Minecart Grinder & Other Weird Physics  (Read 23429 times)

QuantumMenace

  • Bay Watcher
    • View Profile
Perpetual Motion Minecart Grinder & Other Weird Physics
« on: August 05, 2012, 04:22:40 pm »

Apologies if this has been discovered before, but it's hard to search for something like this.

One of the oddities about minecart physics is that if a cart derails and moves onto a ramp from the side, it will be considered "higher" and roll down off the ramp. That can be exploited to make it behave like an Escher drawing:(link)

Here's one possible layout. Make a series of 2x2 rooms connected to each other or hallways only by the corners. Preferably, at least one corner of each room should have no outlet. Build or designate 2 E/W and 2 N/S track ramps in a pinwheel pattern. These don't need open space over them.
Spoiler (click to show/hide)

Build a 1x1 retracting bridge in each room, in a corner with no outlet. This is because retracting bridges can scatter items 1 tile in any direction and might otherwise throw the cart out of the room. Connect the bridges to a lever. Use hauling routes or dumping to place a cart on each bridge, then forbid the carts.
Spoiler (click to show/hide)

When the enemy approaches, pull the lever. Without the bridge there, the cart will roll off the ramp onto the next ramp and so on, making a rotation around the room every 32 ticks. Since the cart is always on a ramp, no creature will stop its movement indefinitely. Generally any creature hit the first time won't be able to escape at all because the cart will hit it again before it can recover from the stun. Once the invaders are thoroughly pulverized you can pull the lever again to stop the carts.
Spoiler (click to show/hide)

Another option is digging 2x2 ditches in a larger passage and filling them with this hazard. I'm sure you'll find more ways to exploit this. Enjoy.
« Last Edit: August 05, 2012, 11:54:05 pm by QuantumMenace »
Logged

Drazinononda

  • Bay Watcher
  • I'm really too normal to play this game so much.`
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #1 on: August 05, 2012, 06:55:02 pm »

Just so you know, I registered for this account just so I could congratulate you on your genius.
Logged
Children you rescue shouldn't behave like rabid beasts.  I guess your regular companions shouldn't act like rabid beasts either.
I think that's a little more impossible than I'm likely to have time for.

slowpokez

  • Bay Watcher
  • B12's Department Head of Arts & Recreation
    • View Profile
    • Cloudsprite
Re: Perpetual Motion Minecart Grinder
« Reply #2 on: August 05, 2012, 07:02:00 pm »

Just so you know, I registered for this account just so I could congratulate you on your genius.
Welcome to b12 one of the worlds last beacons of insanity! :D

Also:
If this thing is as amazing as you just described it this is truly a great day for !!science!!. Just brilliant.

denito

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #3 on: August 05, 2012, 07:12:22 pm »

I'd been looking for something to do as a first minecarts project, I guess this will be it.  Hmmm...  I wonder if this can be combined with a magma-mister...
Logged
My wife: "Are you playing that midget fort game again?"

Mura

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #4 on: August 05, 2012, 07:14:33 pm »

Congratulations.
Logged
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #5 on: August 05, 2012, 10:20:39 pm »

I tried, but it seems like you can't use this to derail carts uphill. I wanted to make a free energy cartlift.

If we come up with a way to release the carts from the perpetual motion machine, I wonder if they "charge up" enough energy to go uphill?

Mura

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #6 on: August 05, 2012, 10:30:08 pm »

I tried, but it seems like you can't use this to derail carts uphill. I wanted to make a free energy cartlift.

If we come up with a way to release the carts from the perpetual motion machine, I wonder if they "charge up" enough energy to go uphill?

I'm sure we can come up with ways. As for going uphill, I think you need rollers or dwarfs for that.
« Last Edit: August 05, 2012, 10:41:25 pm by Mura »
Logged
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

denito

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #7 on: August 05, 2012, 10:36:00 pm »

I tried, but it seems like you can't use this to derail carts uphill. I wanted to make a free energy cartlift.

If we come up with a way to release the carts from the perpetual motion machine, I wonder if they "charge up" enough energy to go uphill?

Maybe instead of a loop use a zig-zag pattern?  Or perhaps a spiral accelerator, where the carts start in the center and make larger and larger loops until they exit?
Logged
My wife: "Are you playing that midget fort game again?"

QuantumMenace

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder
« Reply #8 on: August 05, 2012, 11:45:27 pm »

Another thing to note is that you can add a second cart to the grinder. Haven't tested its effectiveness but it should work fine in theory.

I guess this is as good a time as any to discuss my other findings from my attempt to make a track switch with a sideways-sloped ramp intersection and a door blocking the straight route.

Using this as a loop or diagonal/zigzag won't accumulate speed because the cart loses its speed every time it hits a wall. However this linear accelerator works somewhat:

  -_#\-___#\--

That's a straight track, channeled gap (with ramp removed!), fortification, and track ramp in that order, followed by a straight track (may not be needed), 3 or so channels, a fortification and another track ramp, and so on. When a cart goes over a gap it will fly through a fortification, but the ramp on the other side still counts for momentum purposes. The tough part is that the ramp only counts if the cart is rolling on it and not flying over it, and it flies further the faster it's moving. There's only a certain amount of speed you can get before you can't get it to land on the ramp just right to keep getting more speed.

The other thing I found is that the game doesn't know how to handle the slope of intersection track ramps in some cases, and considers them to have no slope at all.

Code: [Select]
WWW   WWW   ..W
=+W   =+W   =+W
WWW   ..W   ..W

Where W is a wall and + is a NSEW track ramp, the case on the left propels a cart to the left. However, the other two don't make the cart roll in any direction. If you have a dwarf push a cart up a slope made of all-direction track ramps that only have walls on 1 or 2 sides, it will go all the way to the top! Strangely, a cart that starts moving because of rollers will instead move up 1 z-level and stop on the ramp there (maybe based on speed or something??). I still have to test if it will keep going upwards with alternating NSEW ramps and straight, non-ramp tracks. In any case, it won't roll downwards of its own accord, meaning you can make guided carts on ramps perfectly safe in theory.

Which brings up another, seemingly more effective linear accelerator:

_    _    _
  \+  \+

where \ is a downward E/W or N/S track and + is an all-direction track ramp that has the walls on one or two sides removed. Unfortunately this has a similar drawback as above: after a certain speed, the cart will fly off the track instead of going down the downward slope.

Edit: apparently that has pretty much the same effect as using regular slopes on both sides as noticed before:

_    _    _
  \ /  \ /

However, it doesn't work the same way going backwards. The intersection track method appears to slow and stop a cart moving left, causing it to accelerate to the right.

Anyways, have fun with non-Newtonian physics, who knows how long they'll last!
« Last Edit: August 06, 2012, 12:37:28 am by QuantumMenace »
Logged

DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #9 on: August 06, 2012, 01:28:56 am »

The one-way linear accelerator that you mentioned might be a decent alternative to rollers, when used to bounce a cart back in the opposite direction. Perhaps that, combined with the fact that the minecart will fly over a gap of a certain length eventually (if given time to accelerate), can be used to bounce a minecart back and forth until it reaches a desired speed, upon which it jumps a gap and is "released". If that's possible, it would make an excellent feature in places where machine power is unavailable.
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

Di

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #10 on: August 06, 2012, 05:36:28 am »

Sir, you truly deserve a medal for this discoveries.

As for this:
I tried, but it seems like you can't use this to derail carts uphill. I wanted to make a free energy cartlift.
If we come up with a way to release the carts from the perpetual motion machine, I wonder if they "charge up" enough energy to go uphill?

or to be more exact, slight modification of it
Spoiler (click to show/hide)
will work.
« Last Edit: August 06, 2012, 05:44:56 am by Di »
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Triaxx2

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #11 on: August 06, 2012, 08:27:20 am »

I've tried out a cart actuated goblin chopper. Basically one pressure plate is linked to the power for a cart roller on a short track that's five tiles long. One acceleration tile, one pressure plate activated by the cart, a second acceleration tile and a roller running the other way. This causes the cart to bounce back and forth until the power to the rollers is disengaged. Linking it to upright spikes or spears turns them into an automated ventilator.

Faster than a water repeater and more reliable, as long as you have power.
Logged

QuantumMenace

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #12 on: August 06, 2012, 09:28:35 am »

Checking again, the cart started by a roller will move up two z-levels and stop on the next ramp. If you put the roller on the ramp, you might only need a roller every 3 levels.

But I found a much better linear accelerator:

WWWWWWWWWWWWWWW
=LLLLLLLLLLLLLLLLLLLLLLLL=

Where W is a wall and L is a N/E curve track ramp (for example). The cart derails and lands on the track ramp, which accelerates it east even though the wall is to the north! This repeats until it's more than fast enough to launch items. I'm not certain if there's a maximum speed, but it did become fast enough to sometimes move 2 tiles in 1 tick.
Logged

hjd_uk

  • Bay Watcher
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #13 on: August 06, 2012, 01:22:19 pm »

Awesome, a Dwarven Minecart LINAC. So this would make an awesome Shotgun barrel?
« Last Edit: August 06, 2012, 01:40:39 pm by hjd_uk »
Logged

Iosyn

  • Bay Watcher
  • KAKAKA
    • View Profile
Re: Perpetual Motion Minecart Grinder & Other Weird Physics
« Reply #14 on: August 06, 2012, 06:03:43 pm »

Checking again, the cart started by a roller will move up two z-levels and stop on the next ramp. If you put the roller on the ramp, you might only need a roller every 3 levels.

But I found a much better linear accelerator:

WWWWWWWWWWWWWWW
=LLLLLLLLLLLLLLLLLLLLLLLL=

Where W is a wall and L is a N/E curve track ramp (for example). The cart derails and lands on the track ramp, which accelerates it east even though the wall is to the north! This repeats until it's more than fast enough to launch items. I'm not certain if there's a maximum speed, but it did become fast enough to sometimes move 2 tiles in 1 tick.
I think you just boosted the efficiency of my railgun by about 200%.
Logged
Pages: [1] 2 3