Automat-GH / minecrift

Modified version of Minecrift VR mod that focuses on the Vive and room scale VR
Other
115 stars 11 forks source link

You shouldn't be able to teleport to unreachable places #4

Open neuhaus opened 8 years ago

neuhaus commented 8 years ago

You shouldn't be able to teleport to a spot that you cannot reach by normal movement.

Here is an example in the attached screenshot: I can teleport across the 2 block gap even though there isn't room to jump across due to the low ceiling.

minecrift 1 7 10 r2b-vive vr 15 05 2016 18_19_05

If it isn't clear from the screenshot I can also upload a video.

gazpachoking commented 8 years ago

Ehh, I don't feel striving for 1:1 parity with non VR locomotion is something good. Yes, having teleporting enables things that are not possible with the keyboard control scheme, but I think those mechanics are fine in VR.

neuhaus commented 8 years ago

Enabling this type of previously impossible movement is partially breaking the game because these mechanisms have been carefully designed and a lot of stuff depends on it such as fall damage and level design. It'd make the game less interesting. Also, if you have a server with a mixed population (VR and non-VR players) you will want to submit them to the same rules and limitations, right? I understand that some players and server admins are OK with the ability to teleport around at will without limitations. Ideally it would be configurable on the server side how teleportation is restricted (maximum range, frequency, cooldown and other restrictions such as maximum height difference) and this setting is communicated to the client so it can use this information for the UI.

gazpachoking commented 8 years ago

Also, if you have a server with a mixed population (VR and non-VR players) you will want to submit them to the same rules and limitations, right?

Ehh, I think striving for this might end up limiting the funness of VR (at least for me.) I am totally fine with changing the mechanics of the game to better suit VR. Having my teleport blocked because you wouldn't be able to jump there does not fall under the 'fun' category for me.

I am not necessarily against making the movement more comparable, just putting it out there that it seems totally fine to me to change the mechanics of the game to better suit VR.

joshburt commented 8 years ago

So I managed to find a middle ground that suited me. I'll bring it up here for discussion to see if its something others might be interested in.

The TL;DR Neuter 'restrictedViveClient' within the code base.

Back Story I wanted to be able to connect to my dedicated servers and still be able to use this mod. So, I updated the code base to ensure that restrictedViveClient was always false. Meaning that the mod will always try to use the teleport locomotion. The anti-cheat mechanics of the vanilla server prevent the player from moving too far. Basically the server handles all the checks and this mod 'as-is' can have the movement always in check by what the game is expecting.

The server console reports instances of 'player moved wrongly', but I have not had issues getting kicked from the server.

Toggling Locomotion Types Currently its only possible to turn on classic movement via Right Crtl + R. I updated this logic to toggle the current locomotion type when pressed. It allows me to switch to between classic and teleport even when on multiplayer servers. Its the best of both.

The updates in both cases above are minimal and I can submit PRs for both changes if they would be beneficial to the group.

Automat-GH commented 8 years ago

How far does the vanilla server let you move when you try to teleport? I actually tested the same thing at first and found that one server would let me teleport a reasonable distance still, but a completely fresh install on another PC wouldn't let me teleport even a single block. Have you tried connecting to various public Minecraft servers?

joshburt commented 8 years ago

I have not tried any public servers. I was able testing against a vanilla (dedicated) 1.7.10 server.

I did notice some interesting behavior with how it treated some attempted movement. Interactions around corners, or ledges blocked by server were very noticeable. Also interestingly I was able to see the blocked movement under a lot of conditions where where was no space above me (like being in a 2 block high room.

I had similar results when jumping to the targeted location would also have been impossible.

joshburt commented 8 years ago

I figured it would be easiest if I just recorded the interactions of specific note. Here's a few videos.

Notice that movement does get blocked, and most frequently its when interacting between planes (different Y axis), or blocks that form corners/edges. https://youtu.be/KObDkpEhASw

The second video shows the interaction you described. Both videos are from the same play session (same server/client setup). I was finally able to escape by walking into a block so that I was moved on top of it. After that the teleport worked normally again. shrugs https://youtu.be/3g1p8je7-bk