Brainstorming: Physics and Packet Handling for Entities
#1
Lightbulb 
Hi All,

While working on the mob AI, I found a couple of things regarding the packet handling for mobs positions (RelativeMove,Teleport packet) that were different in MCServer from the vanilla server. For example, the vanilla server sends a teleport packet every 400 ticks (or if the movement was more than 4 blocks), and a move relative packet every 60 ticks while MCserver sends a teleport packet every 2 seconds (or if it the movement was more than 4 blocks) and move relative packet on every tick. Also, the vanilla server spams the client on each tick with a Entity Velocity packet (only if there velocity is greater than zero) while the MCServer doesn't use that packet. So I was thinking that we can implement the packet handling similiar to the vanilla server so we will have less compatibility issues with the clients.

Also, I was thinking that this should be a function on the entity class, so it can be available for all entities and we will only have to maintain the code in one location. So it will be something like this:

Inside the entity class:
Code:
void replicateMovement(const cClientHandle * a_Exclude = null);

What do you guys think?
Reply
Thanks given by:


Messages In This Thread
Brainstorming: Physics and Packet Handling for Entities - by keyboard - 03-19-2013, 05:11 PM



Users browsing this thread: 4 Guest(s)