minecrift icon indicating copy to clipboard operation
minecrift copied to clipboard

[Dev Talk] Vivecraft Network API

Open possi opened this issue 9 years ago • 11 comments

Propsal: MC|Vive|ProjectileSource byte[] = (3 * 8 byte = x / y / z) + float force

Send just before "BlockPlace"-Packet.

So MineVive can correct projectile origin and force for more accurate bow shooting.

possi avatar Jun 21 '16 17:06 possi

I don't know if I can do this without modifying files that I shouldn't. Will check though.

jrbudda avatar Jun 21 '16 19:06 jrbudda

Alternatively, I could just implement this into Vivecraft Forge Extensions.

Techjar avatar Jun 22 '16 23:06 Techjar

I would like for there to be a server plugin for both Spigot and Forge. I will build into Vivecraft as much as possible to minimize the work needed on the server end.

Also possi I think you should rename your plugin to Vivecraft Spigot Extensions :).

jrbudda avatar Jun 23 '16 06:06 jrbudda

To expand on this what we should do is come up with a whole series of packets to represent the HMD / controller positions and directions to the server. I know Techjar wrote his Forge ASM to extract them directly and send them to himself, but having Vivecraft send the packets in a non-platform-dependent way is a goal.

jrbudda avatar Jun 23 '16 06:06 jrbudda

I don't really see how this helps though, because you can't really do much with that data without Forge. The Bukkit API is just too limiting.

Techjar avatar Jun 23 '16 06:06 Techjar

except properly spawn projectiles and dropped items and correctly calculate server-side raytraces, and player height for collision, and block reach at high world scales... and projectile damage based on draw length... and weapon damage based on swing speed.... list goes on.

jrbudda avatar Jun 23 '16 07:06 jrbudda

Ok I've started working on a Vivecraft network API. The old packets are still in there but moving forward the custom packet channel will always be 'Vivecraft' and we're going to use Forge's system where the first byte of the payload tells you what the rest of the payload is. This way Forge mods can just register the channel and packet handlers. Bukkit will have to process the packet manually after reading the first byte.

Right now the only one hooked up is Vivecraft/0 which is Version. I send the old MC|Vive|Version + versionstring and then Vivecraft/0+versionstring

If the server responds with Vivecraft/0 it enables teleporting and also prints out the payload as a string. So if you update to use this channel return the name/version of your plugin as the payload and it will be displayed to the user.

jrbudda avatar Jun 23 '16 12:06 jrbudda

@Techjar: If the client sends custom packets for player limb-position, a/my spigot-plugin could forward this packets to all near players so even on a non-forge-server the clients could see limb-movements.

@jrbudda okay. I'm going to implement the new channel in spigot.

possi avatar Jun 23 '16 16:06 possi

Link to evolving google doc

https://docs.google.com/document/d/16T9US69H37gq6029E7DTTltE_aM8mcf1M6x6CP8ckjk/edit?usp=sharing

jrbudda avatar Jul 06 '16 23:07 jrbudda

v27 includes the document as it stands now http://pastebin.com/mGPHvmLv

jrbudda avatar Jul 09 '16 19:07 jrbudda

1.10 update vanilla packets now use PacketBuffers in their constructor. The only change to the API is now the VERSION packet uses and expects a payload made using PacketBuffer.writeString();

jrbudda avatar Jul 23 '16 02:07 jrbudda