#multiplayer
1 messages ยท Page 342 of 1
huh.. so using the vehicle movement component would do that for me? Or did I get that wrong
you could directly send to the server where you are every update tick (locked to some htz value), but that would be more expensive than input replication and also entirely client side authority
the wheeled vehicle and character movement components are already replicating and multiplayer compatible
the other ones and base pawns are not
and would require you to do the networking setup
can I just add the component to my pawn or should I entirely start with the wheeled vehicle?
wheeled vehicle is a physx vehicle, doesn't have flight
and you can't just add movement components, they are reliant on the class they were made for, except for floating and interp.
...but using a simple character that has my mesh and adding some basic "press w to fly forwards" stuff should work?
it should, you'd have to deal with capsule collision.....but the flight would work
really the best way would be to use floating movement and handle the replication yourself, there have been a lot of people trying that in blueprints around the net
i'll say though, the only perfect solution probably lies in c++ with a custom movement component like the wheeled vehicles
I'm not very comfortable with c++ yet, but thanks for your support. I'll try replacing my pawn with the character.
you can subclass floating movement in blueprint and do some logic in it
just can't override everything you'd need to do it cleanly
you can also replicate input to the server like some have been doing for this and run it locally too
but I don't remember there being a "SkipOwner" blueprint option so it would still try and correct you from the server.....
google around, there are some blueprint tests, just don't do any of them that only send input to the server, the results will be unviable.
when using the character, do I set everything to replicate? (movement, mesh, capsule, the actor itself?)
Anyone recommend any good game networking books?
I disabled collision on the capsule component and use the collision of the mesh instead, it has fewer verts anyways and seems to work now.
Though player 2 will still receive a kind of "hit" when spawning, tilting the ship quite noticeably
is the second player start rotated on the map?
no
p2 spawns upright, but some kind of force tilts it. As if I was colliding with something when spawning. I have moved the spawn around, but this always happens to p2
nvm, moving the project to a different hard drive fixed it. Might just have been a bug.
Ey all! hallo ^_^ I have got a problem! its not always happening but it does happen from time to time and idk why haha any ideas what could be at cause ? https://gyazo.com/8a314d6d86403ddf3d5557ed29b03ec4 o.O
@summer nova who would u say in this discord has the most multiplayer/game networking experaince? as im asking around if anyone can recommend a networking book about games
@thin stratus no doubt. His book is the one to check for a lot of stuff
have you read his book?
yeah iv read the compendium its awesome
I was looking for a book that really covers network replication efficiency, does and donts, good framework practice
etc
@heady merlin What client side setup you have?! Didn't even know you had a thing. (This is a FPS template project prototype).
Was picking the box up with a physics handle
Basically, I just need one physics cubes to be fully replicated.
BUt yeah, it's all on the server
spitting out the location to all clients on tick lol
u could write your own simple prediction system for the physics cube, use something similar too char network smoothing
based on velocity and using interp i guess
or is the cube a super important element? like has to be accurate af
The cube is the main deal
ah fuck so u really need a proper system
Basically, everything practically depends on this cube ๐
Hmmm
Nothing else in the scene (other than characters) will be replicated
U could use root motion for things like it being kicked and knocked around
but doing stuff like falling and rolling abour is another thing
Aye, I tried putting a projectile movement on it
no velocity
don't think that did anything
I mean. It's 95% of the way there. Just need to make sure the clients don't drop it when it's perfectly still due to gravity
do u know if the char component cpp is public?
ofc
iv never bothered to look, maybe some useful things on networking smoothing for it in there
Last I heard
It's a total mess
And even @heady merlin probably regrets playing around with it ๐
Im really not sure how u replicate physics effectively, iv done it before but not what id class as effective
however for players having any sort of interaction thats big movement id go root motion
curves of movement data so 0 replication stutter
Yeah, I mean, it's just got to look as best as possible. I mean, if it's not 100%, whatever, it's gamedev. If I can get it as close to 100% as possible, that's fine by me,
I would look in to root motion then for char interaction, then i guess you are looking for effective replication, and implimenting some sort of predictive physics motion for clients
but if ur only having X amount of players with the ball, realistically u have alot of extra space for replication data
Yeah, I was looking at how SoccerCarGame did it
Man, lack of sleep does some things to you
RocketLeague lol
who was it who was developing ultraball its someone in here right?
Ah true, but I think it was Cedric who probably did the networking if it was physics-based
i remember awhile ago
there was a post about this
Physics based gameplay
someone made a 4 player physics based game
and they updated there project and made it free source, i cant remember the name of it dam it
@wary willow RL is UE3 though
We had some problems with the Ball in Protoball
I ended up Simulating it on Client and Server + Replicating the Movement.
For now it's fine, but the nagain, it's not soooo important if the ball goes wrong once
On the PostLogin(), I want every recently joined player to have a variable on the player state set based on the positioned they joined, so the first player would receive the value of 0. Does this variable needs to be replicated? Because it's not working here, every player has that variable value of 0
yes
void ANetworkzGameMode::PostLogin(APlayerController* NewPlayer) { APlayerControllerNetworkz* playercontnet= Cast<APlayerControllerNetworkz>(NewPlayer); APlayerStateNetworkz* playerstatenet= Cast<APlayerStateNetworkz>(playercontnet->PlayerState); playerstatenet->playeridz=idindex; idindex++; } }
idindex is an integer of the gamemode
@civic stag, your playeridz is replicate ?
no
maybe that's why
im trying to replicate, but I'm getting errors
void APlayerStateNetworkz::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(APlayerStateNetworkz, playeridz); }
is this right?
//.h
UPROPERTY(Replicated)
int32 PlayerIDz;
//.cpp
#include "Net/UnrealNetwork.h"
//[...]
void APlayerStateNetworkz::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
Super::GetLifetimeReplicatedProps( OutLifetimeProps );
DOREPLIFETIME(APlayerStateNetworkz, PlayerIDz);
}
also this id will be available for every player ?
or only the owner ?
will it work if you include unrealnetwork.h in .cpp? I always thought that you need to include it in header file, so replicated macros will work
@civic stag, you can use DOREPLIFETIME_CONDITION( APlayerStateNetworkz, PlayerIDz, COND_OwnerOnly ); if you only need this id for the owner
every player will receive a different value, this variable will be used to identify players
it worked now, thanks!
@civic stag Headsup, if you need to identify players inside of the level, there is already a PlayerID on the PlayerState
And if you happen to use steam, you could work with the net id
@rare cloud still hella dark, tho
whats the difference from the net id to the player id?ยฐ
@civic stag, Net id is the Driver id to send packet to client
PlayerID is an integer to tag player like you want to do
oh thanks
@wary willow my plugin has client side, server side, and hybrid gripping in it for physics objects, would have thought you'd know that since you use it :p. I use custom constraints for it not a physics handle.
@heady merlin Well, I know
But, I just never thought about using it in non-vr
lol
I am actually in the middle of doing a Multiplayer Inventory using your plugin for a VR project. Well, guess it's not much middle, still in the beginning stages.
lol oh, thought you were just testing there in 2D for a VR game.....yeah i mean, I use it for 2D pawns.....
anyone know of good tutorials to help learn multiplayer in unreal engine 4 ?
@loud eagle What aspects on MP do you want to learn?
I highly recommend this:
What does everyone have their AI net update frequency on?
weird situation! As I'm adding events that run on the server, mostly multicast events, I'm finding that I have to go back and make other events multicast in order for them to work now... like my weapon firing, I had to change it from running on server to running as NetMultiCast in order for them to show up on clients
if you add too many reliable multicast events, does it drown out non-reliable server events?
that's what I had to change, Epic had it just running as server in the ShooterGame Template so I feel like I broke something and am now working around it
going to give those tutorials a watch too @wary willow
ah christ, now character movement isn't replicating. I have officially broke something
I found that disabling this fixes everything - this runs on 785 blueprints on my server - is it the multicast killing all of the other network traffic?
I wouldnt do that on tick.
Jesus what are you doing lol
To answer your question... yes the network is probably too saturated to do your movement
I would avoid doing any RPCs on tick
lmao
up until now I've just been testing by making everything do everything. Like the doors will eventually only run that check when they stop moving and will only check once. Doing it on ticket to make devving faster
you can also check this by typing stat net
guess its time to optimize it up
'stat net' is your friend
since the doors work lol
well, yeah. I mean that since they open/close I can work on the part that determines when
makes sense though, I'm congesting the crap out of everything
on tick was just so I didn't have to wait around for it to happen during testing
makes sense that its killing everything though lol
what exactly are you trying to do?
right now, door automation. when multiple rooms come together I needed the doors to check for an adjacent room, then open if theres a room next to it
I was doing it on tick for testing, but will switch to running the events when the rooms finish moving
should help a lot
yeah I might want to get that going for sure
or you could use a timer
check every 10 seconds or so
also... you should be using switch has authority
I've got a bug where two rooms will sometimes choose to float into the same space, so I think I need some trigger boxes to 'feel' for adjacent rooms and then reverse direction if they collide
otherwise your client will be checking this logic for no reason at all
i see
and then as they join and door open, players get a path to the center room, the end game of the match
guessing optimizing will be super important, given the number of rooms
yes indeed, copied what I had to do to make rooms move lol
To save bandwidth, check if the door is open
Otherwise you're sending a request to all clients to open an already open door
I'll get the logic going for when to scan for adjacent rooms. that should help a lot
Think of calling a multicast or any RPC function as bandwidth
ahhhh nice
ok, will do for sure
that makes sense
so that I don't waste bandwidth checking for no reason
multiplayer is weird lol
lmao
the next thing I have to figure out is how to tell the rooms to move from the server, but then offload the movement to the clients, so reddit says. Right now I think I'm moving them on the server and replicating the movement to the clients so its twitchy
still over my head but I get the gist of it
Success! Got the doors checking for neighbors on eventbeginplay and then only after moving. Thanks @raven holly josh
What's provider is everyone here using for server hosting?
I've used both AWS and DO, they both seem to work fine
DO is a tad cheaper than the base AWS + 20GB EBS, but AWS has a more structured ecosystem where DO is mostly just a VPS provider, so I guess that's up to you
You do have the freedom of picking storage independently of the base system specs though, so that's nice
DO for Private Website and Perforce
AWS for Protoball Perforce, Webservices, Master Server
AWS GameLift for Dedicated Servers
Ok cheers
I'm using Vultr ATM, but evaluating all options
Get a fair bit of net lag spikes though
hey
Anyone think they can help me onut
:L
I have a 3d widget set to screenspace, and I bound the "Text" to a function, yet everyone on my local client is using my name, and everyone on their own is using their own names
this is obviously a network issue
Could you show that function?
I'm guessing you're using a "Get Player Controller/Pawn/Character index 0"
@brittle sinew https://i.imgur.com/WBZ3lak.png
Super simple
And it's bound like this: https://i.imgur.com/zISDDmV.png
Okay, so you want to see other people's name above their head?
Each pawn having its own name?
yes
And you understand other clients' PlayerControllers aren't replicated to your client?
so like, currently, on my local client... EVERYONE has MY NAME, and on their client, everyone has THEIR name
o
lul
but
wait
why would it set it then
to mine?
i think he mean the "MY NAME" text instead of their actual name.
@brittle sinew wait so could i just use "Get Owning Player Pawn"
instead of the controller
Probably, yes
Actually, no
Names should use the PlayerState
Get Owning Player Pawn uses the PlayerController, which isn't replicated :p
But in generall, since the UI is ABOVE the PlayerCharacter
Just pass the UI the PlayerCharacter
^
I mean, you have the 3D UI on the PlayerCharacter already
On BeginPlay, get the Widget Object from the Component, and set a player varaible in your widget
And use that
wait
why not just do it in my character's beginplay
get widget, pass self
pass this*
Widget has no BeginPlay :D
Yeah then I would've said Construct
:p
If you stand still for 10 seconds then strafe left or right it warps
How to fix that issues?
Man... This server provides me endless entertainment.
@ruby epoch strafe? Animation?
As in root?
Or actually Character Movement
Hmm. Nvm. I was thinking something else.
Yes please
first move
its wraps character back
and its happen only if character stand still for some time
like 10 seconds
if he moving, or standing still for 1-3 seconds all works fine
any ideas?
trying to follow the multiplayer tutorial series but the infinity blade characters aren't updated yet for 4.17
that sounds like the ugh
@ruby epoch that sounds like server fighting client
after X amount of seconds of player not moving
its priority drops
u dont
it shouldnt normally be noticable
i might be wrong thoug
though
maybe client is fighting server
seams too big to be priority job
@thin stratus sometimes i just love networking
evidently if i set this client rpc to be reliable
it will update inventory slots
but if i uncheck it
it doesnt
Lmao
Reliable, works, Unreliable, doesn't
@sweet spire fixed by inreasing Min Net Update Frequency from 2 to 10
@twin juniper Well, means your RPC gets lost on the way
yeah
but i s that a safe fix, to just set it reliable?
or is there something else i should do
to avoid using reliable
its not as if im using that many
Reliable is fine if called once in a while
If it's really needed to perform that update
Usually thing on tick etc or simple effects are not reliable, cause no one cares if they get lost
its literally
only called
when u drag/drop an item
on the client side only
and its only a client rpc
Then Reliable is fine
:x
cedric hurry up and write a full book on networking so i can buy it
@sweet spire How much would you pay?
0,01$
alot for a top of the line networking book
@sweet spire Well, I am assuming you mean UE4 networking ๐
Because there are a few good ones out there
general game networking really
Then you haven't looked very much
So you want to know what's behind the replication and serialization?
Well that's hard to cover in one book tbh
Do's, dont's, low end, framework, setting up good foundation
etc
Just generalist book i guess u would say
- I can't invest that much time into it
They already have one
What
And not cover everything
Just sayind
There are so many things that you could write down
Its hard to find good books on things, getting someone to give you a good reference
It covers a lot actually
You write all down and then someone is like "How to do a MasterServer"
And then "How to do a Subsystem from scratch"
etc etc
It's endless
A networking book on the same level as the pragmatic programmer would be nice af
But its hard to find good books, there is alot out there
Not bad
I guess I don't need to write a book
lol
I mean, if you skim that TOC
BTW, I haven't read all of it yet ๐
Only 50%
U think its good book?
il take a look then if u give it a solid r ecommendation over other things
You won't really need to know the very few parts of it using a game engine imho
But it's still good to knows
Ch4+ is where it gets good
Ch 11 is very basic
But still a solid overview, consise and to the point
always good to do your roots again if even u know it
thanks @wary willow good recommendation!
@vorixo#7101 Yeah, I was going to finish it up during the hurricane
@pallid mesa
But, I think it's going to miss me a bit, so I'll probably just being doing PC game dev ๐
Instead of Book GameDev
oh :( u affected, feel sorry, im injured not too much typing
I have a backlog of books I need to read
i have books backlogged aswell ill see if i can get them read soon
crikey $36 as a kindle !
@thin stratus how are you finding gamelift
I played with it in 4.15 and their plugin wasnt that great
Also have you tested latency ?
Huh?
link
just did a test on EC2.. same ping as vultr
๐ค
i wonder if starting a dedicated instance will help
EC2 are the most expensive out of most of the providers
Thanks for the book recommendation @VictorBurgos#7534 , gonna pick up a copy!
EC2 Sydney?
@raven holly I have no problems with that
We have normal Pings, given you choose a Region near to you
And the Plugin is only for the Server Side
You would need to build your own plugin for clietn side
but that's a bit.. buggy
@glad sedge yep ec2 sydney
@thin stratus do you plan on just using on demand ec2 instances?
yeah that's not surprising tbh - vultr's aus server is Sydney based I think
Yeah that's what GameLIft is for
You can't query any GameServers that are not active
It's not a MasterServer thing
not worried about noisy neighbours?
Such as?
Not really worried, no. A lot of people use it and haven't reported anything like that
Ok cool
just a dumb check - any reason why a C++ var wouldn't update its BP child?
I get like 70-80 ping to vultr & ec2 on my dedicated server
Setting UProperty(EditAnywhere, BlueprintReadOnly)
From new zealand though.. but if i ping it directly it gets like 47ms
trying to figure out where the extra ping comes from
Cedric do you experience anything like this?
No haven't had that
US Server ~200Ping (obviously) and EU Server (Frankfurt) 10-20 or so
So your stat net ping is close to your actual ping
using like cmd or something
I do have 1000s of replicating actors, but ive profiled the net and its not saturated in any way
and idles on about 4kBps
via IP it should, yes
The scenario I am looking for is for one player to host game, another player (up to 4 total, including player) to be able to join the hosted game (by invite, from friends list).
(can't have users typing in IP address ๐ )
You'd have to use the Google Play subsystem (never touched it) or roll your own for something like that
For cross-platform interconnectivity, I imagine you'd most likely have to build out your own
yeah, it's for one platform, so I'd use subsystem
I am just wondering if someone tried it and if it works out of the box using BP-only and not C++
how do server lobbies check if a game is still active?
i can make a server list, but if some1 alt f4 , uses task manager to kill it the server wont get removed from the list
i can let the server ping the list every some much time but this seems a bit wrong
is it possible to fire an event if the host kills the server like this?
kinda doubt it tho
@dull jasper heartbeat
i doubt that comes top if i enter it in google ๐
nope, its some animation short film, watching it now ๐
lol the animated heart is cool
@thin stratus by chance, have you worked with Google Play or/and Oculus OSS (multiplayer, friend lists, invites, IAP) ?
Nope, sorry
@dull jasper heartbeat is SteamworksSDK
Should be Google able now
Since SDK docs are public
ahh . wasnt planning on using steam stuff ๐
(unless I am just always logged in...why I doubt, since I have authentication on)
i can send my own heartbeat tho
Well, not sure if there is a generic "heartbeat" in ue4
TBH when I saw that I thought of SSL heartbeat, I think it's just more of a general term
@brittle sinew lol
Yeah ^, you should be able to implement your own
Maybe
Im thinking of completely bypassing UE networking too, but i only have 10 gigs ow download a month
how many 6 vs 6 CS battles is that approx?
guess i have to play a bunch of pubg matches and see what the traffic is ๐
gettin about 3 kb/s from amazon cloudfront
started with 10 kb/s
sending 1 kb/s to compute.amazonaws.com
@dull jasper what software do you use to monitor those stats?
task manager, like a freaking boss ๐
you check ethernet and resource monitor
there is better stuff but this is all i needed , some rough estimates
is the following scenario possible - one player hosts session and invites his friend (from the friend list). Everyone is cool and then they decide that it would be better if one of the current client will host a new session and the rest, including current host, will join in (obviously host will have to stop being a host and will join a new session hosted by one of the friends) ?
how can this scenario be achieved ?
Net engine does do a heartbeart to the server
You can set a timeout if connection is lost
It's usually like 60 seconds (which is too high)
I set mine to 20seconds but will probably lower it
@glad sedge cough bud
@raven holly ayyee we got the same name bud and look similar
If anyone has some time on their hands... please watch this....it's quite entertaining. And let me know what you all think: https://youtu.be/BYjgfAjEBqQ?t=5413
Just a series of videos where i go visit the unreal 4 forums and some other youtube channels related the unreal 4 engine. I give commentary and my thoughts o...
My God is this 2 hours long feels like it
Haha
Release schedule 40 years
2 hours to say click reolicated and note because it's begin play and server will call the spawn everyone will see it
Still didn't explain.. Exactly why at this point that I can tell just was amazed
the video is timestamped @ 1hour 30min @hasty adder
I got sucked into the rabbit hole
lol
I mean it's not a bad job tbh
I found it pretty entertaining overall though
I got some good laughs out of it
I just enjoy the fact he points out how bad a forum person explains there problem
It's what we're all thinking
Context is everything
just curious, do most people use the UE4 networking solution or write their own when it comes to multiplayer?
writing a whole network stack is no easy feat, its so much easier to take something and mold it to requirements
im pretty sure more advanced projects you would still see the most basic of ue4 networking still there somewhere
What do you mean by there own network solutions?
I'm not smart enough to believe I can create a networking solution better than what UE4 employs, tbh.
well, there's even free ones like kbengine
photon, etc
that you could use instead, if you wanted for say an MMO or something
Is Fortnight's 100 person thing requiring custom networking I wonder?
oh that's really cool
Well I ask because 100 seems like a lot and maybe they had to do extra, that's why.
Well, I am sure it's not a simple setup
I doubt they used listen servers
But I don't know
I don't follow it
wait, the solution can support larger amounts of players now?
@reef berry larger than?
intead of just grab and pulling all the way to the right
click and enter 100
then hit play
Let me know what happens
Its always been able too
Depends how good ur networking and power is
We managed 140+
Hmmm, converting this to a multiplayer ready game may use up every ounce of my patience. (This is just the character bp) https://i.gyazo.com/b6ed1ce1a5e5002e49a39e89180a05b4.gif
@wary willow seams like the perfect example when BP is misused xD
@wary willow all that is not networked? Good luck ๐ probably easier to rewrite it all from scratch.
I had the pleasure of doing that a couple months ago... was actually surprisingly easy
oh, replicate these properties, these events, and... it's working?
For my basic shooter I had to rework almost everything, some because I set it up stupidly but mainly because you have to separate so much out because you are always thinking of what is sent to / run on the server, what other clients need to see etc. Most times you never worry about that creating an offline shooter
@inner iris Very true
@wary willow ALT+F4
victor dunno what to say, im socked ๐
well good luck with it bro
i could never get more then 16 players in for a pie session, the rest just simply refuse to connect
@wary willow wow...do they not believe in functions or sub graphs?
Sup guys
Hi2u
I built a back-end server on UE, based only on sockets (socket subsystem library for cross-plataform purposes) but I feel like I made a bad decision by chosing UE4 ๐ฆ
It's being a pain to disable world rendering properly, and server compilation target is meant for the networking unreal has builtin
I mean, it's alredy have lag compensation, server reconciliation, client-side prediction, steam ticket authentication in native C++ (not online subsystem library cause it don't support game servers), but with a Ryzen 7 1700 8 cores, 16 threads, 4 GHz processor it is only able to sustain somewhat 13 server instances
It's really suppose to go like that? ;/
d*
The best approach so far was to use
#if UE_BUILD_SHIPPING
GetWorld()->GetGameViewport()->bDisableWorldRendering = true;
#endif
But it is a hell of a shitty hack, anyone save me T.T
btw I tripped there, the ryzen is only overclocked at 3.7 GHz
Too much architecture stuff for me. ๐
It's not even architecture, I'm looking for a way to make UE4 behave like a server, compiling with server target is pretty much broken as it can't load the steam DLL properly (checked the source code myself) and it's not meant for my use so it opens port 7777 UDP and shit that it shouldn't, as I see I will probably need to make a branch of UE4 designed for back-end servers
And it's something I really wish I didn't need to do as it will consume a heck of time and energy and it's ugly as it can gets
I really need some savy to save me :/
savvy*
So can someone explain this to me?
I just wrote this code, but I'm not sure if I'm handleing it the right way for multiplayer.
=custome event
i think multiplayer "Open Level" has to be a Ececute Console command with "ServerTravel /Game/Maps/MapName" in it
Well you are mixing IP connect and Sessions
Well, yeah, I removed my IP on purpose.
And then I'm not sure what you mean by sessions.
But I'm following a tutorial series I found now, instead of just documentation, so I should be good.
CreateSession
Is using Sessions
Which are virtual information about an online game
Or lan if not using a subsystem
And IP is just connecting straight to the IP
You would usually combine "CreateSession" with "FindSessions"
If you only want to connect via IP, just use the Openlevel node iwth the createsession node
how is posible for a physic actor like a box to perform movements on server and replicate to clients ?, right now movement of physic actor is handled individually by client , server etc ...
You could only spawn it on server and use rellicated actor and replicate movement.
And clients call server side events to move it
@hasty adder how can i do this part "And clients call server side events to move it" , the box move cause player character collides with it and physics system moves the box ...
You can still actually collide with it to move it the problem then becomes ensuring that only server side version of the collision is happening. A desynched collision will occur usually when rotation and such is not replicated so the client thinks they ran into an object at one angle when the server or mother player sees a different things. I usually instead of using collision for running into an object instead use overlap and some math to apply force I guess I'd need more@context of what you are doing to know what kind of solution your looking for, physics replication is dicey
@hasty adder thanks , i will not use ue4 physics and i will make a collision volume with on begin overlap apply forces of opposite actor that is entering
So, now I'm still confused about the whole connecting over the internet part.
This doesn't seem to work.
I'm using the 3rd person starter kit, and I packaged the game and opened two clients, then pressed O on one and C on the other.
Nm, I got it.
Please, how can I increase the tick rate on a dedicated server?
I get the message (max tick rate 30)
how can I increase it?
NetServerMaxTickRate=30```
DefaultEngine.ini @twin juniper
Anyone seeing some weird net performance issues in 4.17.1?
@raven holly what do you mean by weird
i dont know, i didnt change much and my pings are very unstable now
even on blank project?
well certainly 4.16 was actually the one changing networking a lot
Yeah thats what i dont get
mh... i'll let you know once i'll deploy
can't check it now, im about to eat, if i get a chance this evening after work i'll be able to help you =/
Heylo Devs! I've got a situation ! My Map is Big and actors are getting culled out because of Net Cull Distance feature. Can I turn this feature off ? I understand that this feature is there to avoid flooding network with all information. But in my game things are happening very minimalistically in a large map, and they are getting culled out. Any solution to turn off Net Cull Distance Squared ?
Is it possible for a destructible component to replicate?
@void canopy Well, each Actor has Replication settings. There you should be able to turn it off
@ivory portal You want the smaller pieces to replicate?
I do applydamage on my actor and on the server I see it being broken down
but on my client not
the actor is being replicated
so I saw that components could also be replicated (my mesh is a Destructible Component)
You can try setting it to replicated in the components tab
But I assume you might need to replicate the Damage event to the clients
Damage is applied on the Server
Usually that is enough, as that is used to reduce health
Effects, may it be death anim or destructible components should be handled via replication
For example setting a RepNotify Bool "bIsDestroyed"
and in there you make it break
(in the repnotify function)
mmmm ok, so instead of doing an applydamage I will set a bool and in that onrep function I will "break" it
You can set the bool in the ApplyDamage function
It's on the Server anyway, so he can use that to set the bool
Then it replicates and fires the onrep on the clients (and himself)
and yes, there you break it
Ok, it worked, I also needed to replicate the damage causer else he wouldn't work.
@thin stratus I want them to replicate.
@thin stratus but I dont want the boundary values of Net Cull to be activated.
means even if I'm very far away from other players, I'm still able to see where they are, right now , they get invisible after a certain range
"Always Relevant"
It's a NetRelevancy check in the background
It doesn't look for NetCulling if it's Always Relevant
checking it up. Thanks for the reply ! ๐
Hey guys, I'm translating a blueprint to c++ and found myself a little confused. I have never translated a custom Event to c++ before, it's reliable and on server.
I did some googling and found https://gyazo.com/6f17238a9e4237f84c016c8663d5d537.
Is this the only way to go? I have about 40 custom events so would really love for an easier route
The "doStuffNetwork" is the thing you need to do
UFUNCTION(Server, reliable, WithValidation)
void Server_YourFunction(int32 SomeVar);
bool AYourClass::Server_YourFunction_Validate(int32 SomeVar)
{
return true;
}
void AYourClass::Server_YourFunction_Implementation(int32 SomeVar)
{
}
@lilac lotus
I am so happy I asked, you saved me a big headache @thin stratus
I was about to start but figured I'd ask before, lucky I did
No biggie. Could have typos in my code above, but the idea remains the same
Yeah, I can work with that. Thanks for the guidance @thin stratus
Trying to debug this net issue:
It spikes & then server crashes
But its when a player jumps on a Instanced Static Mesh it does it
Seems to trigger it
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
4.17
It could be related to this
But who knows
I noticed that characters net priority defaults on 3 now?
As compared to what?
The relevancy docs show version 4.9, and it says pawns have priority 3
Information about Actor relevancy and priority
Not sure how accurate the version tag is, it could've been updated since 4.9, dunno
It does make sense pawns have a higher priority, though
4.16 seemed to be a really bad version for MPโI remember a couple specific bugs popping up in itโdid you go directly from 4.16 to 4.17?
Yep
4.16 was fine
I run a test with about 800 people every month
4.17 has broken a tonne of shit
๐ค
Usually max the servers out about 40+ players
With no lag
I just pulled the dev branch of 4.17.2, going to see if they've fixed anything
Do you all keep the min net update to 2?
Unreal Tournament stayed in 4.15 because of a reason xD @limber dome
4.14 had bugs with possession
how bad are the lag peaks you are getting?
everyone jumps to 1000ping
well rama victory plugin has key rebinding bro
you should consider it
but downgrading is not likely a possibility now for you i guess
Nah rather use native
1000 ping, holy
maybw you just hunted a bug joshua
i'll try to replicate your scenario later on when ill be back home
yeah ill add it to the list of the other 100 bugs
Fingers crossed that theyve fixed it in the dev version of 4.17.2
what settings do I need to change to increase the 10kb data cap?
[/Script/Engine.GameNetworkManager]
TotalNetBandwidth=40000
MaxDynamicBandwidth=40000
MinDynamicBandwidth=4000
[/Script/Engine.Player]
ConfiguredInternetSpeed=40000
ConfiguredLanSpeed=40000
I have this on my default engine, it's still not working
some of that needs to go in defaultgame
oh wait nvm
ConfiguredInternetSpeed=1000000000
ConfiguredLanSpeed=1000000000
[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=1000000000
MaxInternetClientRate=1000000000
InitialConnectTimeout=120.0
ConnectionTimeout=20.0
That's what i use @torpid nymph
on defaultengine.ini?
Yes
and it should work on dedicated server too?
yep
would me using steam subsystem affect it?
no
going to clean up my ini and use only what you sent and test out ๐ thank you
@pallid mesa You @ed the wrong Joshua my guy
oh sorry brother!
๐
were you on 4.15 or earlier before 4.17 joshua?
it would totally make sense if you were that you had net stuff break
dynamic net rate being defaulted to on screws with a lot of stuff
oh
you are getting ping spikes
really shouldn't totally uncap rates...
should profile, find peaks, and set sensible limits based on it....
I know, thats what these tests are for
But it still spikes with 1 player in the server
It could be CPU related
Im going to be profiling a few things
Maybe theres not enough cpu to replicate, im thinking
Scroll up haha ๐
youll see my giant rant
like its not saturated in anyway
well towards the end it is
jesus, so the server just gets into a loop of re-sending something over and over
yeah its weird, and only happens when i jump on this instanced static mesh
i suspect some sort of prediction / correction loop
the session frontend isnt working properly with remote devices in 4.17 too
so i cant remote profile my server
have you tried with a base character?
if it works with that I should be able to duplicate in my project
it only occurs in a packaged project
and my game is all setup to connect to an API spawn the pawn etc
if it was a correction loop the "clientadjustposition" call count should have been higher, depending on the run length in that graph
im not sure what I should be looking at tbh
Tool for displaying network traffic and performance information captured at runtime.
The docs are a tad dated
ok
use the bottom
so when the red line is there it's filtered?
its filtered in the primary page
Could be someone shooting, picking up something
so that was before the spike?
select everything before the spike
Im starting to think this isnt network related, but CPU related
Peoples pings are likely spiking because the server is reducing the net ticks so the CPU doesnt overload
When the server dies, the CPU is at 100%
But it's related to being on top of an instanced static mesh
if its stuck replicating over and over that will load the cpu too
Yeah
Do you have steam?
I can give you a steam code for my game, and you can see it first hand ingame
at work
Ok np
but lets go private to stop spamming here
Sure
Ok we found the root cause. If anyone here is using instanced static meshes on construct in a multiplayer game - dont upgrade to 4.17
If anyone has contact with Unreal - Michael Dupuis I think he is working on the instancing, chuck him this link ^
Hmm I think I do but haven't had any problems but have not packaged. I'm not sure if it's my Navmesh or that hit inalways an questioned to resale my level
Save
@raven holly ive had this issue
since upgrading to 4.17
im so fucking psised
i wasted like 4days trying to mess with it
lmao
instanced static meshes
are just broken in general
in 4.17
there's literally over like
5+ bugs with ISMs right now
on JIRA
4.18 comes out, bug now has target fix of 4.27
lol I've been checking it, waiting for them to slide it again
Yeah, I feel your pain, it seems like Steam stuff always gets pushed back :/
yeah :/ might have to fix it myself. I was all excited for 4.18
pretty much proves the bug voting system is useless tho
I mean, I don't think it would be a really good idea to completely base development off of votes on an issue tracker, but yeah, it's more of just a "duly noted" kind of thing
I can sympathize with fixing problems that have to do with an external API, but I agree, it does seem a little mis-managed(?)
I don't want to criticize anybody because I know they have to prioritize things and I've been in that type of situation, but I also don't want to just sit there and think nothing of it ๐
haha yeah, I doubt the issue has anything to do with an external API tho. But yeah I get it, oh well still love unreal ๐
Well, I mean even if the problem is with the UE4 code itself throwing Steam into the mix does complicate things a bit
Yeah, for sure. Time to get digging ๐ณ
Has anyone tried this with ue4 4.15 https://github.com/yas-online/UE4-DedicatedServer
Its a dedicated server plugin which adds rcon support
and a console for the dedicated server
@twin juniper moving my static mesh instancing to beginplay instead of construct resolved the net issues, but doesnt stop the log beign spammed
@raven holly yeah?
Seems to...
Not sure at this stage
make sure u dont have this issue in yours
they've fucked static mesh instances
Standing on a instanced mesh vs not standing on a mesh lol
it doesnt spike the network as much as before though
Yeah it's screwed a lot of things with my project
i guess not enough people are playing with the previews they release
๐
but yeah seems like tempoary fix is move static mesh instancing to beginplay not construct
honestly i would say that 4.17 was a complete failure, i think it just didnt go through enough proper testing
yep
i should write on the forums also
regarding 4.17
and how broken & unacceptable it is
๐
im testing to see if moving the instancing to beginplay fixes anything
not 100% sure yet
anyone know how to fix an issue where an RPC doesn't seem to work when using a listen server and the client is not in the servers viewport?
I guess it looks like the RPC is going off but an animation that has a collision isn't colliding
Well it seems like moving it to begin play doesnt resolve anything ๐ฆ
@tender granite make it always relevant
TotalNetBandwidth=320000
MaxDynamicBandwidth=7000
MinDynamicBandwidth=4000```
What does everyone have these settings on?
Sh*t PM me this evening @raven holly i keep forgetting
haha
Im outside this morning, for real xDD
"CalculatedNetSpeed - Calculates current net speed clamped between MinDynamicBandwidth and MaxDynamicBandwidth. "
I cant pm you
i added you
K den, accepted
@tender granite Sounds like your Animation on the Server only tick when he sees them
I think there was a boolean for it
On the character or mesh
@thin stratus Do you know if the turn based multiplayer nodes are just for iOS?
Game Center is iCrap
Do clients have all the server related code packaged in to them?
google finally pulled through for me! found my answer https://www.reddit.com/r/unrealengine/comments/3rfkqt/when_you_create_a_dedicated_server_game_does_it/
https://youtu.be/EGnMgeeECwo?t=699 Looking at this tutorial, he creates a function that is called by the client to be executed on the server. ...
Hmm, k
I'll test it out this weekend anyway
I mean, could be a nice little shortcut
How often do you guys use the IsValid or SwitchHasAuthority etc . I mean in c++ you near enough null ptr protect everything so should I be using IsValid every single time, and same goes for calling custom functions do I always have to check for authority or should I only do it on stuff that I think is game critical . Just asking because I've seen people do different things
Both are important
i basically use either of those in every function
you should always be checking what you're working with is valid
if its likely to become invalid at some point
That's what I thought but wasn't sure if I was being "overkill " as I use them so much and yet ive seen multiplayer tutorials ,wiki etc and they don't even use them
having a switch has authority is a good way to remind yourself at a glance that whatever function should only execute on the server
it's also good to use to split logic, it's useful on beginplay etc, where you need the server to do something and the client something else when that class is initalised
Hmm I might edit the custom event source code and just add the switch has authority check inside the event then just have two output execution pins one for client one for server
It does already xD
What custom events already check for authority?
No I'm talking about making the switch has authority functionality happen inside a custom event so I just create a custom event and it does it automatically without the need to do custom event>has authority node> logic
Because you only need to really check for authority on replicated events so why not save time and repeating code . Instead of continually having to use two seperate nodes i can jist combine the functionality into the one node and have it do the check in the background and the custom event already has a bool to use so the logic will only run when needed
So in the cusom event code eg (pseudo code) if
(bRunOnServer)
{ // check for authority}
Found a major issue with 4.17 & Linux servers
There's an issue with character flooring in linux
Which basically creates an infinite loop & crashes the linux server
ยฏ_(ใ)_/ยฏ
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
R u reporting them?
I am legit trying to get my game up for a closed alpha test for 800 people, so reporting will come later haha
Quick fix, using a windows server
And it's going to be a pain in the ass to reproduce the issue
Any idea what's a good way to deal with async events . Like for example I have a "LoadPlayerCharacters" event which has 3 executions . Normal , OnSuccess, OnFailure. While the event is doing its thing to provide feedback to the user I use a widget to display a loading throbber and some text "eg checking database for characters please wait" then when on success or failure executes I change the text to either "character load complete" or "unable to load characters" the problem I have though is if the network is being fast sometimes on success or failure will fire almost instantaneously so the client never sees the messages
At the moment I have resorted to using timers but was just wondering how other people have tackled this issue
any one know why i'm getting a "[2017.09.15-13.55.53:114][ 41]LogOnline: Warning: STEAM: Server setting ,MATCHTIMEOUT_f:120.000000 overflows Steam SetGameTags call" when i try to spin up a steam dedicated server?
i took a look online and found some potential solutions but none of them worked
@thin stratus can you elaborate? i'm trying to spin up a steam dedicated server without much luck, i have my own app id, added the IPs on the steam partnership page, and i've basically copied the code from ShooterGame (which produces those errors)
Are you specifying any additional settings when creating the session?
let me grab the code and i'll show you what i'm trying
i actually saw on one of your posts what the output should look like when you spin up a dedicated server, and mine looks nothing like that. it says nothing about the steam server IP etc. but yet, my code registers the session fine
HostSettings->Set(FName(TEXT("MATCHHOPPER")), FString("TeamDeathmatch"), EOnlineDataAdvertisementType::DontAdvertise);
HostSettings->Set(FName(TEXT("MATCHTIMEOUT")), 120.0f, EOnlineDataAdvertisementType::ViaOnlineService);
HostSettings->Set(FName(TEXT("SESSIONTEMPLATENAME")), FString("GameSession"), EOnlineDataAdvertisementType::DontAdvertise);
That's what's causing problems apparently
i'll try commenting them out
now i just get [2017.09.15-17.22.52:527][ 32]LogOnline: Warning: STEAM: Server setting ,SESSIONFLAGS:683 overflows Steam SetGameTags call
@polar bridge So, I do remember that I had to do an engine change to get this working
Problem is, I have no idea what file or code.
It's ages ago
It's basically the code that takes care of parsing the settings from steam to ue4 and other way round
Try
File: OnlineSessionAsyncLobbySteam
Function: GetLobbyKeyValuePairsFromSessionSettings
Something like that it was
Could also be one of the functions a bit further down
that's all I remember, sorry
no problem, i appreciate the guidance ๐
GetServerKeyValuePairsFromSession ?
ah
Line 248
if (GameTagsString.Len() + NewKey.Len() < k_cbMaxGameServerTags)
That's the check. If it fails, it throws your error
hmm wonder why it's throwing that though
Cause someone at Epic didn't set that up right
lol ๐
Try to annoy this person: He gave me the code back then
1 sec
awesome i'll dm him, thanks man!
why steam overlay doesnt appear on shipping build?
i have steam_appid.txt in my root project folder
Steam not turned on
Steam plugin not on
Steam_app.txt does not belong in root project folder
Steam overlay on
480
going to post a lengthy question but I think its a simple answer, I'm just not finding it lol
I've got a few hundred giant rooms that move around in my level. On client-side, they have a bit of a twitchy movement, instead of smooth movement. /r/unrealengine tells me I need to have the movement taking place on the client side and currently its taking place on the server side then replicating the movement to all of the clients
I think this movement replication is clogging the pipes
they say to send the move command to the clients and let them handle it, but I need it to happen on the server too of course
currently I have a switch has authority > move component to happening for each room
lots of moving rooms - 20-30% will move at once
do I need to disable "replicate movement" then create an event to run on clients?
not sure how to specifically say "Move on the server, and on the clients, but don't replicate all of the movement data from server to client - keep it separate"
well, if the blueprint simply exists on both server and client, executing the code without testing if its authority will move the rooms on the client too
interesting. playing around with it now. Is this a case where muticast would be appropriate?
with "replicate movement" disabled?
keep in mind players who join late too (if they can)
yes, they may execute the code seconds later, which means the box will start moving seconds later
if you are multicasting the code to move the rooms then movement replication wont be needed
not going to have late joining, but I get what you mean there