M1 | M2 | 055 | 001
|Summary:||Bullet puffs do not need 32 bit fixed-point precision|
|Product:||Odamex||Reporter:||Dr. Sean <grandpachuck187>|
|Component:||Server & Client||Assignee:||Odamex Bug Reporter <odamex-bug-reporter>|
Description Dr. Sean 2012-02-25 19:03:59 UTC
Created attachment 342 [details] Patch Accuracy for bullet and blood puffs is not particularly important at a resolution greater than 1 map unit. A great bandwidth savings can be had by sending bullet puff positions as 16 bit instead of 32 bit fixed-point coordinates. The angle the puff is facing is also of no importance and can be disregarded. For a super-shotgun blast, the position and angle of bullet puffs current use 16*20 = 320 bytes. By not sending the angle and sending the position as 16 bits instead, a super-shotgun blast would use 6*20 = 120 bytes. I have attached a patch that implements this. I feel it can be implemented better in the future as part of a more robust network serialization scheme that determines what level of positional accuracy an actor needs based on certain criteria.
Comment 1 Ant P. 2019-06-17 00:10:38 UTC
I like the idea. It'd be straightforward to improve this even more by sending a "diff" object to the client when the change between the current and previous MObj is small enough. In the best case a SSG is going to put down 20 MT_PUFF objects all clustered together (on a single wall), which could be encoded as an initial set of these 16 bit coords, followed by signed-8-bit offsets for the rest, for a total of 63 bytes. In the worst case (which requires some truly awful map design) it's still only 120 bytes.