Minetest_game: Carts: Slowing and reversal on long climbs

Created on 23 Nov 2016  路  18Comments  路  Source: minetest/minetest_game

From IRC:

03:22 paramat testing carts on a long upward slope, continuous power rails, i'm finding sometimes the cart will stop and go down again
03:24 paramat if 'jiggles' and slows down, then reverses direction
03:36 paramat climbing bug seems worse at low speeds
03:40 paramat setting power rail to acc 9 seems to help. maybe the problem is the interaction betweem gravity acc and power rail acc
03:55 paramat anyway, accelerating the cart to max speed before hitting the base of the climb seems to help
03:58 paramat .. which is what you would want anyway as speed at base = climb speed
04:16 paramat each jiggle slows the cart on a climb. because power rail acc = gravity acc the lost speed is not recovered, it may be necessary to raise power rail acc to 5 to help with this bug

I tried a few alterations, currently i think increasing the power rail acceleration to 5 is the most helpful change for this bug.
A reversal on a long climb is frustrating, imagine it happens on an extremely long climb, you have to go all the way back down again.

Possible close Unconfirmed bug

All 18 comments

Honestly, I'd just leave it like it is and claim that the powerrail isn't powerful enough for a continuous climb, and people will have to add horizontal sections to overcome this problem.

Never ever do we state that the powerrail is guaranteed to push a cart up a 45 degree incline for as long as you want.

So, bad rail design, not a bug.

Come on, let's not make the game too easy on every damn aspect.

I'm wondering, if you punch the cart going uphill, do you avoid the issue? May be another reason to just leave it like this - could be a challenge to some players.

Honestly, I'd just leave it like it is and claim that the powerrail isn't powerful enough for a continuous climb, and people will have to add horizontal sections to overcome this problem.

@sofar do horizontal sections fix this problem? It sounds to me like @paramat meant that the cart starts to reverses its direction which would not be affected by horizontal sections. 馃槙

What if holding forward (W key) in the cart forces its acceleration to always stay a very small value above 0. Could that fix it?

In general I see it like @sofar :
carts don't have to be 100% perfect to be an enjoyable addition to the game - as long as this issue does not bother too many people, it shouldn't be too much of a problem. 馃槃

I think it depends on entry speed. Try going at maximum speed before slope (place some more power rails before slope and make sure slope rails itself are power rails), it should help. Placing in pattern 1rail-1power-1rail-1power will boost you up 11 blocks only when approaching at full speed.
Update:
I've tried approaching the slope at full speed and went up on power rails from y=12 to y=212 without problems, and I think I can go much higher. Examples: https://i.imgur.com/MiviSpO.png , https://i.imgur.com/IMsqSOP.png

Never ever do we state that the powerrail is guaranteed to push a cart up a 45 degree incline for as long as you want.

Well this should be what we aim for, or at least make it work 95+%.

Being able to climb a slope is not making things overly easy. Minetest is very vertical and long climbs will be very common and players will want them to work most of the time as an automatic ride without punching. A reversal on a long climb is very frustrating as you cannot avoid returning all the way to the bottom unless long straight sectons are inserted, but these will be an unnecessary use of resources and annoying to be forced to build.

Even when hitting the base at maximum speed the climb will often fail with a chance that is too high, like 25%. With my suggestion of power rail having acceleration 5 failures still sometimes occur, there is yet no perfect fix but reducing the chance of failure is a good idea. So if you want a small chance of failure it will still be there, it will just not be unacceptably likely.

The problem with having power rail and gravity equal at 4 is that each little jiggle reduces speed which then cannot be recovered, this greatly increases the chance of a reversal, even if a reversal doesn't happen it means the cart slows down too much on climbs. This might be why boost cart had a power rail acceleration that was more than twice gravity acceleration.

@SmallJoker any input on this? How does boost cart cope with long climbs?

Fixer-007 how many times did you test your long climb?

how many times did you test your long climb?

like 5 times...

@RHRhino yes, adding a horizontal section with power rails will make the cart speed up again. The cart will never slow to a halt on a horizontal power rail, only ever speed up to full speed.

The (boost) carts are supposed to keep the speed or even accelerate slowly when going upwards on powerrails. The old speed up/slow down on the Y axis was about -2, while the powerrails accelerated by factor 5. With the "gravity change" in this MTG version this behaviour was reversed. I would like to make this consistent with the other carts mods and increase the acceleration of the powerrail to at least 5.

