UE1 - UT Separating server and client code

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
Hi,

I've seen a few mods that separate server and client code with the usual _S and _C suffixes. I'd like to do the same.

As far as I can figure out, clientside code (i.e: stuff that needs to be downloaded so it can run) is most likely to be situated in a subclass of ReplicationInfo. Is there anything else ?
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
Why would you think that? Both the client and server must have the same packages.

Client side code is code that is determined to be only ever run on the client to update or do something specifically for that client. A good example of this is spawning effects. This is often strictly client code because dedicated servers do not often need to know anything about effects since it is a waste of processing for them.
 

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
Like this mod : http://www.unrealadmin.org/forums/showthread.php?t=7474

[SAS]Solid Snake;2241242 said:
Why would you think that? Both the client and server must have the same packages.

Textures, models and other custom ressources, I can understand. However, if there is only code I'd like to know what I can keep in the server part and what has to be sent in the client part.
 
Last edited:

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
All classes the client sees or uses and any classes those depend on must be available to the client. If you want to have a separate package with serverside-only classes, it should depend on the client package, not the other way around.

Obvious things that aren't required by the client are ROLE_None mutators and other Info subclasses that don't extend ReplicationInfo. Inventory, Projectile, Effects and similar classes obviously should be available to the client.