{"action":"created","issue":{"url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/11","repository_url":"https://api.github.com/repos/piqueserver/aosprotocol","labels_url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/11/comments","events_url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/11/events","html_url":"https://github.com/piqueserver/aosprotocol/issues/11","id":282644224,"number":11,"title":"PPA: Entity packets","user":{"login":"xtreme8000","id":5209179,"avatar_url":"https://avatars2.githubusercontent.com/u/5209179?v=4","gravatar_id":"","url":"https://api.github.com/users/xtreme8000","html_url":"https://github.com/xtreme8000","followers_url":"https://api.github.com/users/xtreme8000/followers","following_url":"https://api.github.com/users/xtreme8000/following{/other_user}","gists_url":"https://api.github.com/users/xtreme8000/gists{/gist_id}","starred_url":"https://api.github.com/users/xtreme8000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtreme8000/subscriptions","organizations_url":"https://api.github.com/users/xtreme8000/orgs","repos_url":"https://api.github.com/users/xtreme8000/repos","events_url":"https://api.github.com/users/xtreme8000/events{/privacy}","received_events_url":"https://api.github.com/users/xtreme8000/received_events","type":"User","site_admin":false},"labels":[{"id":633962549,"url":"https://api.github.com/repos/piqueserver/aosprotocol/labels/Packet%20Proposal","name":"Packet Proposal","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-12-16T19:16:02Z","updated_at":"2018-02-16T10:04:59Z","closed_at":null,"author_association":"NONE","body":"I propose these packets to perform actions on entities:\r\n_(packet ids begin with 0xE as a reference to the word `entity`)_\r\n### Packet Entity Create (0xE0)\r\n| Field name | Type | Example | Notes |\r\n| --- | --- | --- | --- |\r\n| entity id | uint | 1 | |\r\n| x pos | float | 256.0F | |\r\n| y pos | float | 256.0F | |\r\n| z pos | float | 32.0F | |\r\n| scale | float | 0.1F | unit: `kv6_voxels/world_block` |\r\n| team | char | 0 | |\r\n| kv6 id | uint | 256 | |\r\n\r\n### Packet Entity Destroy (0xE1)\r\n| Field name | Type | Example |\r\n| --- | --- | --- |\r\n| entity id | uint | 1 |\r\n\r\n### Packet Entity Move (0xE2)\r\n| Field name | Type | Example |\r\n| --- | --- | --- |\r\n| entity id | uint | 1 |\r\n| x pos | float | 128.0F |\r\n| y pos | float | 128.0F |\r\n| z pos | float | 32.0F |\r\n\r\n### Packet Entity Velocity (0xE3)\r\n| Field name | Type | Example |\r\n| --- | --- | --- |\r\n| entity id | uint | 1 |\r\n| x speed | float | 1.0F |\r\n| y speed | float | 1.0F |\r\n| z speed | float | 0.0F |\r\n\r\n### Packet Entity Rotate (0xE4)\r\nIf the absolute flag is not set, rotation fields are used as 'velocities' in unit `degree/s`.\r\nThis is useful for constantly rotating ammo boxes, or the rotor of a plane etc.\r\n\r\n| Field name | Type | Example | Notes |\r\n| --- | --- | --- | --- |\r\n| entity id | uint | 1 | |\r\n| absolute? | uchar | 1 | |\r\n| x rot | char | 128.0F | map `[0°,360°]` to `[-127,128]` |\r\n| y rot | char | 128.0F | same |\r\n\r\n### Packet Entity Team (0xE5)\r\n| Field name | Type | Example |\r\n| --- | --- | --- |\r\n| entity id | uint | 1 |\r\n| team | char | 1 |\r\n\r\n### Packet KV6 Load (0xEF)\r\n| Field name | Type | Example |\r\n| --- | --- | --- |\r\n| kv6 id | uint | 256 |\r\n| kv6_data size | uint | 1315 |\r\n| kv6_data | uchar[] | _Kvxl..._ |\r\n"},"comment":{"url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/comments/366193172","html_url":"https://github.com/piqueserver/aosprotocol/issues/11#issuecomment-366193172","issue_url":"https://api.github.com/repos/piqueserver/aosprotocol/issues/11","id":366193172,"user":{"login":"xtreme8000","id":5209179,"avatar_url":"https://avatars2.githubusercontent.com/u/5209179?v=4","gravatar_id":"","url":"https://api.github.com/users/xtreme8000","html_url":"https://github.com/xtreme8000","followers_url":"https://api.github.com/users/xtreme8000/followers","following_url":"https://api.github.com/users/xtreme8000/following{/other_user}","gists_url":"https://api.github.com/users/xtreme8000/gists{/gist_id}","starred_url":"https://api.github.com/users/xtreme8000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtreme8000/subscriptions","organizations_url":"https://api.github.com/users/xtreme8000/orgs","repos_url":"https://api.github.com/users/xtreme8000/repos","events_url":"https://api.github.com/users/xtreme8000/events{/privacy}","received_events_url":"https://api.github.com/users/xtreme8000/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T10:04:59Z","updated_at":"2018-02-16T10:04:59Z","author_association":"NONE","body":"* [x] This is described in the `Entity Carrier` packet. If a carrier is set, all positions and rotations are applied relative to the carrier point, which is located on the specified part of the player's body.\r\nRotation would be applied after the translation, so that its centered around the entity's pivot.\r\nThis allows for e.g. \r\n   * having a backpack [carrier type: 0x05, position of (0,0,0)]\r\n   * a nade to the side of the player [carrier type: 0x05, position: (1,0,0)]\r\n* [ ] I think reserving ids is a good idea. Client could cache those kv6 ids under 2<sup>16</sup> and save them to disk, to allow for easy modding. They should be named `[decimalnmbr].kv6`. Assets the server doesn't want to be changed would be outside this range, and not cached.\r\n**However, a special new `cache` field in the `Kv6 load` packet could also allow this, without special circumvention.**\r\n* [ ] Actually, I see the use of this extension not in the replacement of already existing entities like tents and grenades, but in adding new types, like the famous LMG. All legacy entity types would still use their respective old packet types."}}
{"actor":{"display_login":"xtreme8000"}}