#multiplayer
1 messages ยท Page 525 of 1
Hello everyone, having an issue getting the server to show up in game, were using Steam and it is showing perfectly in the steam server browser with public IP, but it doesnt show up in game, I have no idea why it worked before perfectly
Does it have anything to do with that our app is in prerelease state and our dedicated server is not?
@thin stratus Yeah I still do that! Just be sure to "round" the input locally as well before simulating, otherwise you can cause corrections there too.
i build my dedicated server with automationtool from the command line. is there anything i can do there to exclude textures and sound files from the packaged output?
they have no relavance to a headless deployment
and if i do exclude them does it break anything?
@meager horizon How do you build using automationtool?
like this:
c:\ue\engine\binaries\dotnet\automationtool.exe -ScriptsForProject=C:/Users/brain/TowerBattle/TowerBattle.uproject BuildCookRun -nocompileeditor -nop4 -project=C:/Users/brain/TowerBattle/TowerBattle.uproject -cook -stage -archive -archivedirectory=C:/Users/brain/Desktop/TowerBattle -package -ue4exe=C:\UE\Engine\Binaries\Win64\UE4Editor-Cmd.exe -nopak -prereqs -nodebuginfo -targetplatform=Linux -build -target=TowerBattleServer -clientconfig=Development -utf8output -compile
in a windows batch file
i then rsync it up to a linux server
I have build my dedicated server and if I exclude my contents, then my server won;t run
i dug through the logs that ue4 outputs to see how it was doing it, and copied that
the important bits there for me are the -target, -archivedirectory and -ScriptsForProject
YEah u r right for dedicated server we should not need content assets, but still it asks to run.
perhaps theres a way to trick it
im sure someone here has the answer
e.g. some way to package a dummy asset
i guess it also depends on what you do with the assets
i know that some assets in my game are needed by the dedicated server too
e.g. the blueprints of the player controller, pawns, etc
I m OK for blueprints, but materials or textures doesn;'t make sense
yeah same with sfx
does it just plain refuse to start if you do it?
or do you get errors in your console about null references?
how are you excluding assets from the build?
fatal errors that stop the server? ah.
List of class names to exclude when cooking for dedicated server
whats this do, i wonder
time to go source diving ๐
@chrome bay Did you ever run into corrections just from sending more data along the ServerMove calls?
E.g. not serializing it
@rich ridge are you using this to exclude stuff?
how were you doing it then, removing them somehow by hand? ๐ฎ
i are confuss. ๐
@rich ridge i added Material and Texture to that list on my build, cooked the project, 216mb total size.
im uploading it now, i'll try and run it and let you know what happens ๐
i just hope it doesnt have some unforseen side effect like line traces failing beucase theyre relying on something like the transparency of a pixel for complex trace shrug we'll see
Cool man
i cant imagine that would be a thing in the dedicated server, as that would need some kind of RHI to render it to know the opacity of any pixel in 3d space
@thin stratus I don't think so but then I was sending pretty much the same thing
So when you used that automation script to build the Dedicated Server does it include texture and materials inside the binary??? @meager horizon
Location, Rotation, Ang Vel, Lin Vel, Input & delta time
Ang Vel is hyper sensitive to corrections though
This was the psuedo-physics version, not actual physics ofc
Yeah not doing any drone hover stuff anymore :D
Was sending 2 floats and one Normal Vector.
Ah as far as characters go I've never sent any extra info
And the floats weren't -1 to 1, so they can be bigger.
Test was with 0.f and FVector::ZeroVector though
yeah the quantization only works if you know the min/max range of the float
So basically 2 floats and a netserialized Normal Vector (Epics FVector_NetQuantizeNormal)
@rich ridge it seems to have excluded the materials and textures from the pak
theres a crapload of png's in the Engine folder, but im not too bothered about that
they seem UI related
I'll have to test it later again. The floats and the vector aren't 100% needed. I can hide the vector in the Acceleration and keep the floats the base values.
it seems to upload zero byte placeholders of the excluded textures and materials
Lets hope it goes well
well i'll know in about 5 mins
[2020.02.26-09.07.27:167][ 0]LogWorld: Bringing up level for play took: 0.009822
[2020.02.26-09.07.27:168][ 0]LogLoad: Took 0.104256 seconds to LoadMap(/Game/VehicleCPP/Maps/VehicleExampleMap)
[2020.02.26-09.07.27:168][ 0]LogLoad: (Engine Initialization) Total time: 0.49 seconds```
seems fine to me
unfortunately i cant test and play... im no at home
did you get an error booting it up before you could even connect a client before, @rich ridge ?
Nope I didn't get any error
hmm one sec
i may be able to connect something
[2020.02.26-09.11.40:954][585]LogNet: Join request: /Game/VehicleCPP/Maps/VehicleExampleMap?Name=BRAINWAVE-38F0A9964F08B410AD2966BA7C946B3D?SplitscreenCount=1
[2020.02.26-09.11.40:954][585]LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
[2020.02.26-09.11.40:987][585]LogNet: Join succeeded: BRAINWAVE-38F0A9964F```
yup im on, it works!
so you can do what i did @rich ridge to cut down the dedicated server side
Yeah I will do it today all thanks to you
@meager horizon are u sure that dedicated server is running RHI thread???
no problem... and iirc a dedicated server doesnt have any display at all
so no RHI
is yours built as dedicated server, or are you just running a listen server on a remote machine?
Dedicated server
because i was running a listen server on there for a while and didnt realise where i'd gone wrong, it wouldnt boot without -nullRHI... ive fixed that now
do I need to use cpp to create sessions for steam or can I use advanced sessions plugin to do it in blueprint ?
its a dedicated server
steam dedicated server api failed to initialize
any idea why I am getting this error ?
Hi can anyone by any chance tell me what the problem may be here? Every client but client one works in PIE. If I use 4 players 3 work but client one does not. Character spawns but it breaks somwhere after.
i have an actor which has components on it, those components all have positions which update frequently, so ive set those components as replicated using component replication.
the actor moves smoothly, its using character movement
however, the components of the actor move in jumps, one or two times per second
i think this may be due to lack of interpolation, can this be turned on for replicated actor components?
they only seem to jump once theyre set to simulate physics
@lament cloak I ran it as dedicated server. The window says client one (window header, also in the screenshot above). And also server wouldn't be able to draw the widget seen in the screenshot?
heyya. PlayerController->IsLocalPlayerController() false means simulated actor? whether client or server
Need advice on synchronizing origin shift for 2 pawns at once (replicated). A character pawn inside of a spaceship pawn and the spaceship executes an origin shift. How would you make the character origin shift at the same time?
If the Client combines two moves, shouldn't the DeltaTime on the Server be the sum of the two combined moves?
Why would one want to delay sending a move in the first place?
Reduce the amount of RPC's being sent
Can quickly flood the move buffer otherwise
So it combines them to reduce the # of sent ones if they are considered "not important"
Right, but I get DeltaTime issues on the Server :/
The delta on the server is the delta between packets IIRC
It doesn't use the clients delta time but calculates it based on the last time it received a packet I think.
Client Performs Move 1 Move 2 and Move 3.
Delays Move 2 and later combines it with Move 3.
Server Performs Move 1 and Move 3, but Move 3 has the DeltaTime of the Client's Move 3
Yeah I know, it uses the last TimeStamp and the new one
Which makes even less sense to me, cause Move 1 and Move 3 are the only two that make it to the Server, but the DeltaTime is the same as the Client's move 3
Hmpf
I can fix the issue if I forceNoCombines
But that's shite
It's a move in a straight line, so it's totally fine if they are combined. It even makes sense more or less.
But not if the freaking Server doesn't move the same distance in the same time.
you sure? any DeltaTime reported would be very inaccurate because you're running a debugger
we solved in in teh DM's ๐
I'm apparently not understanding Multicast events..
I have a level blueprint where I call a multicast event to draw a debug point in the middle of my level which works fine for both server and client (but..)
When I call the multicast event from a Execute on Server event the debug point only gets drawn server side:
What gives?
(the left window is the server, right window is the client and the blueprint to the right is where the debug point is being called)
server/client rpc's need a owning connection
level has no owning connection
so a server rpc will just fail
Right so if I wanted to call a multicast event from the server it would need to be called someplace else?
Like an actor with an owning client perhaps?
normally for things like debugs
i pass through the PlayerController
but yeah the actor has to have a owning connection
this shows it clearly
Server owned actor - > Server RPC -> Dropped.
Owned by a different client -> Server RPC -> Dropped
Unowned actor (Level actor in your case) -> Server RPC ->Dropped
So how do I define an owning client for an actor? I have a sword that I'm spawning on beginplay on the playercharacter class. Would it be enough to set the owner of the sword to the playercharacter?
has anyone else experienced that their steam doesnt work on unreal anymore?
yes
aah okay this clears things up, thank you
I have all the subsystems in place and plugins enabled but it wont show my steam name anymore in a blueprint I made
Its working when I build my game and run it
but when I'm in the editor and launch a standalone it doesnt seem to get the steam overlay
anyone have an idea how to fix this or what I should start checking first
my multiplayer options
I;m launching standalone game with 1 player
steam is on and connected
my subsystems are both enabled in the plugins
I have the text that needs to be in the defaultengine.ini
anyone have an idea what would cause not being able to use steam in the standalone play in unreal?
@winged badger Issue was I wasn't resetting my own data back to the start of the OldMove when they were combined. So the client performed the old move and the combined move. It's solved now.
I basically didn't know that the client actually reverts the old move and performs the combined one too. I thought the combined info is only for the server.
@mental geode Steam only works outside the PIE. Are you sure you are playing outside of the editor?
yes. I have the standalone selected
@thin stratus
if I go to my uproject file and right click launch game then steam works
Name might be misleading, but that Standalone is more about the window than the game
I don't need a HasAuthority() check on an Server function right?
no
i mean a server RPC is for the server, which is automatically authority
virtual void SetupInputComponent() override; Inside this function GetPlayerState() is NULL, why?
virtual void OnPossess(class APawn* InPawn) override; But inside this function GetPlayerState() is not NULL, why?
OnPossess() is called first and then SetupInputComponent() is called.
cause SetInputComponent is called before player state is replicated back
client side
if you are doing it cause of GAS (ASC on PlayerState), then check the fix i made for @thick creek sample project.
Yes for GAS
i do mine very differently
i build the input stack manually
and inject it in
but that is a lot more work
can you elaborate a bit, I can code thats not a problem.
when the PlayerState reps back
in the controller, i create a InputComponent (AbilityInputComponent)
set the binds, and add it to the Input component stack
which allows me to remove ability binds any time or swap them based on what i am doing (Driving a car? change input stack), etc
this seems cool way to handle, I will evaluate this before coding directly, because I m more focusing on managing my code design. If it fits well then I will go with it.
sure ๐
check PlayerController
has functions for handing inputcomponent
i can literally change all inputs for different modes in the game
like edit mode, if i wanted too
i can see its more flexible
i know that is how Fortnite handle inputs, they have multiple input components and push/pop them when needed
ohhh I didn't know that
virtual void OnRep_PlayerState() override;
// Called from both SetupPlayerInputComponent and OnRep_PlayerState because of a potential race condition where the PlayerController might
// call ClientRestart which calls SetupPlayerInputComponent before the PlayerState is repped to the client so the PlayerState would be null in SetupPlayerInputComponent.
// Conversely, the PlayerState might be repped before the PlayerController calls ClientRestart so the Actor's InputComponent would be null in OnRep_PlayerState.
void BindASCInput();``` So these were things you fixed in dan's project right?
Network Multiplayer Fundamentals - Inside Unreal
WHAT
Creating a networked multiplayer game isn't easy, but Unreal Engine's gameplay framework is designed to set you up for success. On this episode of Inside Unreal, Technical Writer Michael Prinke will cover fundamentals suc...
This is what I was looking for, timing couldn't have been more better.
yes
I'm getting a TravelFailure: PendingNetGameCreateFailure, Reason for Failure: 'Error creating network driver.'. Shutting down PIE. every time I try to play my game in editor with server and client...
Never seen this before.
So I figured out with my issue that in game mode base, player controller fires off the client version and will add the widget to the viewport but if I switch to agamemode, the client version of my player controller event begin play never fires. Is there some extra steps I need to do when using the agamemode versus the agamemodebase ?
So I did that, but no dice.
bool ARPSGameMode::ReadyToStartMatch_Implementation() {
//Super::ReadyToStartMatch();
if (MAXPLAYERS == PlayerControllerList.Num()) {
StartMatch();
return true;
}
return false;
}```
but maybe this isn't correct?
does it get called?
if I do this, it does return true, that match has started.
ok then without really knowing how your setup works
im lost
cause we use AGameMode
and we don't have thee issue you have
Gotcha. Yeah I'm just trying to get a widget to come up on my player controller for both server and client (listen server setup)
Fires on the server just fine, but the client version of the player controller never fires event begin play.
This is as far as I've come lol.
i find PlayerController begin play too early
i use a custom AHUD
for my widget stuff
Roger that.
Yeah, never calls event begin play on AGameMode but on AGameModeBase works flawlessly.
Ah yeah you know what I have the ReadyToStart_Implementation not calling the super because it causes a null pointer exception.
yeah but that should be ok
i always check what the super does
before i explictly disable calling it
Right.
well the workaround right now is setting up a client rpc to act as the begin play that I call from game mode, that seems to work lol. oh well.
Hi people, I was wondering how to set those variables in DefaultEngine.ini I've just copied them to my project from another example project so I don't really have much idea how to use them. I'd love to hear some explanation.
I'm using AdvancedSteamSessions plugin.
Hello everyone. My steam dedicated server shows up normally on the steam server browser but it doesn't show up on FindSessions. FindSessions reutrns 0 results. Any ideas?
@rose prawn you set them by changing them what you mean?
also to explain the variables, it means that is the maximum bandwidth allowed per player... pretend theres like a thousand players fighting each other, this is massive amount of data flowing from server to client and what not... if there was not a limit then the servers connection would be saturated completly just sending data to one player! the entire game would fail... but with these limits each player gets a set amount of bandwidth allowed. now the game can continue, although laggy as you would expect but some things like reliable RPC's and some high priority variables would make it threw vs the bulk of the action.
as for the steam stuff i dont know what that does
Anyone know how I can make a game mode (similar to battle royale) where I start the game and then end when there is only 1 player alive?
not sure how to approach this with blueprints
I would think it has to do with destroy event and then somehow returning all players back to lobby.
been struggling for a bit
@twin juniper Hey, if you still have an issue with it you can send me a pm
looking for feedback. So my game is currently a standalone single player game but I would like to leave the option open for the possibility of adding online multiplayer support in the future. Because of that, obviously I need to made certain design decisions now to make refactoring online support reasonable.
Should I be designing this as full-blown local authoritive server design now or what?
@random verge if you wish to make your game support multiplayer then you should really make a multiplayer game to begin with. Singleplayer then becomes a listen server with just 1 player, the player. Otherwise, adding multiplayer support on top of a pure singleplayer project is qutie tedious and error-prone
Yeah that's what I'm meaning
and just put code in place for now that makes sure no outside clients can connect until time to add multiplayer support
Exactly
This is not new either. I know of a few games that do this. The other option would be to build a separate SP and MP but if your gameplay doesn't change between SP and MP it is more efficient to just make it the way I mentioned I guess
If, however, your game has a SP campaign mode but the MP portion is just quick battle then you should separate the 2 entirely and build them on their own
@random verge build the game with multiplayer in mind, adding it later is a nightmare in hell
your single player component can use the same code with proper use of authority & localplayerController etc
Hey, how can I replicate an variable on USceneComponent?
how resilient is the UE4 networking code?
ive managed to crash it a couple of times by connecting to the game with a map thats newer than the servers
but i dont know if the fault is my own, or youre just 'not supposed to do that'
and if youre 'not supposed to do that', how can i put checks in place to stop it?
So how does server comes to know that the client is connecting with new map?
Does it maintain version internally? some kind of hashcode.
If server is maintaining some kind of version then it should ideally refuse the connection instead of crashing either client or sever.
@meager horizon If we consider your observation, then for every map update we should release new dedicated server and we should manually put hard check for clients after matchmaking regarding to which version of dedicated server they are connecting to avoid crash.
yeah i would have expected some kind of version control of the map, a check when connecting and joining the server
or some version control of the pak file or even the whole cooked game
if epic games is putting version check then it should refuse connection
in this instance though, i connected to it with uncooked game from the editor with PIE
maybe it didnt like that
did you try the "dont cook materials" thing btw? ๐
I didn;t try out , I will do that.
curious to know if that worked for you
I tried to connect and it worked fine, but un luckily I didn't change my map and connect again.
this I missed.
I m stuck with GAS at the moment. Once that is fixed I will start.
GAS?
@meager horizon GAS https://github.com/tranek/GASDocumentation
it's the bread and butter of modern multiplayer, with Dan and Kaos spoon-feeding the Mini-Me legions, such as myself, with invaluable information ๐
oooooooooh something new to learn!
see, im pretty clued up on networking in general, and how multiplayer games work as a whole, but im a complete newbie to how UE4 does it all
my problem isnt making it work, its making it work the right way following the design ideals of unreal engine
GameplayAbilitySystem
i wonder if this is useful to my game
It's a good tool. Got to know when not to use it as well though.
yeah, all the attributes of my players characters are set once, before match start
but i guess taking damage takes away those attributes...
UE4's networking is good btw. Bias aside it's still miles better than anything else.
it seems extremely efficient
i found a plugin yesterday called Smooth Sync that makes it even better ๐
anyone else here using it?
nah. prefer doing my own. not really sure what purpose it serves
extrapolation, and tweaking of values
im curious how much rubber banding might occur in extreme lag though
and im still also not sure why client side prediction doesnt have the same effect
Hey, how can I replicate an variable on USceneComponent?
tick component replicates, iirc
then tick replicates on the variable
that worked for me, but generated a lot of net traffic, as i have a lot of such components
what i did instead was had the state of a set of uscenecomponent managed by the actor that owned them, and synchronised its state from within the actor as one
@sleek current what variable, one that is defined on USceneComponent and not by default replicated?
It's variable that tell whether or not the component is enabled to work. It's a variable inside component
I tried OnRep
RPC's
etc
nothing worked for me
whats the name?
UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category = "Interaction")
FInteractable InteractableStructure;
Or just
UPROPERTY(ReplicatedUsing = OnRep_SetEnability)
bool Disabled;
so its a custom scene component
ye
and is the component itself replicated?
yes
on a replicated actor?
it is in ReplicatedComponents array on the actor at runtime?
I have no idea, haven't implemented that
the actor that holds it is just a basic blueprint based on aactor with replicated boolean set to true
all actors keep all replicated components in an array
so its either your actor doesn't replicate, or your component isn't on that list
so unreal's dont have ike dynamically generating array of that components and I have to hardcode each one?
it does have it
you just put a breakpoint in the actor and take a look at the contents
for some reason
the breakpoint doesnt trigger in blueprint
It literally does every single node added print string to make sure
but the breakpoint is not triggered
whaaaaaat
if i want to take screenshots of a multiplayer game, not from the perspective of one of the players, am i best to implement spectators and use a spectator for it? and can a spectator just be free-cam?
@meager horizon Press F8 while playing in editor
thanks @sleek current ๐
Is there a way to replicate actor movement but not to update the location of the actor to the replicated location on client?
NVM just figured out how get what I want
I'm using a framework that has this code. It's to set the visibility of a HUD element. I'm confused how executes on server -> widgets work. Doesn't this blueprint only call on server? It currently only works for player 0 (host) and is bugged on connecting client (player 1)
you can't execute server stuff in widgets
What does the "replicated to server (if owning client)" mean in this case? Does it mean this function will be called on the client, then called on the server?
I'm not trying to execute server stuff in widgets
RunOnServer makes no sense there
that's what I thought
it came like this, on a very popular framework
Click image for larger version Name: hPeUddS.jpg Views: 2 Size: 119.8 KB ID: 1391739
Welcome to the support thread for the Advanced Turn Based Tile Toolkit! This
Not familiar with it but a Run On Server event in a widget makes no sense.
it should just be not replicated right?
They can't be let alone shouldn't
what? hah
Server and clients know nothing about each others UI
And they can't, you can't replicate widgets.
Epic should really disable the ability to mark functions as RPC's or properties as replicated in classes which don't support it... would help avoid that confusion.
fair enough
however, my issue still remains
the unit->getOwner gets a player controller that doesn't equal getPlayerController
I'm trying to only show this HUD, for the player who has ownership of the unit
getPlayerController (with index 0, on connecting client means itself right?) does not equal unit->getOwner()
how does multiplayer typically handle this sort of situation? where you need to show a HUD only for a specific player?
I'm also pretty confused by this, when calling print on this widget, both server and client prints something LogBlueprintUserMessages: [WBP_AbilityBox] Server: BP_PlayerController_ATBTT1 LocalPlayer_54
LogBlueprintUserMessages: [WBP_AbilityBox] Client 0: LocalPlayer_53
Does anybody know if Animation Blueprints by default sync animation times? (Obviously with delay by the RRT)
I know technically the animations should sync up because the replicated states should change around the same time but is there anything to make sure the animations are running at the same time on client and server?
@rotund whale HUD should be managed by the client locally, that's how MP games handle it.
Multicasts won't work either
You literally can't do anything related to the network in or on a widget
@fossil veldt And no animations do not syncronise
Syncing them is pretty much impossible
Is it?
I figured they wouldn't
But I thought you could just rewind the anims by the network clock
and sorta just interp them
so that they sync up
Given that the client and server are probably running at different rates, and given that dedicated servers don't usually run or evaluate animations at all yeah.
ah can you not do framerate independent animations?
Well, the issue is that animations are framerate independent because they run and are evaluated on different threads.
ah right
They're not synchronised with the game thread at all. Dedicated servers are usually single-threaded too so you don't tend to run them server-side unless you really need to
yeah that makes sense
I'm trying to work out some lag comp with state rewinding
but one thing I can't work out is the hitboxes
because the server wouldn't match anims with the client
When it comes to animated hitboxes to that degree, you just have to trust the client to some extent
thats why a lot of new games do client side hitboxes
We do lag compensation, we just interpolate the capsule back a little and check the clients "hit" was near the capsule
yeah, tis the way
yeah
for things like (arm, head, etc)
server can just do a broad trace
to make sure it was in that kinda range
I think CS:GO's lagcomp somehow does manage to sync up the player animations
I guess maybe they take the local time of the animation and offset it against the server time of the animation
but your adding a layer of complexity
Well for characters, animations don't actually play on the server between client packets
for a simple system
@chrome bay ok so basically I should not be checking for unit ownership, player indices, etc on widgets?
I'm not really sure what you're doing tbh but the TL;DR version is that clients should manage what's on their screen locally
@rotund whale widgets should pull the info they need, it knows its owning local player
anything widgets need to see either should be local or replicated via a replicated actor and pulled into the widget client side. Widget should do 0 replications, No replicated variables or functions.
Yeah I get what you guys mean
Tbf I guess the client could just tell the server what time the animation was in when the hit occured
and then the server rewinds with that animation state and creates the hitboxes
It wouldn't be playing animations
so why not just accept the clients hitbox?
It would just create a pose from the animation time
create hitboxes at the socket locations
and then trace
It's not even worth the 32-bits per hit IMO
When you say pull in data, do you mean like this? Unit here is a replicated actor. This function exists on the widget.
32bits?
in my game, client shoots, sends target data (which is hit results) pakaged.
this contains all hit info
Hell I don't even send hit results :d
yeah but client produces the hit result
server does 0 trace
except for checking if a wall or somehting was in the way
a basic trace
yea I would just want to send trace Start, End, Anim, Anim Time Float
it works for Fortnite with 100 players
client sending in hitresult for every shot ๐
Really?
yes
I figured that would be kind of expensive
not if you serialize it properly
server doesnt even control weapons
server doesnt even know if a player started shooting till the first shot comes in
then it activates the ability, and monitors for target data
Doesn't Fortnite use the same system as UT4?
Nah not anymore
ah
They used to I think, but it's using GAS now
yeah
That's not at all what I was expecting lol
I guess it makes sense as that system is built for MMO games
One thing I never understood about networking in UE4 was the network clock
well there isn't one really
Everytime I use it I have had problems
What you mean by network clock?
AGameStateBase::GetServerWorldTimeSeconds()
AFAIK there's no syncronised clock system in the engine outside of GameState::ServerWorldTimeSeconds - but even that doesn't work properly
Yah
Problem with that clock is that it's still offset by ping
Yea I don't understand why though, It shouldn't be hard to eliminate that surely?
Just offset the result you get back by the half ping
and it should be matched perfectly
Well.. the trouble with ping is it's not necessarily a perfect 50/50 split
Yeah but you can send a local time
Probably relatively close 80% of the time, but not perfect
Yeah but even then - you don't know if the packet took as long to reach the server as it did to get back
hmm
You also don't know how long the server took the process the packet and send another back etc, so there are still small delays you can't account for
ah yeah that makes sense
All that being said, I do the same thing to get a rough time sync'd clock - it's just about good enough for most things
my own but it's the same basic idea
Ah fair enough
I have a little component on the player controller that I use for it
Ah
I need to implement one of those
I think I would probs put it in the PlayerState though
So the reason I didn't do that is.. it's replicated
And players don't care about other players' prediction/clock etc.
ah fair enough
that makes sense
How do you guys even know how Fortnite's networking works for stuff like this
have they showed it off in Devlogs or something?
They've done some very brief explanations of it but the info is kinda spread out all over the place, some on UDN, some on the forums etc.
Never anything particularly official AFAIK
ah
Kaos probably knows best where that stuff is
Riot's new FPS game they say has pretty much eliminated peeker's advantage
but I don't understand how that would be possible
ah no idea.. maybe they have some kind of lockstep hit detection or something.
Mind you... be interesting to see if they support those claims when they finish it ๐
ha ha, I'm interested to see
Did roll my eyes a little when they said the game was "built from the start to prevent cheating".. as if other games aren't..
yea
components can replicate right? I set my component to replicated, and its own variable inside to replicated, however the replication seems to not end on on client-side
they can replicate yes
they do need a replicated actor to be on
ah good tip
there is no such thing as an unhackable game
claiming it just makes you fall flat on your face more spectacularly when it gets hacked
Aye, There's always some nerd somewhere with IDA and a stupid amount of brains
help please! in PIE are my PlayerControllers trying to control the same pawn?
Hey guys, is there a way to know if an actor is destroyed due to no longer being relevant in replication graph?
We want to play effects when an actor gets destroyed but not if it's being destroyed from going out of relevancy
Hey, Someone knows how to start a dedicated server via command line ?
And join it ?
The -server flag start the game, I don't understand why
like UE4Editor.exe ProjectName MapName -server -game -log?
When I do this command the game start and a window open with the player and stuffs, I'd like to only start the dedicated server
@hoary lark I have package my project for win64, and I'm trying to start a dedicated server with the .exe from the package
Here is what I have done after packaging the project : " .\MazeLegends.exe FirstPersonExampleMap -server -log -nosteam"
But for some reason, when I start this command, the game start, a game window is open and a player spawn in the world ...
Do you know the right way to start a dedicated server and to join it please ?
Is the player controller Index on ervery client 0 ?
@idle flame disclaimer: I don't need a dedicated server for my project so while I have looked up how to do it, I don't have any real experience with it. having said that, did you actually build a dedicated server, or did you just build the game? are you aware you have to explicitly build a dedicated server?
When I'm testing multiplayer, the line trace debug visualization no longer works, is there a way to make that still visible?
@hoary lark I didnt know that. Thx for the help ^^
Hello guys! Do someone know how/where UE4 pass SteamGameServer_Init value?
by AdvancedSteamSessions plugin btw
Anyone have any info on adding in voip?
@solar halo https://www.vivox.com/
this is what pubg uses
Yeah. I'm curious if the voip stuff in the engine is good or not.
no lol
(zoom in (tell me if discord compression makes this imposible to read)) im trying to make it so that if you get close to another player there hover ui gets shown but its not replicated to other clients and it only shows the server's hover ui anyone knows what went wrong?
(the server's cast always fails and i dont think making a wdiget visable is replicated)
edit: replication works now but the cast only works for the opposite chactor
ima try to rewrite this to use triggers insted
yea more like a: i can hear these players around me because i had triggered overlaps on them... and if they are bReplicatedIsTalking (repNotify) enable their ui
and for any reason if my overlap ends on this player, hide their ui
idk how well this works with any voip system, and their might be better ways or this functionality might even work out of the box with voip system... just gatta find the right delegate
@half jewel hey i got it to work 90% ;) but this function dose not change the target ui's visablity it changes my own any idea?
here is how i call that
(and yes i tested it the other object is not the one with the hover ui trigger)
i think its a fault with how im projecting it now
i need to project it to the player that owns it and not the cleint
SetOwner() on server
just make an rpc that calls SetOwner, beware that this is needs to be protected as you can imagine
if its a pawn, and you want to call rpcs on this newly owned pawn, make sure the pawn's ::GetNetConnection() is overridden to call AActor::GetNetConnection() so rpcs can work
Are reliable RPCs still UDP?
I assume so, as I only open port ranges for UDP on my servers, but just to be sure
๐ค
Thanks, that's what I thought, since someone referred to a reliable rpc as a "tcp rpc" and it sounded so wrong
yeah everything is UDP, Epic have their own system for "reliability" as such
much more game orientated ๐
is there any diagram for their "reliable" UDP communication pipeline?
don't think so
But the TL;DR is that reliable are added to a per-actor buffer, and the client sends an ack for each one it receives
If that buffer overflows, the client gets kicked
Well maybe it's smarter than that, but that's just the general idea
Oh yeah I guessed something along the lines, I was looking more on the low level details on it
good to see what I assumed was spot on
I'm not sure how NACK's would work anyway, the client/server couldn't send a NACK for something it doesn't know it's meant to receive
But I'm sure it batches ACK's together when it can
There's no client-client communication in UE4 though.
And since reliable's aren't necessarily called in a known order, or regularly etc.
Dunno, maybe there's more to it
hey!
can i get a brainstorming?
anyone have some idea how to trigger movement speed modifiers from the server to work with client prediction but also be "hackproof"?
i mean if i trigger movement speed change on the server (reduce max speed technically), clients still try to move with original speed until replication happens..
only idea i got: wait for the answer come from the client he got the modifier. if server do not get any answer packet, server would enforce the speed modifier (to make it "hackproof")
Yeah but.. how does Receiver know it missed 24 until it receives 25?
That's the thing, it doesn't until a timeout
Yeah, so I'm not sure nack is probably enough for something time-sensitive like a game
Reliables are garaunteed to be executed in the order they are called too (per-actor anyway)
I dunno.. Epic are smart, maybe there's more going on underneath ๐
these both models guarantee order
yes I would like to know that specifically, because I found somewhat fascinating the low level of their networking layout
In distributed algorithmia, there are lots of algorithms worth exploring for networked games
@lean river So long as the client predicts the speed change it should be fine, the packet to change the max speed should arrive at roughly the same time as the predicted movement packet.
Ultimately the Client should change the max speed in advance of the Server, the server would then also change the max speed, then replay the clients' move. if the server didn't agree that the speed could change, the move would be "corrected" and returned to the client.
E.g, sprinting is a common case
yup thats fine, i mean increasing movement speed works.
decreasing movement speed on server causing the issue. if that happens the predicted movement from client would bad always (and corrected by server) until client gets the modify
ill try to eliminate this problem
Yeah, you will have to decrease it on the client as well
You can't really avoid the correction issue otherwise
Everything you do to modify character movement should be predicted by the client. If you can't do that you should expect a correction.
thought the same thing.. :/
i cant really do anything because of player's ping (speed mod change trigger xx ms later on client, so correction would always happen atleast in that short time) except if i wait before ill enforce
or i ignore the whole thing ๐
What I mean is you want to do the speed mod change on the client, and tell the server what you did
If the server is applying it - you don't really have any alternative other than to just accept a few corrections until it replicates.
you could ramp it down "slowly"
instead of applying it instantly, that would lessen the correction
gotcha, but im not sure i can predict that always..
i mean some effects might applied directly on the server.. in this case correction happens always..
but i get it.. everywhere i can i should apply movement mod to predict the speed before i actually trigger the effect on the server
hmm ramp is also a good idea maybe
can that experimental predictive plugin help with this?
back info: movement mod is a part of a buff/debuff system..
seems the ultimate solution is to predict if the given effect modify the speed or not and apply it before ill do / check / apply buffs/debuffs on server
Are you using gameplay abilities for it?
nop, custom system
kk
But yeah the idea is you predictively apply the effect client-side in the hope that the server will do/has done the same
GAS has it's prediction system for that kind of thing
thanks for the help.. :)
ill check gas and experiment with client prediction / handle things if somehow the effect is not applied on server...
yey lot of work \o/ ๐
Anyone know how to do dedicated server console commands?
what for?
@velvet dune
anyways, one way to do something like this would just be to roll your own type of RESTful API that the server can handle. As a quick and hacky way, you could use something like GEngine->Exec(GWorld, <YourCommand>, GLog()); Where would be some string you've received via your API.
@pallid mesa want to make a command that runs thr kick blueprint and a server shutdown that removes all players.
Outside on a dedicated server console
forget about the console idea
and focus on doing an authentication system you can ensure
on top of that authentication system you can enable a set of users to fire commands
like I commented above
But I want to do stuff like you can do on like minecraft how you can type a command in the server console so you do not have to have the game open.
I'll point out that this opens you up to huge security issues, so you'll likely want something more advanced and use authentication. E.G., it would likely be safer to have your server reach out to a known IP rather than accept any incoming traffic. Better yet, depending on how hosting your dedicated servers, there may be APIs you can use to do more direct communications with them (e.g. AWS has management console which may be able to trigger events on a server, which you could then likely hook into).
you don't need the game open with a restful api
it is what we used on GiT
any staff member can execute any set of commads on any client
or if needed on the server
for that you'd need to use any rest plugin
(in the case you are more comfortable wit BP's I would recommend va-rest
and If you want to get all fancy, you can broadcast messages from server to clients using the ULocalMessage system included in the engine
it will require a bit of work, nothing comes out as free
Is it just me or did somthing just go flying over my head at 100m/h
I just started geting mp to work and I'm still working bugs that I do not understand
then forget about the remote commands idea until you get more comfortable with the engine
it's a cool thing but requires too much setup of multiple different things yada yada yada
One of my problems is when I shut the server down players do not get sent to main menu. And I have the server running on a 2nd pc.
dc server?
Yea
okay, so if you look at the player controller functions
there should be anything that firebacks delegate the moment the server connection gets closed.
I've done this before but I can't remember right now the right call
@winged badger 
i think i need to also say im using advanced session.
so you basically need to hook to the session destroy delegate pretty much
maybe these keywords help for your google searches
well i have this setup do i need to run open level after the destory session?
also i already use VaRest for geting account info from a database
that doesn't make much sense. Where are you calling that
that code is in the ThirdPersonController
the Kicked event is not being called at all at the moment was a Future Code i added for a admin menu.
I'd forward you to any resource for you to understand why that doesn't make much sense, but the networking series of wess bunn has some flaws here and there...
you are destroying the server session
from a player controller
well was manly designed for local hosted server from with in the game so when the host leaves and go back to the main menu it destroys the session.
so any player on the session get removed
oh listen servers... okay
i just do not know how to call it on a dedicated server at the moment i just hit the X on a dedicated server
but dus not send players to main menu
okay, I'll take a look this afternoon at home so I can point you to the right function
ok also if you want you can just PM me because i sum times miss the pings for server
because i love to be able to put a command in here to shut the server down correctly
how do i get one i can type in like ARK has?
hmmm, I seem to be getting this error on my GameChat actor when trying to send the Server an RPC from a client
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_GameChat_C_0. Function SendMessage will not be processed.
The actor is replicated though so surely when I call the function on the client because it's a RunOnServer function it should be calling on the server?
It's always worked like that for me in Blueprint anyway
The client doesn't "own" the GameChat actor so they can't send the RPC
Only one client can "own" an actor at once
The SendMessage RPC needs to be in an actor the client owns, like controller or player state
Huh.
I wonder why this only applies with C++ tho
I will do that tho, Thanks
So wait can clients not call server RPCs on the Gamestate? I thought the whole point of that actor is that it was shared between clients and server
Yeah you're right I just tested it
GS shares data and is always relevant but clients still don't own it.
ah
What's a clean way to contain all of my server RPCs then
do you just chuck em in the player controller?
Put them in the player state / player controller
fair
Common thing for game chat
I guess PlayerState makes more sense
they can go into components on either of those
Might be worth considering making a UGameChatComponent
(or something)
So you can still compartmentalize it, and just add that to the player state.
yeah, not a bad shout
Yeah for some reason it only gives you the owning connection error in C++
in BP it doesn't give an error, it just doesn't work
I don't want to discourage anyone but I avoid BP networking with a barge pole ๐
I agree it sucks
I only ever had problems with it
It's refreshing to hear that C++ networking with UE4 might not actually suck
I have a question currently im working on a name system wich shows the name of a player the variable is replicated so ervery client knows the name of every player. But the server doesnt seem to get the client names replicated only the server the ones from the clients! Whats the problem here?
FYI the players name is already replicated in the player state
That's where you're meant to get it from
Oh ok ill try that! Thanks
But how can I change the name i cant find set player name ?
Doesn't look like it's exposed to blueprint
Cant I just replicate the variable in my character bp?
@chrome bay @sleek jackal it is, only its a function on GameMode
ChangePlayerName or some such
Ahhh kk
@sleek jackal Strings are expensive to replicate so ideally you want to use what's already there.
I want to build SteamWorksExample and I'm getting errors
i added $(DXSDK_DIR)Include and $(DXSDK_DIR)Lib\x86 to the project
based on the tutorial it has to work after including those include paths but it gives me these errors
@chrome bay hey was wondering if you can help me a bit i have a few things that pull players name works fine on Player List and Chat Window but Name Tags Show up with your own name on all players
Hey guys was just wondering i ran an editor build with the -game argument and hit netprofile. the .nprof file doesn't seem to load in network profiler. Is there something I'm doing wrong. Should i have a debug or test build for it to work correctly ?
make sure you stop the netprofile as well
otherwise the headers aren't written properly
start netprofile and stop netprofile
@velvet dune screenshot?
@chrome bay thanks does this work with the editor or do i need a debug version
works with editor too
ah great thanks ^_^ @chrome bay much appreciated
Does anyone here have any experience working with SocketIO Client plugin.
@velvet dune i think controllers arent replicated
I saved my settings in the players state so these are replicated
So try to save it in a custom player state .Create a replicated variable there and then in your player blueprint cast to it.
Player Controllers are only relevant to the owning client and server.
They don't exist on non owning clients
But player states work in this caste ?
Is it better to check if we're on the server before calling a server RPC (to execute the implementation ourselves), or does the server RPC automatically check and execute the implementation immediately if so?
@solar stirrup server RPC when called from server is just a normal function
๐
anything I should know about when calling RPCs with a struct as an argument?
USTRUCT(BlueprintType)
struct GAME_API FFunctionifyCallData
{
GENERATED_BODY()
public:
FFunctionifyCallData()
: Inventory(nullptr)
, SlotPosition(0)
, Invoker(nullptr)
{}
UPROPERTY()
UInventoryComponent* Inventory;
UPROPERTY()
int32 SlotPosition;
UPROPERTY()
AGameCharacter* Invoker;
};
This should work right?
const &
Hey guys, I don't know, what I have done, but I built a dedicated server for linux, deployed it on another machine and now im only able to connect to it from the editor, not from my windows client build. Everything shares the same code. Could that be because I build it as "Development Server"? was it supposed to be "Shipping Server"? Thank you ๐
maybe, that raises another question actually.
can different builds of a game connect to the same server ?
Hey guys can someone walk me through how to properly handle when a player gets kicked from a dedicated server due to a network error? Cause at the moment what happens is when my dedicated server crashes the clients get kicked to the main menu but they cannot rejoin the server unless they restart their game. I am guessing I need to do some local cleanup?
hello, im working on a server/client way of multiplayer but i ran into some weird issue "or maybe not weird for the experts out here"; i have a projectile that has a event hit, with a switch has authority.. when it hits on client (all server codes works fine, enemy goes down etc) however on the remote execution pin it seems to fire at random or sometimes not at all. Is there anyone who guide me in the right direction?
so the visual feedback on the client is not working all the time if that makes sense
when i print string directly afterwards the switch has authority on remote exec, it sometimes print and sometimes it doesnt print
wtf, why when I replicate a subobject of a subobject, on the client the outer is set to the actor, and not the same object as on the server?
yes
i ran into that gem, had component replicate subobjects and when it arrived outer was the actor owner
any way to fix it?
how does that even work, doesn't that make the full name different?
can I just like SetOuter() or something?
Someone please help getting this error "LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Warning: STEAM: Steam API failed to initialize!"
On a dedicated server
does ue4 have nat punchthrough capabilities, something like a punchthrough server and/or client code to enable peer to peer networking?
I've started looking at the webrtcproxy program but would appreciate any directions on where to look
I'm guessing something with libjingle is what I'd need
or is it more common to use Steam's nat punchthrough service (forget what it's called)
steam sockets
nothing in ue4?
Unreal's own networking only supports the strict Client-Server model. If you wish to make P2P systems like this you need to implement your own solution afaik. You can use whatever library suits you or even build your own system by utilizing unreal's socket library.
sure - I'm just trying to figure out at what level will I have to start rolling my own code
I'm guessing ue4 must have a reliable udp transfer mechanism etc. so probably higher level
The one time I had to make something custom like this, I built everything on top of https://docs.unrealengine.com/en-US/API/Runtime/Sockets/ISocketSubsystem/index.html
This is the base interface to abstract platform specific sockets API differences.
cool - is this directly one level above winsock on windows?
It sure wraps it, I am not sure if it is the direct wrapper though, knowing unreal this probably wraps a few more wrappers underneath but you'd have to look into the source code to find out
good luck!
actually, what would be the layer on top of this?
would that be the messagebus or is that something entirely different?
Steam Sockets is a layer above inheriting from this, dunno about anything else tbh
got it
How to deal with spectator mode? I searching for some information in documentation. (game mode/spectator class in ue4). Thank for helping i can not find correct doc.
Hey so, Because of UE4's variable tickrate what is the best way to handle replication of player movement? I would expect most games call a ServerMove() RPC at a fixed rate, Say 60hz or something. You could do this by attaching ServerMove() to a looping timer at 60hz, However i'm guessing this isn't the way to go in ue4?
As I guess if you were to do this in UE4 and the tickrate didn't match the ServerMove() update rate you would just be sending a bulk of movement RPCs in one go which is probs not optimal.
most games use the default character movement which means ServerMove is called at a variable tick rate, every frame for the client
That's interesting, If you ran a UE4 game at 144fps would it be sending packets at that rate then?
I think there is actually a limit that prevents it from sending more than 120 a second
otherwise, yes
Ah ok
I didn't want to use the default character movement as it feels a bit stock imo, I have built a custom movement component based on Quake's movement system however just trying to work out the best way to network it
Is the networked movement in character movement or pawn movement?
Ah
I always hated using it as there's a ton of clunk that I just don't need
So calling ServerMove() RPC on tick is the way to go I guess?
Also does UE4 happen to heap RPCs together into one network update?
So say you do 3 different RPCs per tick would you be sending 3 different packets?
Or 1 packet containing the 3 rpcs
Also just thinking about variable tickrate with movement, How do you stop somebody on their potato PC running the game at like 8 fps having completely janky movement, I get that you can interpolate but at a low rate like that surely it starts to become noticable to other players?
just bear in mind the CMC is 11,000 lines long (14,000 if you include the header), I bet there's a couple thousand lines of stuff for root motion and a few thousand lines relating to navmesh / AI and physics-based movement stuff. the rest is just basic required stuff for a "good", networked, character movement solution. like, several thousand lines. make sure you're up for a long haul if you want to build something comparable
I'd use the default CMC if I could get rid of all the default movement it comes with
But it's so damn bloated
Like I basically don't want any of these
I'm not sure why they don't offer a networked movement component with nothing fancy
supposedly there's something in the works, but don't hold your breath, it'll probably come sometime between 2021 and cyberpunk 2077
Hope so
i'm surprised you would pick those particular settings as "unnecessary" though, a good chunk of those are ... pretty basic for anything short of an airplane simulator
I am after a properly bare metal component with pretty much nothing but the default physics options
like velocity ect
As i'm extending quake pmove for my movement component
well. it's basically a rite of passage for every indie or hobbyist game dev to try to make their own movement component at least once. i know i did 
ha ha
I once tried making an unreal like movement component that could work with box collision
that didnt go very well
I wonder if a viable option would be to just copy the CMC file
and manually strip out all the default modes
seems like a horrible idea
It actually is no joke
you can get away with removing pretty much half of the code in there
Ah, that's surprising
but you need to know which bits are really needed ๐
Yeah that's fair
Perhaps someone has already done it actually
Honestly just looked at the CMC source code, Seems like it would just be easier to design from the ground up
Will just be working around Epic's code otherwise
that is somewhat what they are trying to do but it is going to take them a while
yah fuckit, I'm doing it
long haul it is, Gonna have to design the netcode from ground up
oof
would you be so kind as to make it a public repo? xD
See you sometime between 2021 and cyberpunk 2077
what's so bizarre about a custom movement component
if one doesn't need root motion, jumping, crouching, are-you-on-a-ledge checks
and suppose it's an rts where the "landscape" is much more predictable than in an fps
what if you do need all those but you need it to work with box collision as well though :/
then you're reinventing the cmc obviously
unless you figure out where to perform laser surgery on it
I did try but never finished it
Well. Nothing bizarre about deciding to make a custom movement system if you have a use case that matches barely anything that epics cmc is made for, of course
would you be so kind as to make it a public repo? xD
@royal isle
I'm going to build a "NetworkMovementComponent" that mines sits ontop of
so maybe I will with that part
depends
ue4 is pretty neat once you figure out what to drop
chief among them the cmc if you're not making an fps
too bad
Ya
Problem I see with epic's CMC is that it probs has it's own alternative of "Categorize Position"
you probably know already but someone's made an almost 1:1 port of half life's movement system in ue4
So stuff like Surfing and Ramp Jumping ect will always only ever be available via hacks
Yeah, Project Borealis
yes
It's a bit hacky tho
well they had to match source's
and doesn't include
stuff like Surfing and Ramp Jumping
also what's not hacky
there is no perfect nice clean code
only in the books if they manage to not misprint it
It's not so much about the cleanliness for me as it is having to find workarounds for things all the time
When if I build it from the ground up then I don't need to do that
- Every software developer ever
ha ha
it's true
you are right
It's just I already can foresee annoyances with trying to deal with stuff like surfing
as CMC probs handles everything to do with collision bumping by default
cmc is intertwined w/ ai and physics
therefore it's very ugly, ancient and slow
not to mention the movement comp
probably clears 100% of the instruction cache on any given tick, too
yea eek
why don't you try finding someone to work with on the cmc?
seems like all the fps ppl need it
Because it's half done
I just need the networking part
Honestly I don't mind open sourcing the network part of the component
I already have Quake's movement in UE4 working on my own component
Just tryina figure the best way to get it networked now, It would be fine but I don't fully understand how you deal with UE4's variable tick rate
Nah, I'm gonna extend it
It's just a baseline
But I think Source / Quake has really nice movement
Air strafing, surfing, trimp jumping all that jazz is stuff I need
In this 2017 GDC session, Blizzard's Timothy Ford explains how Overwatch uses the Entity Component System (ECS) architecture to create a rich variety of layered gameplay.
Register for GDC: https://ubm.io/2yWXW38
Join the GDC mailing list: http://www.gdconf.com/subscribe
Fol...
do this
it's probably the hottest shit around
Oooo nice
nice animated infographics too or w/e you call them
Overwatch is actually one of my main researched games for this
I dunno how the hell I missed this vid
Tyvm
sure
also get your ticks under control
I think the sea of thieves devs did an okay talk on it
tick manager or something like that
of course you can (and should) always go full ecs
which is part of what overwatch is doing
That's a good shout
I actually haven't any experience with ECS
Will have to do a bit of research into that first
wrt tick rate, aren't fortnite servers ticking at like 10hz or something?
It's variable
Yeah
If you're looking at Epic's official numbers, the tick rate for Fortnite is a stable 30hz.
It changes based on the state of the game
Pretty sure it goes higher at the start of the match
Unless they changed it
Ah, It looks like they changed it
not sure how variable tick rate on a server works (or would work)
I think it's more to do with the send rate
it's not running any graphics and let's suppose it's a beefy server serving 4 shitty computers: its fps would be much higher than that of its clients if left uncapped
and if they're capping it
then it's a fixed frame rate
so then networking comes in
I guess it has some kind of buffer that stores states
but why would you ever want to have a variable net tick rate?
keep it as low as you can
I still don't understand why anybody thinks client variable tick is a good idea either
Makes everything a pain in the ass, Just another layer of complexity to think about
so don't do it
Wait can u turn off variable tick rate wut?
you can set a fixed time step for the entire engine if you so choose
not sure about the netcode part
The netcode part is what I meant
but there's a custom timestep provider as of late
Ooo
I hope you can turn it off, It's my least favourite part about the engine
I would WAY prefer a fixed network tick
Isn't that for Physics Substep?
wait shit when did they add this
physics substep is a different thing
Can you seperate the gamethread's tick from the framerate with this?
can't tell, haven't used it
Thanks for the heads up, i'm gonna take a look into this
sure
Wait I think this is meant for video editing
I don't think the intended use case is what i'm trying to do
So im having a bug in steam sockets or unreal, if i join a match between my laptop and desktop, this process continues on after i close the match, then when i load the clients back up on both, my matchmaking list shows 9999 ping and when i click join it has travel error
is there a way to fix this
idk if its 100% that
but there is a bug im having where closing the clients after being in a lobby then having them rejoin eachother in new lobby causes travel errors
@chrome bay hey so even after i profile it spits out the .nprof file but doesn't show me anything. when i use the networkprofiler.exe. Am i missing some setup? i have an editor where i ran the netprofile enable and netprofile disable commands
Hey guys!
I have a volume in which characters will be moved a fixed distance per second using SetActorLocation/AddActorWorldOffset. This movement is performed on Tick on both the client and server. Enabling NetShowCorrections it is clear that a lot of network corrections are occuring. Furthermore, setting IgnoreClientMovementErrorChecksAndCorrection to true while inside the volume shows that the character is being translated much quicker along the ground than the client which causes the previously mentioned corrections.
This has been reproduced in a Third-Person Template project with nothing more than a TriggerBox derived blueprint that performs the movement logic on Tick on characters that step inside it.
Unfortunately, using AddForce or similar Physics-based movement is not an option for us in this case. Is there any knowledge of why this difference is happening/how it can be dealt with?
Just a quick note that there's been wonderful stream this week that might help someone, sure clarified things for me: https://www.youtube.com/watch?v=09yWANtKmC8
Creating a networked multiplayer game isn't easy, but Unreal Engine's gameplay framework is designed to set you up for success. On this episode of Inside Unreal, Technical Writer Michael Prinke will cover fundamentals such as the server-client model, various features of replic...
Hello everyone, I've just managed to make my game multiplayer and that's already a huuuge accomplishment for me as a 16yo and now I'm trying to fix some problems, like entering a vehicle. I tried everything and looked up on the internet but I just can't posses pawns in multiplayer.
the character just freezes ( instead of disappearing ) and the camera stays in place. Everything works fine in SP though
Can someone recommend a tutorial on possessing pawns in MP, cuz I couldn't find a single one
@stable kindle The game is actually running as a networked game right? I.e. you're not just playing as a single player in PIE?
But yeah it should be as easy as doing those two commands, and the .exe will open that file.
Hello, everybody!
I have multiplayer, and I want 5 same map, but difference that people from world โ1 cannot meet a guy from another world. Should I use 5 different servers or what should I do?
Another words I don't want more than 50 guys at one world. If it exceeds the limit I'd like to create new world and push other guys there, but textures and buildings are the same. Looking forward for any piece of advice! ๐
@potent cradle I can help to understand with you. And i am not sure i not understand already.
@hollow ivy I'm newbie to this stuff but I would probably do different servers and when you reach the max amount of players just automatically reconnect them to a different one
@hollow ivy you have post login info you can controll max player by that so will refused connection
@hollow ivy About multiplayer? lots of.
@hollow ivy but its easy post login and you can posses controller by player. Controller is player is something very individual. Game mode is more as server. I find cool doc pdf what is very very good. But i have one big problem. I need to understand spectator actor in game mode. That is specific class. The controller not posses that actor on beginning. And i can not do instance on map. You can move to that actor by this code. in c++.
```c++
TestPC->PlayerState->bIsSpectator = false;
TestPC->Possess(OriginalPawn);
TestPC->ChangeState(NAME_Playing);
TestPC->ClientGotoState(NAME_Playing);
But do i miss something and that is can not be change in bp or editor.
I can work with posses and move to other pawn. But spectator actor not create instance on map. Its a frame. How to approach code with that element of frame.
@hollow ivy Yes big one
@orchid harbor Could you clarify further?
@hollow ivy You crate game on mobile to have money for game dev for pc. $$$
@hollow ivy I am not professional but yes that is ok. micro pay and other low quality.
@hollow ivy Server is one co you ask why to hire good coder or peoples. You need a custom server for micro pay
@hollow ivy And its no longer ue4. server staff
I don't need a PC version
@hollow ivy I am very poor knowledge or good .
@hollow ivy But the problem is the server provided by ue is more for fps game session. I do not know its good idea for micro game in mobile
@hollow ivy When you have session max something as 7 day game is ok
I am working on a real Android project. The server must work for years, and need to deal with problem when amount of people exceeds 50.
For phones it would be complicated to hold 200 users and big map, so I am asking for any help. Maybe someone did multiplayer for mobiles? Should we divide the server to pieces, should we make a finit map?
Hello, i am trying to just simulate the physics on the player that's dead but when i do it all of the player have there physics simulated how do i fix? (blueprints)
@tawdry pond please ask in #legacy-physics
What are my steps to create a multiplayer?
Should I care about the AmazonGameLift? Is there a template checklist?
AmazonGameLift is something for servers on demand. When you play a lot of games in a very short time and servers have to be spun up and down all the time.
UE4's network servers aren't made for more than ~100 players and that is also only reachable with the replication graph, like Fortnite uses.
Better code your own backend if it needs to hold for years
What does that mean, "my own backend"?
Sorry I may sound stupid, but I am really Elementary in this
Therefore Fortnite uses the replication graph and can support more than 100 players in a map?
not more
100 is already pretty much it
I am working on a real Android project. The server must work for years, and need to deal with problem when amount of people exceeds 50.
If that is your scope and you don't know what 90% of this means I would suggest hiring someone who knows.
while I agree that 100 is pretty much max players, I think you can safely get over 120 with repgraph
they are doing a lot of good optimizations in the networking area
and it sounds like they are working on a notification-based networking system rather than a 'scan all objects for changes' based networking system
which could bring about more
but generally, yes... if you are asking the question of how many players does UE4 support, odds are you don't know enough to get the engine to do more than 100 players
I'm having an issue connecting to sessions using SteamOnlineSubsystem. I can find a ton of lobbies for other developers' games, I think, but none for mine. I'm getting a bunch of these kinds of errors:
[2020.02.29-22.43.37:379][278]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data gamemode 1 [2020.02.29-22.43.37:379][278]LogOnlineSession: Warning: STEAM: Failed to parse setting from key gamemode value 1
Where the ending of lines ("gamemode", in this example) are replaced with information such as the name of the other developer's game. Some of the names I've seen are hoi4, eu4, and Stellaris, curiously, but most are jibberish. Connecting locally using NULL subsystem works great.
This was working for me a week ago -- I'd find my lobbies and no others. I haven't changed anything so I'm baffled as to what is wrong. Has anyone seen this before?
I have a dedicated Linux server and trying to get it to play at more than 30 tick, but nothing I do seems to do it; what am I missing to get it to that rate?
i'd like to do 60
My connection to a dedicated server is fairly laggy, and I get disconnected every so often. I'm thinking this is because of some dropped packets or maybe a network timeout. Is there a config value I could adjust?
you can try console command log lognet veryverbose
and try figuring out whats going on
i have to warn you, it will be a shitton of logs
If player is on dedicated server and exits back to the menu what should i be destroying?
Right now player character is destroyed and then login screen is loaded on client
will gc handle the rest or should i be deleting anything else specifically
Looks like just setting the NetServerMaxTickRate=60 in Project\Config\DefaultEngine.ini got pulled into the pak file when building the linux project, which is one i had not yet tried apparently
hello guys i want test my game in dedicated server but i don't know how can do this :/
i want buy server for test any body any tips ??
You can host it locally very easily to test
lots of good tutorials on ue4
youtube*
Can anyone recommend a method to keep a widget up in-between level loads? I'm keeping it up using a loop in game instance but this is sloppy and i don't like it
it also flashes briefly between the level loading and the looping adding the widget back into the viewport
anyone know how to replicate launch character? been working on a multiplayer grappling hook and it is such a pain
Mainly whatโs happening is I got the cable to reach the wall but when I try to launch client to cable location it just glitches in place
Well server has authority. You will have to do that on the server
ha! wrote a simple nat punchthrough server which is nothing but I'm proud of it :P
vs remote compiling and debugging on linux is cool
trying to wrap my head around how to send & receive udp packets reliably for when there's a need (which is rare but still)
do I just simply use ids and put the reliable messages into a reliable queue until all their parts are received?
msg id + channel id
msg id for the constituent message chunks (up to 1200 bytes max b/c MTU I guess) and channel id to distinguish between reliable and default udp
(working with FSockets)
@stable kindle The game is actually running as a networked game right? I.e. you're not just playing as a single player in PIE?
@chrome bay yes it is ๐ actually been running two separate instances. But when I hit open file and select it nothing shows on the profile. I get a 300kb file from the server over several Seconds so I'm hoping it's writing something!
Is it possible to force a net update on a component?