-
Notifications
You must be signed in to change notification settings - Fork 9
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
PPA: Entity packets #11
Comments
It would be nice if these could be identical to the 1.x packets... Is this the case? |
I don't think they are |
I think it might be a better idea to do the resource packs thing instead of reinventing the wheel for every model... although I can't think of a way to make anything but KV6 models and sounds work in a cross-platform way. |
do they need to be bound to player? 🤔 not sure, just thinking out loud. |
You mean for intel and such? Could be useful |
The 1.x entities have a "carrier" field which can specify which user is currently carrying the object. I think genereally it would be useful to make this as close to the 1.x packets so the implementation only has to be done once. https://piqueserver.github.io/aosprotocol/protocol100a1.html#entity |
Packet Entity Carrier (0xE6)If an entity is carried, position is relative to the carrier point defined by
|
a few more concerns:
|
|
Sound good, except for this part:
Well, due to the internet being the internet, care needs to be given in implementation that e.g. a carrier packet can arrive before a create packet and everything is fine. Sure, everything can be sent as Sequenced and Reliable, but that might make things like e.g. an outdated velocity packet arriving out of sync with a newer position packet weird. Also note that the current update frequency on the server is only 10Hz, so I'm very cautious of the server-side only physics idea. What is the purpose of the Entity team packet? Giving certain KV6s constant IDs would allow not only for caching, but also for modding the models client-side. |
I'll summarize some thoughts:
|
|
|
What about adding an option to be able to set these as tools? |
Maybe in a later revision. |
Would it be better to have a simpler cut down version of this which can cover CTF and TC and anything else that can be done using mostly-static entities? I'd also be tempted to do it as a "Set Entity" packet which would set all relevant fields, and a "Destroy Entity" packet which would delete an entity concisely. Later protocol versions could have a "Set Entity V2" packet. As far as fields go though I'd do away with velocities (linear and angular), and instead opt for a float field which would indicate a number of seconds to linearly interpolate towards the position. Carrier stuff is definitely worth having. Providing an offset and rotation will most likely be useful but that's kinda leaning in the large direction... but should decently genericise the rotated intel on one's back. Whether that should be part of the initial version of this or not is another matter. For rotation, 8 bits is probably not enough. 16 bits, on the other hand, would for example give someone about 80 steps at the fogline (127.5 blocks away) to move from one side of a block to the other. I'm very much eyeing up 16-bit angles for that "new protocol!!!!1" idea that's been swimming around in my head (which is partially why I'm considering all that RISC-V stuff that I've been blabbering on about in the Dicsord). As for sending KV6 models... those are too good an opportunity to miss out on. I'd definitely reserve some of the model IDs for the stock AoS models and that could allow one to swap out models for... other models I guess? So basically, here's what I'm suggesting:
And then get rid of these packets from the initial version:
And there you have it, that's the physics can solved by kicking it down Next Proposal Road. |
Ideally, the "interpolation time" would be the absolute time that it should arrive at the desination, in number of ticks. But that would require exact time synchronization and lockstep between client and server, which we unfortunately don't have. So we will continue to have issues with high pings and especially spikes there. |
I propose these packets to perform actions on entities:
(packet ids begin with 0xE as a reference to the word
entity
)Packet Entity Create (0xE0)
kv6_voxels/world_block
Packet Entity Destroy (0xE1)
Packet Entity Move (0xE2)
Packet Entity Velocity (0xE3)
Packet Entity Rotate (0xE4)
If the absolute flag is not set, rotation fields are used as 'velocities' in unit
degree/s
.This is useful for constantly rotating ammo boxes, or the rotor of a plane etc.
[0°,360°]
to[-128,127]
Packet Entity Team (0xE5)
Packet KV6 Load (0xEF)
The text was updated successfully, but these errors were encountered: