Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

  • Should I do everything on the clients and send only the strict necessary from the server and hope for the best ?

  • Should I do the above but every X ticks I check if everyone is up to date ?

  • Should I not do any computing of those things on clients at all ?

I don't expect a perfect answer but a "things to not do" and "be careful of" would be great :)

Best regards,


Product Version: Not Selected
more ▼

asked Jan 29 '15 at 03:26 PM in C++ Programming

avatar image

311 22 17 39

avatar image Duncan Dam Jan 30 '15 at 04:11 AM

what kind of game u trying to do ?

avatar image rXp Jan 30 '15 at 08:48 AM

For simplicity's sake let's say it's a sort of MOBA.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 :)

more ▼

answered Jan 30 '15 at 09:09 AM

avatar image

66 1 2 2

avatar image rXp Jan 30 '15 at 09:13 AM

Cool thanks. Each update it is then.

And should I try to compute everything on the client ? Or compute on the server and send the result to the clients ? For example if I throw a projectile I only need starting location, direction, speed and who thrown it. Should I only give those and let the clients compute OR should I compute on the server every update and send the results. The clients would just update the projectile.

avatar image Djarthas Jan 30 '15 at 09:17 AM

Yea exactly, if something needs to be showed to the client for instance the projectile. The server controls where it is and sends it to the client to synchronize them together. Never trust the client and keep it server sided :) Update on server and send values that controls the visuals to the client. Glad I could help I just started using the UE4 Answerhub and it seems like a good community.

avatar image rXp Jan 30 '15 at 09:19 AM

I guess I have my answers thank you a lot :D Now to fix why the navigation system slows at minimum speed all my non-authority player characters.(that's another answerhub topic xD)

avatar image Djarthas Jan 30 '15 at 09:23 AM

Glad I could help mate, good luck with your project! :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question