#multiplayer
1 messages Β· Page 399 of 1
do you have like experience with EC2 configs?
or any dedicated hosting stuff
cuz i remember you posted a deciated ue4editor.exe line in here earlier just wondering
not really. I've done dedicated server stuff before but only minimal
yeah I was gonna do that until they tried taking money from my card to authorise me π¦
im basically trying to pick the right amazon instance and get it up and running
haha
jtxp got his working
he's not online so i can't ping him yet :X
i don't know how he did it lol.
I don't know. I just run -server on the editor exe for now until I need something more "online"
I know one guy who knows AWS but hes afk atm
i will muck around with the settings. thanks.
no worries. ill probably come to you for help when I need it π
can i deliberately not replicate what an actor is attached to
i have a fps with a viewmodel
its multiplayer
item needs to attach to viewmodel on client in first person, perspective can be switched to third person and unreal's master/slave skeleton system has strange side effects
so far everything works but clients see host's item floating on the camera
not in his hand
attach should not replicate in this case
@twin juniper donβt forget to open the ports in your security settings or nothing will get in
the ded server host has to have that 7777 port open right? so if iuse amazon ec2 i have to go to their udp settings and open that one up?
on their machine?
Yeh
kk thx i will remember to do that
@twin juniper yeah, I'll probably do what you say instead
just use X and Y
thanks a lot
hi, I'm new to UE4. I'm trying to follow a youtube tutorial on multiplayer. I'm using the FPS template project and basically I'm stuck right at the beginning: on the editor, I select 2 players and click the Play button, both players connect but only player 2 can move and see the FPS gun mesh (player 1 mesh disappears). it's like player two is stealing player 1's components and meshes or something. I was wondering what configuration I'm missing here. thanks.
@sick orchid By default, the FPS template makes the arms appear only for the individual player and for nobody else. Since there are no other meshes on the players, you can't see anything.
If you want, try adding a Cube or Cylinder mesh to the player character blueprint so that you can see them running around.
yeah, I saw that only the owner can see the arms and gun meshes, but in my case, player 1 meshes disappear from his own screen. and also player 1 can't move, so that's why I guessed player 2 was "stealing" player 1's components.
There is a livestream on replication you may want to watch from epic
Announce Post: https://forums.unrealengine.com/showthread.php?139935 Ryan Gerleve, Sr Engine Programmer at Epic Games, dropped in to break down and explain ...
Yeah - the reason why it looks like the other guy can't move is because of "Replication", which just means that even though you are moving and the server is aware of it... the server isn't letting everybody else know.
I think thatβs the obe
thanks guys, I'll watch the video
Hey all, is there a reason I can't find the "switch has authority" node in 4.19?
Or can it just not be used inside an actor component?
Curious, anyone know the difference in network efficiency for using these two nodes on a multicast through Gamestate?
Can you not do the entire array in one go?
Can't speak for which is better as I don't know and I don't have a test for that set up
@oblique garden It can't be used inside an actor component, so I made my own ActorComponentMacroLibrary where you can "get owner->has authority"
Or if you don't need to repeat it very often, you can just do that without the macro
@tawny parcel The total packet size should be the same, but it's never a good idea to call a multicast on a forloop
I'd think the loop case would result in overall more data
Yeah, and processing time
@tawny parcel Why are you passing each string independently and not just as an array?
Just send the whole array over
in one go
but tbh...there's no reason why you need to do what you do
in a Multi
Seems more like a job for a RepNotify
Or just a replicated value
Especially so, since it's in GS
@wary willow That depends entirely how often it needs to update, and if it's Join In Progress logic or just a one off
If you want clients to know of the change, just tell them individually
Trying to build a dedicated server, getting an "Failed to produce item" error on WmfMedia.lib when trying to make a x64 package for the game. Source engine was built with VS2017. Any known solution for this other than rebuilding the engine with VS2015?
I don't disagree necessarily, usecases will vary of course.
@mystic field I had to sadly revert to 2015 for unknown reasons...
Engine kept recompiling every time I built the project
But if we looked hard enough, we would probably see the 5 pins vs 1 to be more costly
Hell, I've uninstalled 2015 just some hours ago
VSCode is awesome
If it's ain't broke, don't fix it
Yeah a quick google search shows that others have the same issue and report that building with 2015 resolves it
And supported
Haven't tried out VSCode yet but I have heard good things
It was mostly a hypothetical question just for my knowledge in the future. Im working on my leaderboard and just making sure network traffic isnβt hogged. Aiming fr the 100 person game size so I wanted to verify the most efficient way of replicating it. I believe it is better to send as much as you can in one packet as possible vs sending tiny amounts of updates (within reason ofc).
While at the same time, keeping code clean and simple
@twin juniper ok so how do I make the name tags work. I used the struct but it wouldnt work
hey egg, working on a dedicated server thing rn
k
i will try to be on a little later. i am sure someone else can help you in here. did you watch that multiplayer tut?
the guy made the struct and then went onto main menu so there isnt anything else to watch. If there is a specific episode I have to look at, then link it to me pls
@twin juniper
?
the guy made the struct and then went onto main menu so there isnt anything else to watch. If there is a specific episode I have to look at, then link it to me pls
yeah he starts talking about the player settings struct in about the 9th video, i looked a moment ago but there's a ton of detail in there and im working on a dedicated server right now so i would unfortunately lose productivity if i looked at it right now but someone else can help, all right? i will try to be on a bit later.
its not helping that much
this is what I have. In my lobby gamemode, I use this code to set the index of the struct and then cast to my character and then set the struct var there. https://gyazo.com/562bd48a885b92185562b2d8b649db3a Then in my character bp, I do this code https://gyazo.com/0cf96dbd9c6814be60da0d438dcaf8cb but I still get the same problem. On server side, it shows the names but on client side, it only shows the server's name for all characters
@copper portal What I do in my project is, instead of storing array index I just use an array of PS references themselvesv
Besides, if a player quits and another player rejoins later, then that Player Array will get shuffled around and then your index method you described could break.
Yeah, an array of player states
how can I make that array?
Maybe I'm misunderstanding what you're doing
I want to make nametags with each player's names on them and everybody can see them
The way that I do this is by making an array of Player State object rerferences and then using that array as the list of people who are currently in the lobby or on the given team or what-have-you
You make your own array and then you change the type of the array to PlayerState
A var
in my character bp?
In the place where you need to keep track of that stuff
There's never one single way to do something, programming-wise
So "need" is the wrong word
You can do it however you want
I'm just telling you about how I do a similar thing
Look -- you need to figure out which players are relevant
So you need a way to keep track of that
The way you keep track of it is by making a variable that is an array of PlayerState references
And you fill the array with the ones that you care about
So you can save it for later use
If all you care about using is just the list of all players in the server, then you can just do the GetGameState()->GetPlayerArray() or whatever it's called
@copper portal I think you need to do some more tutorials man
Specifically, I think it'd be good for you to review the "Multiplayer Shooter Demo" that the Unreal developer people put out on the marketplace for free. You can find it in the "Learn" tab of the epic launcher program thing iirc.
all i am wondering is why the name tags only work on server side and on client side, the name tags are only the server's name
Because the Server owns the PlayerState class and so it is in charge of updating everybody's name tags. So it only ever updates it with what the server wants their name tags to be.
If you want to get the actual player's name, you want to do "PlayerState->GetPlayerState()" the function, and not do the get variable thing directly. They changed that in 4.19 so that getting the variable doesn't work properly anymore.
@agile lotus hey you get the indicators fixed up yet?
i'm debugging my games ded server. i got the server open with port 7777, still trying to join from a local machien to test though.
@twin juniper I did using OnRep
nice glad you fixed.
ahhhh π
ill have to write that down incase someone else asks i might actually switch my code to that. cool man. good job.
@worn nymph showed me this
do you have a tut you used? or
just his code not sure if he followed a tut
@agile lotus just in case if you're using 4.19 then you need to change the "Player State -> Name" to "Player State -> Get Player Name()" the function instead of just the normal get variable
4.17 here
Ok sorry nevermind
good to know for future though
thanks jfaw
Is there a way for me to check if I'm in an online session from within a pawn?
that way I can use offline names for offline play
@versed socket I am using 4.19 and it works fine with the var
That's really weird because for me in 4.19 it doesn't work anymore with the var and the patch notes said to use the function instead from now on
@agile lotus you can use is logged in for default session and is player in session using the unique net id if using advanced sessions.
so in game mode, you can use on post login to determine if players are logged in, you can logout to determine if they are logged out. i use onlogout to remove from my player name array
i store it in my game state
you can use something like that when people login and store their player controllers that way
and then you can know if the current player controller is online or not by goign thru the array
i only have a logout check in my game tho
Ok time for a quickie how much C++ Do I need to know to add voice chat to my game?
none
advanced sessions has voice comm
i run that in my playercontroller, works.
well i bind it to a key press
so in that case its easier. yep np
did you get the advanced sessionsplugin yet?
you gotta install that first for it to work, dont forget
Yep already installed
big ty from me had no clue how to get local player number
should It work in my PIE?
Cause I hear nothing
i believe you gotta package it out or use standalone to get the voip thing to work. you also gotta set some code stuff in projectroot/Config
[Voice]
bEnabled=true
[OnlineSubsystem]
bHasVoiceEnabled=true
In DefaultGame.ini
[/Script/Engine.GameSession]
bRequiresPushToTalk=false/true```
@copper portal not sure. sorry.
I think it sets the local name. thats what it said on the forum
@hollow pulsar check the advanced sessions plugin forum page if you are having issues, its the first result on search that comes up for advanced sessions plugin unreal
No I figured out it was using the microphone my ps4 controller xD
I dont know how to switch which audio device ue4 is using tho
how do you guys normally handle weapons getting attached to characters in multiplayer? since the owner needs to have it attached to something that makes sense for first person, but everyone else needs to see it attached to the arm for 3rd person view
is it possible to have a dedicated server but send some data peer to peer? I've seen some commented out stuff in the voice code where peers could send voice directly to each other for minimal latency
are you able to connect to your ded server locally?
cuz i can use some pointers. i am able to connect to it using E:\unreal\src\UnrealEngine-4.19.2-release\Engine\Binaries\Win64\UE4Editor.exe "E:\unreal\game\mygame_SRC 4.19.2\mygame.uproject" -server -game -log but not from my actual vs built Server.exe binary if i use the "open level" node with 127.0.0.1. i am actually considering putting up the entire engine source code into an EC2 instance in addition to my game packaged folder..
of course, connecting to dedi server works just fine
yea i am having issues doing local testing on mine
you gotta use an open level node for the client right?
with 127.0.0.1? i already did the tcp/udp config for the 7777 port as well
I'm not sure if that works, I use a custom node for that because I want to catch invalid urls
before that I used a console command one with 'open [ip]'
and that worked?
if you start your server with -log does it print anything when you try connecting?
so the log comes up,
so here is "ready" for the player
now i am going to run my game binary, and try going to my menu where i have a join dedicated server button
nothing happens when i click the button, and there are no additional lines in the log
once i clicked it
here is my code for my button press
i might have built it wrong in VS?
the server is using a 'SteamNetDriver'
I'm not sure if you can connect to that one manually
if i did something wrong in there let me know pls.
it might require joining through steam
oh
do i have to create a normal session then?
in the case i setup dedicated server? and avoid advanced sess?
no idea, have not used the steam integration before
i can still leave the advanced sess up for when people create listen servers / join listen
thats my menu basically for multiplayer
ill try using a default session
@fringe dove that's theoretically possible but you would either need all of your clients to have a port forwarded for incoming P2P connections, or have the dedicated server act as some sort of nat punch manager
@fleet raven where I saw it (maybe in steam voice code), I think it might have been using the steam id to connect, which handles hole-punching
could be that steam already has that
hmm, it must do something similar for querying available servers too
unless the session api that doesn't actually have to conenct p2p
or at least not in a way that is exposed to UE4
the server probably maintains a connection with steam in that case so it can handle the hole punching for connecting clients
only way to avoid that would be to have steam relay all the packets, which would be inefficient and increase latency
yeah, steam in general sets up hole-punching and falls back to relay only if it fails
I can't find where I saw it in the code in the past anymore, it was definitely voice related
maybe in the netdriver and not the steam plugin
@fleet raven ah yeah, : ```cpp
NetConnection.cpp
2374: // Determine if the server should ignore replication of voice packets that are already handled by a peer connection
2375: //(!Driver->AllowPeerVoice || !Actor->HasPeerConnection(Sender)) &&
commented out but was at least considered at one point
no I'm not wanting it for voice
I had just seen it there
'HasPeerConnection' doesn't seem to actually be a real function =/
bReplicateAsPeer doesn't exist either, but some usages of it were replaced with !bReplicateAsServer, so maybe there are some vestiges
anything useful if you just search for "peer" with va?
bIsPeer, but it seems to not really get used
might have been removed then
(sort of) good news. i got the ded server to connect to the default ipnet driver if i remove the steam subsystem lines from my defaultengine.ini
i think what i will have to do - i might have to make two versions of my project. one will be a dedicated server and one will be default. so for the dedicatred server project, i will set that up to be used eventually in the EC2. for the default one, this is the build i wil upload to steam and stil ahve the default functionality for.
so if i do that, it will work. just an extra step of creating a separate unreal project for the dedicated version @fleet raven
if you can think of any workarounds or anything pls let me know if there's some easier way that you can think of
why not make a steam dedicated server
surely that is a thing
having 2 versions of the project sounds like nonsense
found this in the project launcher - i might be able to cook out two targets, but i dont know how to get the defaultengine.ini file to be different for them. i might have to try that. i'll see if i can figure it out.
ahh i think the way i can do it is by having an "is dedicated server" check in my default server map's level blueprint. then from there i can basically create an advacned session with a custom "dedicated" server name. then i can find advanced sessions when a user tries to connect for that server name. that should work i hope.
brb, testing.
Does anyone know how I can get a certain player who has reached a specific score using this system: https://gyazo.com/6ba22b9f04bb9463cff74382974db98b
the code is in my player state
Not sure what you're asking @copper portal. What about that player are you trying to get ?
I am trying to get a player who has reached a score of 3 for example
Are you trying to announce the winner?
I have an array of player controllers
You can send the player controller to the gameinstance (I believe that's shared) and have a UI visibility binding to gamestates player winner variable and have the widget have a text with a binding of his name etc
wym
Or you can foreachloopwithbreak to scan all players until you find one with a score of 3
Then break it an announce and multicast the UI
what do I do for the break?
part of the forloop
do I check what the score var is set to?
on the playerstate
Once you hit a player with a score of 3, store that reference and break them displayed the reference in the break
Yes
Check the controllers player state and see if its 3
how do I do that
If so, save that reference, break and upon finish if that variable is valid, there's also win er
There is a winner *
You may want to plan all this out first lol
what im doing is getting the array of player controllers and then I dont know what to do from there because I have never done anything like this
I'd say having a repnotify variable for your score, and onrep check if it is equal to 3, if so send that to your gamestates custom variable "player controller winner" which is also repnotify. Once that onrep is called, send everyone the winner and endgame content
That'll handle all the work for you as well as server handling
Just make sure your score is only incriminated by the server or anyone can cheat and win.
Anyone here have suggestions on a self sustaining individual actor based ecosystem?
I created one, but I feel in the long run itll get too laggy with the world covered in actors.. would it be smarter to create my own structure to keep track of foliage instead? For example: randomly spawn a foliage under conditions, and save the location, foliage type, and foliage statistics into a structure inside what file is handled by the world and shared between players?..
And when interacted with, edit its stats in the struct?
My only problem with that method that I see is the foliage index will change if I remove any foliage therefore breaking its reference
The reason I ask in multiplayer is because I have to keep multiplayer in mind when designing this system
Ah better question to sum everything up, is there a way of only streaming actors that are nearby / visible (top down game so visibility is very easily handled) ? Is there a distance factor or something ? And if so, does it keep track of what's going on inside of that actor even when it is not streaming? of not, then It is still useful, but not 100% as useful lol
Possibly having the server handle all actors and clients only relevant to nearby?
I'm reading the documentation now. If anyone has extra input outside of the documentation feel free to share. Sorry for my novel
IsNetRelevantFor
An AActor function desgined to say if an actor is relevant for the viewer
You can override it in cpp or use the exposed variables under replication to control
@sharp spire
Hey there, I got a question. Is it possible to connect to a dedicated server using it's raw IP and port?
It uses Steam and the server is listed on the Steam server list, I can connect via Steam too
But as I found out that calls "open steam.<steamid>" while steamid is the ID of the server
Since I am using Amazon GameLift for matchmaking I only receive a raw IP and port, and when i try to just "open", that just tries to connect, and after a minute times out
by default it's 7777 and you want 27015 open for steam. ip connection should work, that's how it's intended. i'm working on the same issue RN with my ded server testing locally.
make sure your ports are forwarded in your virtual server on your router, and make sure they are open in windows firewall too.
Yea I know these ports, and they're forwarded on AWS aswell. I just can't connect
oh you're testing on EC2 rn?
yep
are you using advanced sessions
I don't think so
[2018.05.31-21.54.18:670][406]LogTemp: Holy shit, I found a match! URL: 18.217.3.169:7777
[2018.05.31-21.54.18:672][406]LogTemp: And here's a session: 76561198069709745, psess-6ea1c959-2154-4617-ae43-e0eb3feb0693
[2018.05.31-21.54.18:672][406]LogGameLiftClientAdapter: Display: Request marked succeeded.
[2018.05.31-21.54.18:673][406]LogNet: Browse: 18.217.3.169//Game/Maps/ShooterEntry?playerid=76561198069709745?playersessionid=psess-6ea1c959-2154-4617-ae43-e0eb3feb0693
[2018.05.31-21.54.18:675][406]LogTemp: Display: ParseSettings for GameNetDriver
[2018.05.31-21.54.18:676][406]LogTemp: Display: ParseSettings for SteamNetDriver_0
[2018.05.31-21.54.18:676][406]LogTemp: Display: ParseSettings for PendingNetDriver
[2018.05.31-21.54.18:677][406]LogInit: WinSock: Socket queue 32768 / 32768
[2018.05.31-21.54.18:679][406]LogInit: WinSock: I am DESKTOP-8HCLLKN (169.254.188.167:0)
[2018.05.31-21.54.18:680][406]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2018.05.31-21.54.18:683][406]LogNet: Game client on port 7777, rate 10000
[2018.05.31-21.55.18:690][706]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.05.31-21.55.18:692][706]LogNet: Warning: Network Failure: PendingNetDriver[ConnectionTimeout]: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2018.05.31-21.55.18:698][706]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.02, Real: 60.00, Good: 60.00, DriverTime: 60.02, Threshold: 60.00, [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID'
[2018.05.31-21.55.18:699][706]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 18.217.3.169:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL,
That's my log, you can see after the "Game client on port 7777" it waits exactly a minute, then times out
are your logs all looking good for the dedicated server when you launch the binary on aws?
no yellow / red errors?
yea they're fine
But when I try to connect this way, the server doesn't even notice it (no logs when I try to connect)
Yes I get that one directly from a callback from GameLift, and I compared it multiple times, it's the correct IP
I tried to connect to a local server too yesterday with open, even that didn't work
when you did your local test
did you see your game
in the steam server browser under LAN / internet?
No since it can't initialize Steam when I run the server locally, "this could be due to steam client/server running on the same machine"
But I see my AWS game in the server list
here's what i mean
if you try to do a local test with your code
you should be getting that to show that steam is picking up your server on there
yea
so then the problem lies in your join code somewhere
for sure
its not with your steam init code or create session code.
look into your join code and make sure gamelift syntax is right
We had the regular steam server stuff working for ages so for sure that's not the problem
i havent used gamelift unfortunately, just join session from find session advanced.
ic
did you change the code or something? maybe some guy went into the source control and did some kinda commit or something?
FString Command = FString::Printf(TEXT("open %s?playerid=%s?playersessionid=%s"), *URL, *PlayerID, *PlayerSessionID);
GWorld->Exec(GetWorld(), *Command);
That's the code
may i actually ask you a question about aws because im thinking of getting an EC2 now that i have you here.. does your aws instance lag at all? are you guys using t2.medium?
apart from that pretty stumped. you will have to hope someone can forward their thoughts to you on here.
if you were using advanced sessions you could try something like this. i dont use CPP to connect to mine though :
We are currently using a c4.large instance which is the free tier, and I'm incredibly suprised by the performance. We could run at least two dedicated server processes in parallel on the instance, and it's currently in us-west and I'm in Germany, and I couldn't notice any lag at all
nice
Thanks for the tip, so another option would probably be to iterate through all sessions and look for the one which has my IP and Port I search for π€
Or to somehow ping the server about his steam ID
What is it?
just a thought - if you can convert the raw IP to a steam id
you might be abvle to use steam join instead
since you know that works
there might be a way to get that ID from the server, i'm sure.
i gotta π΄ good luck to you i'm sure you'll fix it. keep at it!
Yea that's my thought, convert IP to steam ID, I'll hang in there, gnight!
@twin kite @twin juniper The USteamNetDriver class doesn't support direct IP connections. It's not as easy as "converting IP to SteamID". I can tell you that for sure because I spent a month creating a NetDriver class that allows both IP and SteamID connections and multiple clients on the same machine. To date, it was the most complicated part of my plugin.
(P.S. Just noticed and replied to the thread related to the same question a minute ago.)
Ha lol
But it seems like I found a way
You can use the Steam SDK to ping the server, and get a gameserveritem_t back, which contains the steam ID
And then connect using "open steam.<steamid>"
Yea, that sounds right, but it won't be possible with listen servers and you were asking for direct IP connections. This would still use Steam's networking library (this is actually preferred, because it has NAT traversal techniques on top of it).
Ah then you misunderstood me, I meant connecting to dedicated servers via the open command, and I tried it, it works
for dedicated servers i just killed off the steam p2p stuff
if you look at dev-networking, i think i saw something which will allow you to easily switch between them
that branch also has the important thing of having steam auth
@thin stratus thank you, so using the IsNetRelevantFor will still keep actors running on the server and only on relevant clients ?
Correct
Hi, anyone with experience in MP replication? i am having a weird issue with a MP project i am working, i have a base bp and i create another i called socket bp that have some properties and i can attach objects there and i add some of the socket bp to the base BP, i have all the socket parented to the base, but the problem is that i there are some small sockets that are not attached or parented in the base from the client side, so when i play as the server everything works fine, but if i play from the client the small pieces stay in the starting position
anyone had this kind of issues? if you have any suggestion or tip to test would be really helpfull. i dont know what else to test for this, all the sockets are instances of the same bp, the only difference is the size of the static mesh
Is your base actor marked as replicated?
How do you attach the other sockets?
Code? ChildActorComponent?
Are they marked as replicated and replicate movement?
Are the ChildActorComponents (if used) marked to replicate?
first i just had parented in the world outliner and it work in the server side, in fact work in the client side for the larger objects, and the sockets are replicating and replicating movement
first i tried adding as childactorcomponents but that didnt work, so for now i add it as actors in the scene and parent to the base actor
same socket bp work in large objects bot not in small objects in the client side, from the server side it work fine
i am working everything in bp
Hey guys, why can't my friend see my game ;-;
steam?
What are you using?
but i have the steam api enabled
AppID?
literally just sent him the packaged game
like, the folder that you get once you package it
did you put the appid in build?
appid?
steam_appid txt
i have this in the default engine txt
:
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
For GameInstance, when is the client game instance initated? When the .exe launches or after it connects to the server?
@tawny parcel When .exe launches
Thanks, thought so
First map load
Prior to I believe
And, it doesn't exist on the server
Remember that
Yeap
so wait
is there anything else i need to have online multiplayer apart from the steam api and then having a way of creating/joining sessions?
Well the SteamAPI is something more technical for C++ to be able to access all features of Steam
For online multiplayer you would "only" need the Ini settings, the enabled plugin and Creating/FInding/Joining session nodes
That is for ListenServer solutions
Most of what you already posted
This is the first step in a series of guides that will show you how to enable the OnlineSubsystemSteam module for your project. It does not cover session creation, session management, app id association, or anything specific to OnlineSubsystemSteam. These steps are the first ...
You can read up on that here
oh, that
Might be a tiny bit out of date if unlucky
alright, in that case i should have everything
Probably yes
Just be aware that 480 app ID can be annoying
Cause everyone uses that
Not without having your own
ah, alright
Increase the num of results
and maybe choose a download region that is a bit less known?
Idk, it's often that people can find sessions with 480
how do you mean that?
cause you get thousands of session results of other games that are filtered
And your list stays empty cause your friends session wasn't part of it
The FindSession node
has a Result Integer
Increase that
that might help
is there a specific way that i have to send it to him?
because what i'm doing now is just sending him the built folder
max results on find session are at 9999
BP's look like this
Na, that's okay I think
alright, thanks
I want to replicate the ActorComponents that get spawned by their Parent. I tried this and the Client loses his Connection whenever ActorComponents get's spawned. Can anyone help me pls?
my matchmaking program failed again
it's this but with a listen option on the level open function
do I need additional code regarding the multiplayer elements in the gamemode or player controller?
I'm having trouble with my hit detection using line traces when my game is running as a dedicated server. It feels that the physics asset for the skeletal mesh is in a slightly wrong position. My current thought is that the locomotion animations is not being ran on the dedicated server, so the physics asset for the skeletal mesh is staying in the standard pose position (rather than moving slightly in the character's idle animation). This isn't a problem when running as a listen server. Does anyone have any idea how I might go about fixing/debugging this? thanks!
Ok - ended up solving the issue only ten minutes after posting it here, hah. Out of interest the issue was, for the mesh component I had to change the Mesh Component Update Flag from "Always Tick Pose" to "Always Tick Post and Refresh Bones"
@thin stratus is gamesparks free?
@burnt meteor https://www.gamesparks.com/pricing/
is gamesparks like amazon e3
gamesparks was recently acquired by amazon, i would expect that its features will eventually be rolled into AWS
but right now it's a standalone product
ok
the issue appears to be that my "find games" function isn't finding any games when I was testing with my friend
could there be any reason for this?
Question for the multiplayer squad, an online subsystem takes advantage of leaderboards and such that the subsystem encompasses correct? Long story short it does not have to do with hosting/finding sessions? I'm having issues with hosting or discovering sessions on android ONLY with Google Play Services enabled
My online subsystem is set to null, is that the reason why?
a null subsystem will only work on LAN
so if it is null, then yeah, you won't find anything
unless you are over lan
But I cannot host either
Looking at learning the UE4 Client to Server multiplayer anyone know of good source documentation or tutorials?
@prime gorge pinned msgs
ty
Can someone tell me why this code wont get the player name of a person who has a specific score? https://gyazo.com/af7ca0ed39b036ebfdac039973b9d6dd
Could you post the same picture using the windows snipping tool?
the image compression isn't helping at all
same
the image isn't clear enough XD
is score to win a value setted on every player state
is it constant?
yeah
the score to win shouldn't be part of each playerstate, it should be part of the gamemode/gamestate instead
you could try printing the values
to see if they are correct in the context you need em
also, where is this rpc located?
in my game mode
so where should I put the event?
the event shouldn't be a rpc, first of. Where are you calling this event
so in your player state you are calling this event on the server
so take it like this
you can only rpc things
if you have a client as the owner
in the case of the gamemode
it only exists on the server
so you can have your rpc on the controller for instance calling that event on the server
Left: player controller
Right: gamestate
the top node in the left won't work
because it is calling the rpc on the server
the bot node in the left will work because the rpc is on the controller, which has a client as a owner
and as you can see the function that is calling thjat rpc is not replicated
so knowing this
now you should consider where to place your rpc
engage yourself doing networking, read cedric_eXi#4538 conpendium
but the most important is: knowing the theory, try yourself
I dont understand tho
You need to understand that the gamestate or the gamemode
already reside on the server
so you cannot rpc there, because a rpc needs a client as the owner
there is a pinned compendium to see where each UE4 element is located so you'll understand which rpc makes sense and which don't
what I dont under stand is where I should place my events then
it is fine to have it on the gamemode tho, since it is a gamemode thing (I believe)
the only thing I'm pointing out here, is that the rpc shouldn't be made on the gamemode itself
another objection I had with your code was the ScoreToWin variable
From my point of view it should be a gamemode variable
don't make it a rpc, now you know that
a normal event
so no replication?
no rpc's on the gamemode
what does rpc stand for because I might be getting confused
the rpc (if needed) should be somewhere else
remote procedure call
If you read the compendium I posted before
you will understand this all much better
well you are reading me
all i am asking is what I should do now because I dont understand where all these things should be placed and stuff like that
He posted you my compendium
If you need to solve an issue that you can't solve cause of missing knowledge, then read up on it
π confusion π
I already took the time writing these pages
Now please take the time reading it and come back if you still have questions
I'm always willing to help, only if the other side cooperates
im trying to god damn it
Your question is usually answered by reading the pages of my compendium which explain each class
Plus the overview of what exists where (server vs clients)
ayee, that's core.
I will read it after I fix my problem. I want to fix my problem first
As far as I understood, your problem came up cause you don't know where to place the events
@thin stratus im struggling ._.
I could tell you, place the rpc on the playerstate and be done with it, but class interaction in networking is much more than that. Also you'll learn when to replicate a variable and when to not.
can someone explain creating sessions and how i can get others to join over WLAN on an android device?
i assume its not port forwarding, so it is not online for others to see
lan works fine
no offense, but youre being very rude about free advice. nobody in here is obligated to respond. keep that in mind.
@copper portal
use printstrings to know what is happening and see if your values are setted correctly on the server
complement this debugging using cedric exi compendium, replicating a variable is not enough to make it update on the server every time you increase it
It makes sense if you learn it and try to understand it.
Multiplayer isn't learned in a short Discord chat session.
You'll take a few days/weeks till you fully get the concept.
So read the Compendium I wrote and start playing around with the new knowledge then.
@sharp spire WLAN and LAN is the same.
It's both your local network
Nothing internet related.
Also probably SubsystemNULL as you use an Android System with Windows
anyone know some good examples to look at for custom movement components, in regards to networking
Oh haha fail. Idk why I assumed that was the case. Lack of knowledge. So @thin stratus you dont need to have any mechanics setup to allow connections between android devices over non-lan play?
@sharp spire You need a Subsystem for Android that has Session Support
Or join via IP which needs port forwarding
Hello, I am trying to network my sprinting inside my game but the 1 issue I am running into is when I pass CharacterMovement from the client to the server, it says Accessed none. I am not sure what I am doing wrong. Does anyone have any suggestions?
When I tried that, the client gets stuck in the running animation, and the new speed is never applied to the client. (Server works fine)
The variable isnt replicated
You need to set it on everyone
Best way is to use a RepNotify float
Letting the server set it to the new value
And then setting the component speed with that variable in the OnRep function
That didn't work for me but this is what I have after those changes. I wasn't sure what you meant by setting the speed in the OnRep function so I could have made a mistake but I tried assigning MaxWalkSpeed after I assigned the RepNotify variable
If you mark a variable RepNotify, it creates you a function
Check your functions on the left
Usually named OnRep_VariableName
It executes on everyone when they receive the replicated variable valur
Even people who come in late
Or join later will get this event/function
In there you should set the maxwalk speed
@low obsidian
Thanks for the clarification. I applied what you said but unfortunately it didn't work.
my replication suddenly stopped working, i havent changed anything in my blueprints, last time i was testing, everything was fine, but now for client everything is delayed and some things dont work at all
and my minimap thing doesnt work too
oh lol it got fixed
mhmm
i just removed the multicast thing from event tick
but minimap still doesnt work
aand i fixed it too
nvm then
@twin juniper Multicast on tick is fine but don't mark it reliable
i didnt
It sounds like it though. Cause that would stop most of the other rpcs from calling
but when i deleted it because i was like "maybe it just overloads the net" and everything became smooth and instant
Hm. Okay
it was 2 array variables
Ah too much data could also cause it, yeah
Vector3d and Character (both of them had 2 elements because 2 players)
xd
and it turns out that i dont need it, everything is still replicated... im not that good at networking i guess
Hello I need some help with a steam dedicated server showing up within the internet tab of the steam server browser. Currently the server shows up within the LAN tab using adv sessions to create the session. I forwarded ports 7777 and 27015 on my hub firewall I also allowed these connections on my inbound tab both tcp/udp. Now firstly, is there any other ports that I should be forwarding? I heard 7778 is one but I honestly don't know. It would be great if someone could help me in this situation. I have a feeling its my hub that's causing the problem.
iirc there is a steam limitation where a server that is running on the same machine you're connecting from will show only and only on LAN list
So I need a separate account for the server? And another account acting as the client to search for the server?
dedicated servers can run without a steam client running on the machine
they just can't use the client interface then
Right okay.
i do not know how to set that up tho
I try it in a bit. Thanks for help.
@winged badger You were right. If I view the server list on another machine it appears in the internet tab. Everything is working fine. Thanks!
why when i create widget in multiplayer, it makes 2?
2 for each player
Where did you create the widget?
in character
What is the widget for a server browser? or a hud? etc.
its for hud
i add it on beginplay in character bp
I'm having issues using SetMaterial on a server event. Does this not work on server? Cant figure it out.
Sometimes, probably when there were too many reliable multicasts, a client compeletly stops sending network info, he doesnt move on the server for example, how do I detect a disconnect like that? And whats the best way to prevent it (other than using as little reliable/multicast functions as possible)
Thanks for your reply @ruby meteor, I'll take a couple screenshots and maybe you can see where I'm going wrong.
@icy nacelle Im sorry it was a different question, not an answer ^^, I dont know why your node does not work, what do you want it to do? screenshots always help ofc
Here's where I run on the server, pulling in variables from 'ItemBeingBuilt'
Here's the function thats running on server, that prints out the CORRECT material that I'm trying to use, but the material is the default one from that class.
Oh, apologies man. I thought you were answering me π
Im trying to figure out why my movement is only working on the server. If i run dedicated, no one can move. If its not dedicated, only the host can move. I assume Im only running the movement on the server and its not being replicated to clients? but i look at other example projects like shooterGame and i dont see them doing anything in particular
also looked at UT's character and controller source and im confused because they seem to do nothing for networking movement. I assume its all handled in character movement component
yeah I derived from character component to make my own custom movement modes
how are the inputs being put in
but i still use the normal PhysWalking
standard way?
inputs are done in controller, calls a function on character
and you haven't missed a Super call anywhere in the custom movement component (just eliminating stuff)
I'll make sure
oh wait yeah maybe you're right, I didnt super my AddInputVector
that could be it
yeah I did
ok im gonna try that
hmm, no. that didnt help. I'll keep looking through my movement component to make sure its calling all the base code
Im not seeing anything that stands out in particular π¦
just check see if replicate movement is ticked
I did the other day, but I'll do it again
oh right then you may need to debug it, find out what is getting called and why it isn't going to the server
do they move locally
or is there nothing?
well if i run dedicated server checked, nothing moves. i can move the camera with mouse and pawn moves with camera, but nothing else moves
if i run with a peer to peer setup, the host can move around like normal
other person cant
its weird how they can't move locally, sounds like they are sending a request to the server which doesn't get fulfilled, the client should move regardless
hm
is there a server log or something to print to
oh yeah i just remembered something
well wait, let me do some prints first.
ok for some reason my character is null
well, my reference to my character is at least
I keep a reference to my character in my controller so I dont have a to cast all the time, and I set it in the Possess function
I assumed that would be fine, because you can only possess a character if it exists correct?
fuck me, that was the issue. how embarassing
I still dont understand why possess function didnt set my character π
but i use GAS
gameplay abilities
built into UE4 but hardly any documentation
its what they used for paragon/fortnite
ah
i thought that was a plugin, interesting.
yeah my custom movement is all kinds of broken, but at least I know the built in movement is working now. Thanks for being my rubber duck lol.
np π
Any ideas as to why the material wont change when run on server? The material that is printed out in the second screenshot is correct.
does it change on the server?
cause you might need to replicate that change to the clients
Nope, it stays the default material from the actor thats spawned
Ah, I need to pass the infomation back down the server to all clients? Like a multicast?
i think you have to create a instance
a material instance?
Ah
I cant be doing this, as the blend type is different for the original material
I am actually using this on the original material though π
don't you just pass in the instance
i assume thats what you mean, you have an instance of that material
Yeah
So I'm passing an instance material to set the material on the mesh thats spawned
Its an actual asset
Correct
it works for me, if i don't multicast the material change, the change only happened on the server
that's without the multicast
ah...
I'm changing the mesh before setting it
and I need to input the new mesh
I think thats what the problem is.
Ah no, that didnt get it.
anyone else get this bug in 4.19.2 when trying to join a steam online subsystem dedicated server using exec console command "open x.x.x.x:7777" https://github.com/EpicGames/UnrealEngine/pull/4673 concerning steamclient64.dll entry point not found errors . they say 4.20 fixes it. am waiting around, and finishing up my singleplayer campaign until it's fixed. until then i only have listen server functionality. :x i get the errors in when trying to connect to the ded server from a binary packaged for shipping build, and i look in packaged folder\WindowsNoEditor\Game\Saved\Logs and receive this (i tried moving steamclient64.dll to the ThirdParty folder from my source build, still didn't recognize the dll file) :
LogOnline: Display: STEAM: Loading Steam SDK 1.39
LogWindows: Failed to load '../../../Engine/Binaries/ThirdParty/Steamworks/Steamv139/Win64/steamclient64.dll' (GetLastError=126)```
Do you have steam installed? Not sure if that's related as its failing to find a file inside of your Engine folder but who knows
My comment is probably irrelevant. @thin stratus I'll try looking into port forwarding again and subsystems
yeah, steam is installed.
i am strongly considering removing the steam lines from this code in my defaultengine.ini file [/Script/Engine.GameEngine] +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver") [OnlineSubsystem] DefaultPlatformService=Steam bHasVoiceEnabled=true [Voice] bEnabled=true [OnlineSubsystemSteam] bEnabled=true SteamDevAppId=480 [/Script/OnlineSubsystemSteam.SteamNetDriver] NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection
to leave the net driver to ipnetdriver instead of steam net driver. if i use the default net driver, i can still play my game dedicated, i just cant have interoperability with steam (for now) until they fix it. so i can't do things like adding steam friends in game, checking steam messages, or any steam achievements for now.
so that way, i can package out, up load to my ec2 t2.medium instance and it should run fine. my friend jtxp was giving me a lot of helpful advice on setting it up so props to him. π
it's either - do this, or go back to singleplayer development until 4.20 is rolled out as a major release (i like waiting for release branches in the git so it's bug tested fully). i figure, heck, if i can just change the ini lines, i can still keep my dedicated server functionality. i can change the defaultengine.ini lines back to the old way once the steamclient64.dll error is fixed in 4.20. all i need is a backup of my .ini file just to make sure i have the lines exactly right.
Hello !
I recently build a linux dedicated server, and I got this error when a player log in :
LogNet: UNetDriver::TickDispatch: Very long time between ticks. DeltaTime: 29.91, Realtime: 29.91. IpNetDriver_0
I would like to diagnostic what going wrong
when a player log in, also I don't use the native Unreal Network
I use SpatialOS
so since I don't use Net Driver, this mean something overload the machine
and sadly I don't know a tool to diagnostic a remote server (which is used as worker in this case)
Again this is not an Error, its telling you that time between frames took to long to occur and that replication is probably being affected. If you see this often you need to optimize your code to reduce times on the Game Thread.
If your not using UE4 replication then you can probably safely ignore this.
Although i would still investigate why your frame time is so long.
actually this is an error for me since it generate some timeout
but yeah I'm agree it's a warning π
Doing an simple Google search mentions problems with HMDs causing this to occur because the Render thread and the Game thread run in lockstep, since an HMD usually causes the Engine to run at an fixed frame rate, this can cause issues when one lags behind the other.
Are you using an HMD?
no I didn't
and I found this topic yup
I use 4.18.2 I don't think it's a know issue
Its not an bug, please read what im telling you.
Sorry It was confusing, just to say my Unreal version, and ask if it's a know issue with this version or not but I don't think so.
It wasn't related to your message π
question: if I use FloatingPawnMovement primarily, how could I get client-pawns velocity on server?
The pawn should still have an Velocity
Just an simple GetVelocity on the pawn in question will work?
no, every GetVelocity returned 0 on server
oh well, none of this is replicating anyway
guess I gotta build something to make it work
oof, so turns out floating movement doesn't accept any input unless local controller is present
So, the question is how do you get inputs without a locla controller
Inputs shouldn't be replicated - the local controller feeds input to the component which then replicates movement
Local controller has authority, sends stuff to the server, server works with that, replicates back to other clients
If it's AI then it all happens on the server
That's the basic workflow
I rpc the input-vec3 from client to server, tell server to use that vec3 to floating pawn movement
it ignores it
doesn't make sense
the local controller wont always have authority, so you use has auth to test it in case the exec flow is coming from a client machine.
and if its remote, you can exec on server for movement.
I need server to move the pawn first, then ill figure out the kinks to make it actually usable in real world application
@slim holly This is about multiplayer architecture. Your client can't wait for the server to acknowledge input.
I know, not important in this context
problem here is, why is server ignoring the data client sent
If you want to do that then you can drop the movement component out entirely because you're breaking all assumptions
Replicated movement components are built on the assumption that the client has authority, simulates locally + tells the server
Then rollback + replay on rep
If you don't care about that, just use your own component
Or inherit the class and override it
The reason it doesn't work like you want it to is that it's explicitly built to not do it because it sucks
I'm aware it sucks and not intended workflow
if you set replicates / replicates movement to true on the component and you move it locally, it will replicate the position..
you wont even need to exec anything on server in that case.
but you're saying floating pawn movement input function is scripted not to accept any Vec3 inputs unless the component is in locally controlled pawn?
@twin juniper No, replication is only server to client.
if you spawn it in under a server RPC, and set replicates movement / replicates to true, it should replicate without a exec on server RPC.
@slim holly That's what you are saying π€· I'm just saying it would make sense because the local controller is always the one feeding inputs
@twin juniper In that case yes, but quality will still be abysmal
thats how i did my powerups. anyways ill let you guiys talk. gotta go do texuering.
probably.
I' m not concerned is it "right way to do it" or does it make sense, this is purely engine functional question
and my graph currently is only getting controller input from keyboard, and puts it to variable
@slim holly I think you're overthinking it. If you want a simple flying behaviour and no real networking, just implement it yourself on a server RPC
can i just briefly state there's a really good MP plugin for 6dof movement as well.
just fyi.
I don't believe the flying pawn movement has any real networking built in either, short of replicating location
i use it. in my 6dof game, that i made. and it has prediction and latency compensation. build into the plugin.
no floating pawn movement has no smoothing programmed on it
but if you replicate movement
you will see it on every single client
and yeah, I work hand in hand with mookie he is a great engineer, for sure
@slim holly doesn't care about it looking decent
thing is, movement replication is server authed, but floating pawn is client authed
so I would have to send the actual actor location to server
which is bad
Proper movement replication is client-simulated, server-auth, with rollback & replay
That's basically the only way
the simulated proxies have to do part of the work
also if you want to add prediction based on player input
you need to let the server know
but the player
the local controller is the first input you get
I was hoping to make client auth-server simulated version
you can use _validate to decide wether or not to process certain movements
where server takes over if simulations is outside margins
The entire role of the movement component is to take inputs from the controller on the client, simulate it locally, tell the server the inputs, have the server simulate it too, tell the replicated pawns, and replicate back to the cloent for rollback if needed
That's what your production code will look like
perfect explanation.
yea, this is currently failing because server is ignoring the input
No
You never tell inputs on the server
The movement component tells the server
You need to subclass it and implement that
It's not another class's responsibility
The floating movement thing doesn't do shit
You need to implement this yourself
There's a great tutorial on that on Udemy btw - UE4 multiplayer or something
yes, Udemy one is defo great
there are a lot of approaches to acomplish the same objective
but I consider the one given in that course a pretty good one
Yeah, every game will have a different variation. Shooters will put more trust on clients, for example
yeah and methods of doing it basically
for example, net update method
onrep method for movement
that last one would be the BP method
but yeah, two different problems to solve
Krazy Karts - State Synchronisation And Interpolation
that part
^
will look at it. havent seen taht tut yet. i do all my stuff in BPs π¦
im not CPP savvy yet really
i use only code plugins for my game
but i wana add it soon.
Though KrazyKarts misses a crucial step for production-quality if you're using a listen server - server smoothing of client inputs.
But that's fairly easy
Stranger - can i ask. have you used any dedicated server stuff before?
i am trying out this whole idea. and my first jump was aws ec2 t2.medium.
i literally got an instance spun up earlier today and tried to launch my server binary, needed more ram so i am asking customer support
I had dedicated servers on a project once, but that was UDK days. I stay away from dedicated servers now, not scalable for indies, too annoying to work with, and I'm not going to have a game with many players in the first place.
ah ok
(Well, not going to have competitive gameplay, really)
i am planning on spending roughly $40 a month on the server or so
it has 4 gb and i think a fair amount of bandwidth
in ram* that is
it was either that or listen servers
and i kept worrying . gosh what if some guy keeps getting lag
plus
i found that when i host my own listen server , which usually ends up being the case cuz mygame haasn't hit that critical mass yet
i experience some lag in the game
since im the listen server host. and i actually noticed a fair amount of lag when i was the listen server client
you mentioned quality is abysmal at some points if the code is bad - i might need to look at my bp netcode
and optimize it to make it all use the least amount of data i think
Stranger, do you know of any good other multiplayer tuts that are BP based other than the unreal engine multiplayer tutoiral wes bunn did?
Listen server is great for 3-5 players with non-competitive gameplay, dedicated server is required for anything bigger than that
ok
As to my comment about quality, it's about replay + rollback etc, which is implemented in UE4 only for the character class
Anything non ACharacter, you need to implement it yourself
Typically, I test my replication code with 150 lag +-50 and some packet loss
Obviously lag will be noticeable (especially for shooting people), but the movement itself should be fine
Simply checking the "replicates movement" box will not achieve that
@twin juniper i run my dedicated servers on ec2 free tier with only 1gb ram you probably selected the wrong type of instance
Couple of testers and I laughing until we almost piss ourselves. Come help test the game and be involved in development! https://discord.gg/26JMUGr
sorry, I can't seem to get multiplayer to work
is there anything I need to put in the gamemode or player controller, or anywhere except for the game instance to join or create a server?
because right now, when my friend creates a server with my exported game, and I try finding games, his doesn't appear (apparently)
this is the game instance code btw
and when I start on the start screen and click find game, I don't end up with another player even when using the local multiple player setting on the play button
Hello, can anyone help me about Cast to a player and define/edit variable from another blueprint by not affect with another player?
the problem here is when I do increase or edit some variables cast from actor blueprint there will be edit/define whole of the player character in the game.
make that variable public so its instanced
or store the var in playerstate
so its per player
Thank YOU SO MUCHHHH
@worn nymph yes - i tried this with t2.micro instances, turns out there is a limit on the instance type for new aws users. the problem for me is is, my dedicated server for UE needs 4 GB of ram, as i tested it locallky and thats the amount of ram it needs when it starts up. so the t2.medium one is the one i need at least. if there are any other options for dedicated hosting that are fairly good and cost optimized i will be looking into those as well.
@twin juniper In the "Find Sessions" node -- the white line is coming from the wrong thing. You need to make it go from "On Success". That's the reason why you can't find any results.
The way you have it setup now is so that it will instantly go to the next thing, but that array hasn't been filled up yet. When it gets filled up, it will trigger the On Success white line, which is where you want to be doing all of that stuff.
Is there any documentation how the steam party system works with UE4?
any idea why this immediately fails? I migrated my project over, sessions work fine in my other project but this one goes to On Failure immediately
I forgot to add the code to the engine ini file, problem solved
can I ask a quick question? I have a blocking volume and I just want to remove it (setting collision off) only on owning clients when they pass a certain test - but whenever the server does it, it seems to have a dual nature on other clients, where the client gets blocked but then it passes through on the server's version and then the client clips through eventually
you could put the blocking volume in separate custom collision channel, then set your PlayerPawn responses to it to Ignore after they passed the test
(it will not work well if you have many blocking volumes like that, in that scenario you would have to attach trigger volumes around it that will alter the Pawn's collision channel responses off and back on)
@severe nymph cool
https://youtu.be/9N8UKmrMOj8 tonightβs play test
Second Multiplayer Playtest. This time pre alpha build of new neighborhood map. Come help test the game and be involved in Dev. https://discord.gg/26JMUGr
Destructible mesh in Multiplayer?
doable, but you can't replicate it accurately
- the trouble of replicating it for late joiners
@umbral adder depends on what you want to do, if it's just a one-shot destructible mesh and debris are purely cosmetic, then you don't even need replication (like Overwatch)
I never tried but I don't think the debris go at the same place on all machines
they don't even care about this
since debris dont block skills
for instance a fence, when it's alive, is blocking the skills
but once it's dead, the debris dont block skills
if you want destructible to behave like any other damageable actor -> they take damage and then they die and if you don't care about debris afterwards, it's just a regular actor to handle on the network
but as ctzn mentionned, if someone disconnects and reconnects, he'll have to know about the destructible mesh being destroyed
not the destructible mesh itself
the actor
Just a quick question: I'm making an 'arrest' system, where a player must go to jail for a certain amount of time. Should I handle this time with a event timer or a timeline???
(I've heard that event timers can be abused on a multiplayer game, still not sure)
Well, no matter what you do it needs to be on the server
Simple timer on the server will do
Okay, so I run an event on the server for the one player? Should I run this through a seperate actor or actually using the character/controller?
Depends on your game. For example if the user can join-in-progress, you might anticipate the player leaving and reconnecting
If that's not the case then yeah, simple timer on the player controller on server
Yeah, I'd like it if the player left the game, they'd come back and still have to server the sentence.
Is that also persistent across games ?
Yep
In that case it's not a timer anymore
It's more like a database of jailed players in save
Doing a MMO or something ?
Slightly yes π
This is why I wanted to ask about how to do it, I'm not 100% sure on the right way of handling this
Well at this point you're not in UE4 territory really, it's up to how you store player progression
Probably have a "jailed until date X" field in your player database entry
Then every few seconds or so on your server, look if the current date is past the jailed date, free the player, reset the date
so um, I'm doing a quick and dirty playername so I can identify these boxes from eachother
but GetPlayerControllerID seems to only work for host
but all the controllers to my knowledge should be present on host, yes?
Thanks @bitter oriole
or is this like a split screen thing only
Anything I should be looking to research to help me along with this?
@icy nacelle it sounds like you only want the time to go by while they are in game. you could setup a JailTime float or int, on tick if jailtime > 0 then they're still in jail. Maybe a bool as well that allows the tick to proceed if inJail. And if the timer <=0 and the players coordinates are still in jail, release them
I didnt read your whole thread, just the last post or two
I appreciate the help on the logic @sharp spire but I'm well aware of this. What I'm trying to figure out is how to handle a server database for this
Are you using built in sav games or a custom database? Technically it's the same process either way
Just creating those two variables in the database and having them scripted through your jail code. Sorry if I'm stillconfused, but I dont see why a database would change the concept
When my friend joins my multiplayer game (using steam dev id) it crashes for him but it worked the first time but hasnt worked since
any ideas?
anyone using AdvancedSessions seeing an issue where the "CurrentPlayers" always returns 1?
BP i am using to access it:
Anyone ever have a crash after ServerTravel twice to the same map?
Hi, I am trying to replicate players switching weapons but I am not sure the best way about doing this in multiplayer. On the server should I calculate the previous weapon, replicate the equipped weapon and cancel the ads, THEN multicast the swapping animation and the equipping of the weapon?
@thin stratus really appreciate the info, thanks ππ»
Is there a way to make this not jittery on clients? It's the way I do parrallax backgrounds in my 2D project
Why wouldnt you just let clients manage the location themselves?
I tried that and it was still jittery
Why are you doing an Interp with no speed?
Was playing with the settings
recent screenshot = recent settings
If I dont have anything replicated in this actor its still jittery
normally I don't interp at all
and it works great in local
and on the server
This is not something you should be replicating at all. The Background is cosmetic, the clients should be simulating it completely locally.
This is how it looked before someone told me to try replicating it
Thanks I'll give it a shot
It worked no more jitter! I just have to mess with the interp speed to get it how it was before vinterp thanks @fossil spoke
No worries
@twin juniper On Server it should
Anyone know why a ListenServer would print: Warning: Server failed post-challenge connection from <UniqueNetId> even though the Client connecets properly a few ms later?
[16.27.16:506][769]LogHandshake: SendConnectChallenge. Timestamp: 7.015589, Cookie: <Cookie>
[16.27.16:506][769]LogNet: Warning: Server failed post-challenge connection from: <UniqueNetId>
[16.27.16:506][769]LogNet: Warning: There is no connection to: <UniqueNetId>
[16.27.16:517][770]LogHandshake: SendChallengeAck. InCookie: <Cookie>
[16.27.16:517][770]LogNet: Server accepting post-challenge connection from: <UniqueNetId>
[16.27.16:517][770]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[16.27.16:517][770]LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: <UniqueNetId>.oculus, Name: OculusNetConnection_0, Driver: GameNetDriver OculusNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[16.27.16:517][770]LogNet: NotifyAcceptedConnection: Name: vrSplashLevelMatch, TimeStamp: 06/05/18 09:27:16, [UNetConnection] RemoteAddr: <UniqueNetId>.oculus, Name: OculusNetConnection_0, Driver: GameNetDriver OculusNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
[16.27.16:517][770]LogNet: Warning: There is no connection to: <UniqueNetId>
[16.27.16:528][771]LogNet: NotifyAcceptingChannel Control 0 server World /Game/Maps/vr_splash/vrSplashLevelMatch.vrSplashLevelMatch: Accepted
[16.27.16:528][771]LogNet: Remote platform little endian=1
[16.27.16:528][771]LogNet: This platform little endian=1
[16.27.16:539][772]LogNet: Login request: /Game/Maps/StartUpMap?Name=<UserName> userId: <UniqueNetId>
[16.27.16:561][774]LogNet: Client netspeed is 30000
[16.27.16:606][778]LogNet: Join request: /Game/Maps/StartUpMap?Name=<UserName>?SplitscreenCount=1
[16.27.16:606][778]LogGameMode: FindPlayerStart: PATHS NOT DEFINED or NO PLAYERSTART with positive rating
[16.27.16:608][778]LogNet: Join succeeded: <UserName>```
IpNetDriver.cpp line 450
is where the warning is printed from
it is a little bit verbose tho
I assume it's not normal that this is printed or?