Page 1 of 1

sideways stairs, guardrail

Posted: Fri Aug 01, 2014 17:16
by mrf

If I am moving forward and I run into stairs, my character automatically goes up, if I go off the edge of something I fall.
Is there any block that when one runs into it, pushes the character left or right automatically?


Re: sideways stairs, guardrail

Posted: Fri Aug 01, 2014 17:34
by Sokomine
There's none to my knowledge. All that happens once you run into another block that blocks your movement is that your speed is set to 0. Entities like i.e. snowballs behave diffrently there.

It would be great to have an engine feature where players or entities could move on rails and follow the rail's path automaticly client-side, without need for position/direction updates from the server. Such a feature could also handle the movement of items in tubes from pipework. All the client would need to know is that entity x (or the player) now follows "rail" xyz, with "rail" beeing any node type.

Re: sideways stairs, guardrail

Posted: Fri Aug 01, 2014 18:32
by mrf
Thanks for the response. I'm hooking this up to my treadmill so I can run through the world. I don't want to have to steer. So far I've got a trail that takes ten minutes to run from end to end. It would be great if I could build big loops winding around the 'natural' formations in the world.

Re: sideways stairs, guardrail

Posted: Fri Aug 01, 2014 21:07
by Kilarin
But users would want a way to get OFF the rail/stairs/tube

Re: sideways stairs, guardrail

Posted: Fri Aug 01, 2014 21:15
by Sokomine
Kilarin wrote: But users would want a way to get OFF the rail/stairs/tube
Same as when leaving a cart. At least the local client could update the change the local player caused immediately. Railroad switches might be a bit diffrent.

Re: sideways stairs, guardrail

Posted: Sat Aug 02, 2014 13:06
by rubenwardy
You could do this with mods. Like making an invisible mine cart.

The steps and falling is client side, which is best for client movement. Servers dictating a client's movement is prone to lag.

Re: sideways stairs, guardrail

Posted: Sun Aug 03, 2014 12:17
by Wuzzy
Since this thread is more or less about handrails: Well, I know of a few mods which add handrails:
Riventest <viewtopic.php?f=9&t=9446&hilit=riventest> is a Riven-themed subgame which adds handrails and staircases.

None of the nodes push the player to the left or right, that would almost certainly require an engine change. But I hope I could help anyways.

Re: sideways stairs, guardrail

Posted: Sun Aug 03, 2014 14:40
by Sokomine
I'm afraid handrails won't help much in this case. Mrf wants his character to be turned around - handrails just stop him from falling down. A path with some bridges/handrails might of course make his "tour" more intresting.

As this most likely happens in singleplayer, there might be some ways to circumvent the problem which may not be available on servers due to high load/delayed turning of the player they'd cause there. It would be possible to introduce nodes that check the direction the player standing in front of them is facing and turn the player around. Doing such checks (player standing in front of the node and facing it? -> turn the player instantly by 90 degrees; left or right depending on node) once a second would be easy and no more load than mesecon "doormats". A second may be a long time if you're waiting for it to happen, and instant turning might be irritating. Higher resolution on the timescale is possible but takes a diffrent approach, would cause more load, is more difficult to implement and would be a bad idea for servers.

Re: sideways stairs, guardrail

Posted: Tue Aug 05, 2014 11:10
by mrf
Thanks to all for your input on this. I am very new to Minetest and these types of games so forgive me if I seem clueless.

Sokomine you're right, I would want to change orientation of the player in addition to changing direction. Stairs don't do that. It's not totally clear to me from the discussion if this can be achieved as a mod but from looking at the code for PilzAdam's carts it looks like may be possible, (but I haven't tried the carts so I haven't actually observed their operation). I do intend to use this in single player mode, but if it's a mod it only applies to the clients that have it loaded, otherwise it's just just a plain old node, is that accurate?

On my existing trail constraining movement to stay on the trail is simple irrespective of the orientation of the user. The trail is several nodes wide with a raised node on either side to act like a guardrail. If you want to leave the trail one simply jumps over the guardrail and runs off into the sunset.