important variables for network game

Discussions about Coding and Scripting
User avatar
Gadavre
Experienced
Posts: 140
Joined: Sun Jan 18, 2015 7:55 am

important variables for network game

Post by Gadavre » Sat Dec 16, 2017 4:47 pm

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?

nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: important variables for network game

Post by nogardilaref » Sat Dec 16, 2017 5:17 pm

Do you understand what each one of those properties does?
Why do you need to set them that way?

User avatar
Gadavre
Experienced
Posts: 140
Joined: Sun Jan 18, 2015 7:55 am

Re: important variables for network game

Post by Gadavre » Sat Dec 16, 2017 6:46 pm

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...

nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: important variables for network game

Post by nogardilaref » Sat Dec 16, 2017 8:14 pm

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.

User avatar
Gadavre
Experienced
Posts: 140
Joined: Sun Jan 18, 2015 7:55 am

Re: important variables for network game

Post by Gadavre » Sun Dec 17, 2017 7:06 am

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.
You do not have the required permissions to view the files attached to this post.