What should I do on the server / on the clients
I understand how the replication works but I don't know what I should do and not do. For example, I use the nav. system to determinate how someone should move. That has to be called on the server/authority but then what should I send to the clients ? Navigation path ? Next tick location of characters ? Buffer of locations for the X next ticks ?
My issues comes with things that theoretically only need inputs at creation and then could be calculated by each clients until being destroyed. Projectiles, movement (nav. system), level timer or pseudo-random events determined with a seed.
I don't expect a perfect answer but a "things to not do" and "be careful of" would be great :)
You shouldn't do something on each tick server wise and client, do it on each update, it would be really bad optimization if you do a tick hook. As you said, only necessary bits needed to be extracted to the client from server, so you send too many packets over server. So yea be careful with doing something each tick, but instead do it when something updates. For example with the player movement and navigation, when something happens with the navigation path or player movement, do a hook to control new values and such. I don't know if this helps mate, but I just talk from experience, if you do like you say it would be a bad thing :)
answered Jan 30 '15 at 09:09 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here