View Full Version : Replication limits??

28th Feb 2005, 11:26 AM
Fisrt of all, let me introduce myself:

Im a coder since 8 years, mainly doing stuff on c, c++ and java.

Lately ive been messing around with unrealscript as right now im coding some mutator to add smilies and avatars for screen messages in a game called "Rune" based on the unrealengine.

Now to the problem, I decided to split up the textures for icons and fonts into separate utx files and planned having a server side configuration (.ini) file for that emotes pack holding variable configuration for emote sizes, associated tags, frames of animation, delays for animation etc. Meaning like 4 or 5 arrays of integers or strings.

For that parameters to work in a "server to client" direction (not in anyother way) i had to replicate such values for clients ill paste a little snip:

EDIT: sorry forgot to use the code tags before...

var config int EmoXL[20];
var int A_EmoXL[20];
var config int EmoYL[20];
var int A_EmoYL[20];
var config string EmoTexIndexes[20];
var string A_EmoTexIndexes[20];
var config int EmoMaxRate[20];
var int A_EmoMaxRate[20];
var config int NumEmos;
var int A_NumEmos;
var config string EmoString[20];
var string A_EmoString[20];

reliable if( Role == ROLE_Authority )
reliable if( Role == ROLE_Authority )
reliable if( Role == ROLE_Authority )
reliable if( Role == ROLE_Authority )
reliable if( Role == ROLE_Authority )
reliable if( Role == ROLE_Authority )

Well this thing should work but just when the actor is created on the client and it gets to be replicated the whole server crashes, complaining that:

appError called:
Assertion failed: !Bunch->IsError() [File:D:\Rune\Engine\Src\UnChan.cpp] [Line:
Executing UObject::StaticShutdownAfterError
(Actor TRServerEmoData0)
Assertion failed: !Bunch->IsError() [File:D:\Rune\Engine\Src\UnChan.cpp] [Line:

History: UChannel::SendBunch <- DoSendBunch <- UActorChannel::ReplicateActor <-
(Actor TRServerEmoData0) <- UpdateRelevant <- ULevel::ServerTickClient <- ULevel
::TickNetServer <- UpdateNetServer <- ULevel::Tick <- (NetMode=1) <- TickLevel <
- UGameEngine::Tick <- UpdateWorld <- UServerCommandlet::Main

Exiting due to error
Name subsystem shut down

Well with big testing on this matter i tried removing some of those arrays
from the replication section. Et voilá, worked pretty fine, the rest of replication variables were replicated without a single error...

Further tests revealed that none of that arrays was responsible for the crash
alone (trying every kind of possible combination).

So the final question is: is there any byte length limit for data which is to be replicated?, if thats the case do you know about any workaround i could use to get the thing working proper?

Thank you very much in advance, and a warm hello to the comunity!

1st Mar 2005, 09:10 AM
Well further testing reveals that I have to be right, just stretching array limits or removing some from replication makes it work as expected. So why wasnt it documented before?, am i the first one trying to replicate that long data?. Well the only hint i found out while searching before was this...

Variable type notes

* Vectors and Rotators: To improve bandwidth efficiency, Unreal quantizes the values of vectors and rotators. The X,Y,Z components of vectors are converted to 16-bit signed integers before being sent, thus any fractional values or values out of the range -32768..32767 are lost. The Pitch,Yaw,Roll components of vectors are converted to bytes, of the form (Pitch>>8)&255. So, you need to be careful with vectors and rotators. If you absolutely must have full precision, then use int or float variables for the individual components; all other data types are sent with their complete precision.
* General structs are replicated by sending all of their components. A struct is sent as an "all or nothing" type of thing.
* Arrays of variables can be replicated, but only of the size of the array (in bytes) is less than 448 bytes.

* Arrays are replicated efficiently; if a single element of a large array changes, only that element is sent.

Extracted from http://unreal.epicgames.com/Network.htm
But that 448 bytes seems to be refering only to the size of "one array", while my problem seems to arise only depending on global amount of data among all arrays...

Thinking about how to solve this i thought about the possibility of trying to replicate several actors of this class having their variable array sizes set up at 10. Hoping that my guess about restrinctions in data size to be replicated is only measured per individual actor.

Ill give you more news about this as soon as i get it working,

Thanks again for reading ;)

1st Mar 2005, 09:37 AM
Yeh, done; now im replicating several actors with in the way i explained before, and it works fine, still it sucks about the fact that now i have to split emote info into different sections of 10 element arrays to fill tons of actors to get my info replicated proper. Not even close to what i wanted to do, its so messy for a third party to create their own pack of textures and config file :( (Thats what i wanted at first, a mutator able to expand with different sets of texture files and config files, without rebuilding any code).

So i missed badly, and still im desperate :)

Please, any idea for strange it may look like would be warmly accepted!

Thanks again!.