x

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"

Any built in throttle systems for high frequency RPCs?

I'm currently writing replication code for the transform of a player controlled object (specifically, it's a VR motion controller). From my understanding, the only way to replicate the transform from the client to the server is through an RPC.

As this object will be moving pretty much constantly, a simple dirty check would have me sending an RPC every frame. Is there anything built into Unreal that would help throttle this automatically or do I need to write my own system?

Product Version: UE 4.13
Tags:
more ▼

asked Sep 21 '16 at 09:56 PM in C++ Programming

avatar image

ddbrown30
243 11 23 104

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

1 answer: sort voted first

Hey ddbrown30,

UnrealNetwork will do its best to handle any replication that is going through the system to be as efficient as possible. This includes doing things like keeping the last state of any variable replication on the server and only sending it to the client(s) if it has changed.

Furthermore, if you don't want to "overload" the network with any one variable being sent on frame, you can send it as "unreliable", meaning given high network saturation, the replication could be dropped.

Also, just as a thought, you should be able to replicate a single transform on frame without a big performance hit (unless you are doing this for a big number of Actors). I feel like its one of those situations where you set it up to work and only look into optimization if it becomes a issue.

Here is documentation for Unreal RPC:

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Actors/RPCs/

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/index.html

https://wiki.unrealengine.com/Networking/Replication

more ▼

answered Sep 22 '16 at 03:46 PM

avatar image

ImVawx ♦♦ STAFF
6.8k 114 18 128

avatar image ddbrown30 Sep 22 '16 at 04:32 PM

Thanks the reply. Knowing that that's the way that unreliable works is actually super useful. I'm used to unreliable simply meaning that there will be no Ack/Resend flow. The fact that the engine will also automatically drop unreliable messages during high traffic situations is very good to know.

And, yeah, I know a transform isn't too much (probably around 40-50 bits plus whatever your header and footer size is), but death by one thousand cuts. It all adds up. :)

avatar image ImVawx ♦♦ STAFF Sep 22 '16 at 04:46 PM

To clarify, Unreliable is defined as the following:

The function is replicated over the network but can fail due to bandwidth limitations or network errors. Only valid when used in conjunction with Client or Server.

Replicated function calls can be set to either Reliable or Unreliable where Reliable calls are guaranteed to occur, while Unreliable calls may be dropped during heavy network traffic

My mistake about it waiting. Apparently that is not true.

(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