5 seemed to help in my tests, i would like this unless someone finds an alternative fix.

boost cart had a power rail acceleration that was more than twice gravity acceleration.

I think this is why the bug wasn't a big problem in boost cart.

The (boost) carts are supposed to

Subjective. We have no requirements listed other than "we want carts to move around in". :)

boost cart had a power rail acceleration that was ...

Again, there's no rules that say we must stay the same to the old behavior.

I find carts that accelerate horizontally faster than gravity unrealistic. I'd like carts to be useful, but not in a way that it becomes a huge advantage over walking. In the same fashion, I don't think you should be able to build an uphill ramp and expect to use power rails only once in a while.

So, the question isn't "what did boost_cart do", but it should be "what is a good balance between difficulty but still fun".

It seems this thread isn't answering the right question, everyone is just complaining that they're being disadvantaged. But the disadvantaging is on purpose. I added it, on purpose (other people also asked for reduction of speeds in the original PR).

Compromise?

From me, I could live with a guaranteed uphill speed if the cart would go uphill at a _limited_ speed on power rail - e.g. after starting full speed, the speed would drop to (perhaps) 2m/s going uphill but never below. This would have to be a continuous uphill power rail, of course..

Problem is spontaneous lua jitter that decreases climb speed, if you are going uphill at 7 nodes/sec, thats usually not a problem, jitter happens rarely and you can lose 1-2 nodes/sec at most and you will reach the top. Currently if you are going uphill with powerrails - your speed will be constant, it is lua lag that lower the speed rarely. So approach your slope with good speed and you will be totally fine.

From me, I could live with a guaranteed uphill speed if the cart would go uphill at a limited speed on power rail - e.g. after starting full speed, the speed would drop to (perhaps) 2m/s going uphill but never below.
(perhaps) 2m/s

Please no :-1:

"We have no requirements listed so carts can be crap. There are no rules saying it can't be crap"

Cart and Boost cart mods don't have this problem due to the excess of power rail acceleration over gravity acceleration, players wll expect a reasonably reliable long uphill climb.
If you compare to a rollercoaster an acceleration of 5n/s^2 is tame, a Tesla model S pulls over 1G.

I'd like carts to be useful, but not in a way that it becomes a huge advantage over walking

7n/s is not excessive, it feels about right and i support it being slower than the original mods.

I don't think you should be able to build an uphill ramp and expect to use power rails only once in a while.

I agree, but we're not requesting that, continuous power rails are essential and will continue to be.
We're not debating lack of speed, i agree with you on that, this is about common failed climbs.
Concerning difficulty, mining enough resources to build a long climb of several hundred vertical nodes is a huge effort, there's plenty of difficulty. At the end of this i think players should be rewarded with an upward climb that works most of the time, otherwise it will be very frustrating and disappointing.

I could live with a guaranteed uphill speed if the cart would go uphill at a limited speed on power rail - e.g. after starting full speed, the speed would drop to (perhaps) 2m/s going uphill but never below.

No thanks, that's half the speed of walking up stairs.
It's the low speed that causes the reversal, i spent hours testing a long climb and editing the code, so far a power rail of 5n/s^s to maintain maximum speed is the only thing that helps. Until you find an alternative solution to this problem your preference is not realistic.
There's nothing wrong with a high speed on upward climbs, see #515 the whole idea is 'some way to move around quickly' and 7n/s is not that fast.

The whole point you spend the effort building a railway is to move faster. So it should be an advantage

Anyway, i'll make a PR for acceleration 5, maybe later an alternative solution will be found.

at least don't close this bug until we solve the underlying issue where carts lose all velocity. Even if the workaround gets merged, we'll still have carts lose speed randomly that could break people's straight sections without powerrail.

^ Certainly i agree.

1408 is merged.

Smalljoker's tweaks seem to help a lot with this bug, but i was testing in perfect conditions, so let's keep this open for a while.

No longer seems an issue, can always reopen later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benrob0329 picture benrob0329  路  4Comments

Fixer-007 picture Fixer-007  路  6Comments

HybridDog picture HybridDog  路  4Comments

Wuzzy2 picture Wuzzy2  路  4Comments

cx384 picture cx384  路  6Comments