Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chairs get stuck and drop off in unloaded chunks #3

Open
superfloh247 opened this issue Dec 14, 2022 · 4 comments
Open

chairs get stuck and drop off in unloaded chunks #3

superfloh247 opened this issue Dec 14, 2022 · 4 comments

Comments

@superfloh247
Copy link

Hi,

we built this long chair lift into Wunderwelt (www.wunderwelt.one) and it looks like it has some problems with the chairs: they either get stuck or fall off when not all chunks are loaded.

I'd like to discuss some ideas which can all be added with config options to existing worlds without breaking things (default just stays as it is right now)

  • entity movement: chairs traveling up or down should do that in one operation. currently it looks like they first go in x/z direction, then y afterwards.
  • empty (not seated player) chairs should dissolve after a (configurable) time span
  • players should not be able to place chairs on the wire
  • players should not be able to remove chairs from the wire
  • new node: chair lift entry
    -- must be placed near the wire
    -- clicking it places a chair on the wire and seats the player
    -- recipe configurable: either regular or "admin only"
    -- can be en/disabled with mesecons
  • new node: chair lift exit
    -- detaches the player from the chair nearby and destroys the chair entity
    -- this node prevents players from staying in the lift until they get kicked for inactivity. without this node a chair lift would create a force load loophole for large factories.

Looking forward to some discussion :)

Greetings,
Florian

screenshot_20221214_230516
screenshot_20221214_230503
screenshot_20221214_230446

@debagos
Copy link

debagos commented Dec 14, 2022

Short video that shows the choppy cabin movement and a fallen down lift:
https://wunderwelt.one/chair_lift_issue_video

I suggest changing set_velocity to add_velocity here:

self.object:set_velocity(vector.multiply(vector.normalize(diff_pos), act_speed))

Reason:
https://github.com/minetest/minetest/blob/587f6656a4b86346e35da1b43b48b832d3f1b32e/doc/lua_api.txt#L6852

@sfence
Copy link
Owner

sfence commented Dec 15, 2022

Short video that shows the choppy cabin movement and a fallen down lift: https://wunderwelt.one/chair_lift_issue_video

I suggest changing set_velocity to add_velocity here:

self.object:set_velocity(vector.multiply(vector.normalize(diff_pos), act_speed))

Reason: https://github.com/minetest/minetest/blob/587f6656a4b86346e35da1b43b48b832d3f1b32e/doc/lua_api.txt#L6852

The doc says: "In comparison to using get_velocity, adding the velocity and then using set_velocity, add_velocity is supposed to avoid synchronization problems."
My comment is: I am not using get_velocity to get actual velocity, add some vector value and set it. I am calculating the new velocity from the previous and new positions difference.
I can add old and new velocity diff calculation and add_velocity usage, but an identical result can be expected.

Choppy cabin movement is caused by some velocity vector calculation problem when the cabin is moving from one to a different chair node.

@sfence
Copy link
Owner

sfence commented Dec 15, 2022

Hi,

we built this long chair lift into Wunderwelt (www.wunderwelt.one) and it looks like it has some problems with the chairs: they either get stuck or fall off when not all chunks are loaded.

I'd like to discuss some ideas which can all be added with config options to existing worlds without breaking things (default just stays as it is right now)

....

Hi,

Thanks for the feedback.

  • I know about not clear movement. It is caused by velocity vector calculation when the cabin is changing rope nodes.

  • I am not sure if dissolving is a good idea because the cabin is crafted from some amount of material that gets lost.

  • Other points look like it can be solvable by adding configurable behaviors or a new type of cabin.

I will try to keep this in mind and return to it in some time.

@superfloh247
Copy link
Author

the cabin is crafted from some amount of material that gets lost

would be solved by

new node: chair lift entry
new node: chair lift exit
new type of cabin

The use case in larger public worlds is that the chair lift is a "tourist attraction" that shows you around some of the cool spots in the world. It's desirable that players cannot add and remove chairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants