Page 1 of 1

important variables for network game

Posted: Sat Dec 16, 2017 4:47 pm
by Gadavre
I created a new pickup class. And this object can move by level.
I choose the following variables with such values in defaultproperties:

Code: Select all

class Belt extends TournamentPickup;

defaultproperties
{
 RemoteRole=ROLE_SimulatedProxy
 NetPriority=2.5000000     // default 1.000000
 NetUpdateFrequency=20 //default 100.000000
}
It is sufficient for the quick exchange of data between client and server?
There will be no multiplayer bugs?

Re: important variables for network game

Posted: Sat Dec 16, 2017 5:17 pm
by nogardilaref
Do you understand what each one of those properties does?
Why do you need to set them that way?

Re: important variables for network game

Posted: Sat Dec 16, 2017 6:46 pm
by Gadavre
nogardilaref wrote:Do you understand what each one of those properties does?
Why do you need to set them that way?

Code: Select all

RemoteRole=ROLE_SimulatedProxy 

This variable is used for objects that are moving, right? My object rotates and can be discarded by a bullet in the side. So I chose ROLE_SimulatedProxy

Code: Select all

NetPriority=2.5000000     // default 1.000000
NetUpdateFrequency=20 //default 100.000000
var(Networking) float NetPriority; // Higher priorities means update it more frequently.
var(Networking) float NetUpdateFrequency; // How many seconds between net updates.
These variables were used by the developer of the SpellUnreal mod.

It is maybe sufficient for the quick exchange of data between client and server...

Re: important variables for network game

Posted: Sat Dec 16, 2017 8:14 pm
by nogardilaref
Sorry, but no, it doesn't work the way you think it works.
Those are just properties on how "replication" is handled, and you need to know how replication works to understand what those properties actually mean.

So before any of us get into what those properties mean, there are two other things which need to be clarified:
1 - Do you know what replication is and how it works overall?
2 - What exactly do you want to do with this pickup?

On a side note, you should first try to understand the basics of programming overall, something I believe you do not understand much or at all yet, since this is the kind of stuff which pretty much requires already a reasonable amount of knowledge and practice on programming itself.
It may be hard to grasp at first, but once you get the hang of it, understanding things like replication will be much easier. :)

Just like math, you only get to understand concepts like multiplication after you learn addition.

Re: important variables for network game

Posted: Sun Dec 17, 2017 7:06 am
by Gadavre
The idea is this: In the beginning of the game on the map appear random "belts"(ShieldBelts). If the player pick up the belt, then the belt is moved to another random pathnode.My object rotates and can be discarded by a bullet in the side.

in my Mod InstaSniperV 2.1(old Belt) I had such a problem in the network game: on the client, I could not pick up the belts (ShieldBelts) that were already on the server. I saw the belt, but I could not pick up it. I had to change the code. The situation was improved without replication. But I'm not sure there will not be bugs. Perhaps you see something that I do not see and could help. I can not optimize this code myself even better.