SmallJoker / boost_cart

The original version of minetest_game's carts (since 2018).
15 stars 14 forks source link

Enable physics when cart is off-rail #24

Open R-0ne opened 6 years ago

R-0ne commented 6 years ago

Hello,

Would it be possible for the cart to leave normal rails if it does not meet a stop rail for example ? this would allow to drop the cart several blocks at once to fall back on rails for theme park maps for example.

thank you

SmallJoker commented 6 years ago

The cart does not have physics enabled for the reason that it would break while going up- and downhill. However, it would be possible to turn that on as soon it's no longer on rails. Additionally do many cart railways rely on the behaviour that the cart stops when there's no rail to continue moving, so it should be an optional feature unless it's acceptable that carts slide away several nodes (depending on max speed).

benrob0329 commented 5 years ago

I feel like making railways add a break or start/stop rail is a small price to pay for being able to have much more flexible cart routing and distribution.

numberZero commented 5 years ago

railways rely on the behaviour that the cart stops when there's no rail to continue moving

Does that work reliably? I had great problems with cart passing several air nodes on a laggy server.

Anyway, I’d prefer to have explicit buffer stops do the job. These are nicer and more natural.

SmallJoker commented 5 years ago

@numberZero boost_cart does not skip rail node checks (any more) due to the pathfinder algorithm I implemented a while ago. So either it's caused by an outdated clone or by a new, yet unhandled case where the cart moves but on_step is not called. However, it's still possible that the cart does not stop at start/stop rails because the pathfinder only checks whether there are continuous rail nodes.