#multiplayer
1 messages · Page 345 of 1
no
yeah they are, might have been on my side. restarted discord
I just checked server status and they're having issues
ahh okay
The array is being populated on the server
but when I try to pull from it on the client, it's always null
when are you checking the value on the client? are you using on onrep?
or rep notify in bp
A few seconds after initialization and no
seconds? how are you defining that?
it might not have replicated yet
try using a rep notify to verify that it is replicating
It happens when you activate the power
that's why it's arbitrary time
i'll see what rep notify has
Yes it notifies on init
if it hits the notify then it is replicating fine and it is a timing issue
what do you mean by a timing issue?
You are checking the value on the client before it has replicated
Even if I wait like 30 seconds, it still has the same result
in the rep notify is the value null?
If I set a breakpoint and hover the array in rep notify, it lists the object but if I try to get the object, it's null
I figured out the issue >.>
what was it?
I wasn't replicating the actor that was stored in the array
lol that's the first thing I said
"sounds like you are only replicating the reference and not the actual actor/component/object"
np
Is it normal for a shipping build dedicated server -log to be blank? The window that is
@hasty adder do you have bUseLoggingInShipping set to true?
Probably not, never did shipping builds before 😃
Testing it now to see what comes up hah
Anyone able to verify what needs to be enabled correctly in shipping build for steam overlay to appear, I though I heard something about on the app is in your steam partner area somethjng needed to be ticked on
Oh app I'd text on old google searches
Steam Overlay only appears if you setup steam correctly
If it appears in DEV build, then in Shipping build your APPID text thing is missing
DEV builds create them, SHIPPING not
you have to copy that into the binaries folder
and Logging in generally disabled in Shipping builds
Shipping builds are seen as a WORKING FINAL CONSUMER what ever build
Is 20x20km the max I can put in World Machine?
wrong channel
ah
I made a 20km x 20km in World Machine
but
it feels super small
I wanted to know if there is a max size I can go up to
@thin stratus yup verified it works with the appid text in the binaries/winxx folder. Sounds like that part is automated if you submit to steam just wanted to make sure I didn't gimp something up 😃
Anyone here who understand the Steam Build/Depot shit?
We have Dev and Beta keys.
We have Dev and Beta Depot.
The Dev "key" has Beta and Dev Depot, the Beta "key" has only the Beta Depot
Lol
I want to know if I can now choose between what depot to use with my dev key
Don't ever use dev key
Use beta keys, you can then ban the keys after beta
The keys don't matter, it gives access to your default branch
You can setup "beta" branches but that has nothing to do with the type of key you give
Beta branches require the user to enter a code to download from that branch
You can assign the build to each branch, so say you have a test branch which you don't want live yet, you can assign it just to test branch
But yeah.. never give dev keys. It basically grants them access to your games steamworks
@thin stratus
Na we have dev keys for the devs
Beta for the users
I just wonder if i can give beta keys different files
Or is there always only one project and then maybe branches that you can pick in the settings of the game in your library?
@raven holly
Yes
So theres branches and you can put a password on the branches
So they enter the code here
and then they can patch that branch
when you deploy a build you choose which branch the files go to
By default it doesnt push the build into any branches
So the build uploads.. and you assign the build to the branch you want the files to go to
make sense ? lol
@thin stratus the beta keys can be set to use different files
Even without specifying custom password protected branches, you can have arbitrary packages with arbitrary files
Hey guys I have an issue with Online Beacons
not sure why the server side is saying in the logs: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
after that for about a minute, it will drop the conneciton with the client entirely
i am connecting the beacon with the session search result that is obtained by a steam invite
Well i've officially made my game have some crazy replicatoin problems baha.. this video when its done uploading
Anyone using gameplay tags in mp? In what instance would the gp tag be different on the server vice client? What rationale am I not considering here.
Posted my rep bug in WIP
i havent been able to get multiplayer to work and i dont know why can someone verify that ive done everything? its supposed to be super simple but i cant get it to work properly.
i enable the steam subsystem, restart, add custom events in my game instance, one for starting a session and 1 for joining, add key bindings in my character, compile and copy game to another machine. i can start them but the other comp cant join eventhough it finds a game via findsessions.
ive forwarded port 7777, 7778 and 27015 to my pc
@BlackFox#7549 Question is: How?
This Steamworks page is so confusing
Tried to search that private group but couldn't find something about that
@thin stratus what are you trying to do
Something technically very simple.
I have 2 different keys. Dev and Beta.
Dev is for us Devs, Beta for the users.
I want to upload two builds, Dev and Beta. (while Dev is obviously a bit more buggy and has new features).
I want Devs to be able to download Dev or Beta.
I want Beta Users to be able to download Beta only
Even having Devs only download Devs and needing a second key would be fine
So your keys have nothing to do with what builds they have access too
Well that doesn't make it easier at all haha
Beta grants them access to the game
I created 2 Depots.
I assigned one to the Dev Keys and one to Beta Keys.
I uploaded the Beta to Beta and Dev ot Dev
Dev gives them steamworks access (I believe)
Dev gives me the game too
Yeah so do I even have a change of splittling dev and beta?
I mean we could just ask for a second AppID if that's the easier way
So you just create a development branch
And push your changes 'just' to that branch
and leave your default on a stable older branch
So the Builds are actually changes
Well that makes sense now. That 's why it fused my two depots
think of them as github commits, but no one has access to those commits until you move it to their branch
Only problem is, I can't get the default branch to use a new build, as my files aren't changed.
maybe adding a small text file helps
I uploaded a new build. Try to assign it "No changes found"
Even though the major change is: One uses 2 depots, other 1
Kinda confusing system
Select and AppBranch
Like, i had 2 depots up
One was assigned
New one wasn't
I wanted to assign the new one
It merged them
Yeah so uploading new files to the depot will keep the old ones for the beta users?
I thought I was overriding them?
Yes uploading a build to the depo will move it to the builds area
But it wont go live
Itll sit here, except it wont have anything under 'current'
So upload#1 Beta Game. Assign to Beta Users and Dev users.
Do changes to actual game.
Build.
Upload#2. only assign to Dev Users
assign it to dev, do your testing
Few changes later. with stable build. Upload #X. Assign to Beta Users
But then they need to select the branch
Ah well dev is password protected i assume?
And then the user has access to that branch, if they have the password
You can choose to password protect
Well guess that makes sense
It's the dropdown menu in the game properties right?
Like on steam itself
the beta tab
So I have, dev, testing & default
Default is what everyone has access too by default
Dev is what ill use to dev test myself
then testing could be your beta branch
or you could have a QA branch
or anything like that
having the beta keys banned after the beta phase is not the usual approach?
I think most people have an actual beta game appid?
thats normal yes
if you want to pay $100 for beta appid go ahead haha
I'm not sure if Steam will provide one for free, for a beta
I know that COD & PUBG used a different AppID
So beta keys are really just a way to say "ban all beta"
And beta will just have access to default
Until we say "bye"
Then only purchased keys through store will work
Guess I can live with that
like you have to ban 200 at a time lol
So really, I posted a video in the work in progress channel, I had a strange problem last night where . 2 people joined server, same version. But 2 ppl were moving client side only. The other 3 ppl normal snd in sync with server. Reconnects ect restarts on dedicated etc no change I'm kinda baffled
It's weird because the people in correct sync saw them standing still. And on there side they were flying about and interacting like a ghost. For example they would go to a ball that bouncing about and use a magnet force power which makes it fly at them. Only t would then make it fly across the map to where there server body location is which they can't see.
I'm trying to join a server (via CMD) but whenever I connect... I get this error. Or 'warning' which lasts for like 5 seconds before crashing.
Looks like however the reference is made to the character is being lost somewhere and then when it goes to run the function using that reference it crashes.
Like character has no place to spawn
It's like it keeps bringing in the client... as a server. And I have no idea why. -.-
Client joins with its controller, server spawns character (default pawn class) for player to possess with controller at its start location.
If you have any overriding logic there is start there
@versed thistle you could run the server through vs and get more information on the crash
anyone know how to get the module included for the LobbyBeacon classes?
cant seem to get the OnlineFramework module loaded correctly
and it looks like the lobby module is separate inside of OnlineFramework oddly enough
can someone help me try figuring out what would be the most logical solution to implement rocket league style lobby system, partybeacon? steam sessions?
I realized when you press "view game info" on RL, it constantly shows what you're doing in the game, when youre in menu it says you're playing "main menu map" etc. so they re definitely using steam sessions for everything? idk
oh thats great, maybe we can work something together
have you tried using the LobbyBeacons at all?
well, the lack of documentation on it is real
this is some of the issues im having now https://answers.unrealengine.com/questions/711324/online-beacons-connection-refused-issue.html
and im trying to use the lobby beacons instead of the party ones but i cant get the modules to load in correctly
I dont want to host a server for player parties/lobby so what I am thinking atm is, somehow, when you invite a friend through steam invite overlay, somehow spawn a beacon and connect those two guys ?!
what i am doing is using a listen server, so somebody hosts a lobby server of thier own
and they invite friends
and the friends will join and then also hook up to thier lobby beacon
that way when the host finds a dedicated server, the host will travel all lobby members to that server
and since the beacons are still alive, when the game is over, it knows which client is the leader
and can connect to their server after everyone is done or something
it just holds the party together on steams side
assuming you are using steam
yrsh
thats what i want too
if i could get it to work
judging on the forums and answerhub, others have trouble with this as well
and not many answers to their questions
you invite friends through steam right? using ShowInviteUI()
I've pratically read everything I could find on google
i just use overlay
but aparently you can do that , that is cool
i will have to look at that
oh, right click and invite to game right?
yup
so cool, i can use that in the future
but yeah, when i connect to the beacon, it will sit there for a while and just time out
and drop the beacon conencitons
but i can join the session like normal just fine
i just diabled that to test that just the beacon conneciton can be made
and it is made, it just doesnt stay
i was using the partybeacon classes
but now i want to try using the lobby beacon classes
but i cant include their module for some reason
im using 4.17.1 btw
I'll need to take a look at that
I think I'm on 4.17 source build
can you start a listen server after the game loads? I've only done it through command line before
I mean, like, "create party" button and it starts a listen server
what you need to do is do a start session with the online subsystem and once that finishes, open your level of choice with the listen parameter
or open the level then start the session
order should not matter
then what i have been doing is spawning the beacons and starting their hosting connections
and since steam does their little p2p connection, no port forwarding should be nessesary
i belive that is right anyway
so the beacons are just for holding the party together after they leave the dedicated server?
not just after they leave
but at all times
the cool part is
that they are actors, but just on a different netdriver
so that means you can replicate data with RPCs and UPROPERTYs just like normal
yeah makes sense
but you dont all have to be traveled to the same server level
so kinda like what pubg does
in pubg, the host of the party creates a listen server and others join to it and that way you can replicate their characters too
but yeah pubg does like the clothing and apprearance data through the beacons i can only guess
im almost positive that pubg does it with listen server
if its a listen server, beacons shouldnt be necessary for character replication though?
well those characters im guessing arent replicated
but thier apprearances i think are
because with beacons i highly doubt you can actually do actor replication
since i belive that requires that you are traveled to the same world on the server
likewise
I have so many question marks inside my head
ME TOO
lol
so what do you have going so far with it
do you have listen servers set up at all?
I only have the dedicated server and the steam session stuff as of now (join same session by inviting friends), I've stopped working on the code until I understand completely what I gotta do
yeah i have had to dig into engine code to figure some stuff out
and i still have questions
I'm not exactly sure what is listen server is for here, do you need to host a lobby server? steam already does that
so
when you actually pass in parameters to host a session
the variable bUsesPresence
this determines whether it is a lobby
if true, then internally in steam it starts a lobby
if not, it starts a "internet" session
i had to dig into the source code to verify this
ive seen that thread lol
I've read it multiple times 
me too
yeah me too, the thread says so
I thought you do something else to host a listen server on the client, didnt realize it actually means creating a session using CreateLobbySession
yeah so I've listen server setup then! xd
yeah likely you do
I looked at the partybeacon stuff in UT source but gave up quickly
the only bad thing is, testing this stuff requires two systems for all i know
oh yeah I actually run back and forth in the house to test it xD
UT uses a non standard implementation of it i think, i gave up too when i was looking at that, i think they wrote thier stuff custom for their own OSS
but yes i really want to test the lobby framework and see
if those classes work better for beacon connecitons
I'll look into the source
its so very frustrating since there is almost literally ZERO documentation on this topic
another question, when you leave a game in dedicated server, do you repeat the CreateLobbySession stuff again? or does the session stay
you will have to do it again i THINK
since you left your own game session for another
but your beacons will stay
hmm but, you need to invite them again?
if they are connected through your beacons then no
you should be able to get enough information to let them travel to your level
at that point
yeah so the invite process only happens once
yeah
then you use beacons to hold party together
but yes beacons are the glue for the party
in Rocket league, the players appear on the "recently played" list, I'm guessing this requires you to join the same "lobby" in steam backend
so there is another steam game session that exists on the server that all players join for a game then
it all starts to click now
you mean for the actual game and not the lobby?
that is going to be a dedicated server 9.9 times out of 10
yeah I mean in dedicated server
yeah the dedicated server will be just like normal
so with this setup, I will see all players in the dedicated server game on my "recently played" list
yeah you can log the steam ids into a file
and then pull thier profile data and avatars later in your ui
oh yeah I've also tried to find the people in my session to retrieve their IDs and avatars and stuff but no luck
by find
I mean in code
after joining
I think the UniqueNetId is their steamid
it is
cant you iterate through players in the session?
i think so
without travelling to same map
lets find out
im going to look at some source code too
good for me to know
as well
I've tried CurrentSession->RegisteredPlayers , CurrentSession being Sessions->GetNamedSession(GameSessionName)
but the array is empty
hmm
wonder if they dont give access or something
did you try that after the onstartedsession event was called?
or on joinedsession
I actually did it in a Tick event inside if(CurrentSession) so the CurrentSession only becomes valid after joining anyway
yeah was going to mention that
do you need all your party members on the same level?
if they travelled to the host
that'd be easy
you do not need all party members on the same level
you should not have to
since it is a totally different instance of netdriver
then we could communicate with party members through beacons again
beacons are cool af
did you see thread about the overview of network architecture of Fortnite?
they use beacons
it must be working
ill be back in a couple minutes and look
if you can find the link could you post it?
yeah let me find
im back
ah of course I cant find the thread
lol
heres another one i have been through some amount of times: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/85348-party-beacon-how-does-it-work-o-o?113190-Party-Beacon-How-does-it-work-o-O=
huh
that Crzyhomer guy seems to be the one who created this implementation
the party system uses XMPP to connect social party members together for an evening of gaming.
tfw never worked with xmpp before

well that UParty stuff they are talking about, i sniff custom implementation
theyre still using beacons in matchmaking
server fills up on the beacon, notifies all party leaders to tell their party members to connect "for real"
good that is the principle i am using for our game
arrrghh too confusing
also for ours :D
who is doing the "start dedicated server process with this configuration" though
says "preallocated and spawned on demand"
that is the loadbalancing
i belive
a program that can manage server instances
common in MMOs
so the beacons are used for 1) making a reservation on the server 2) keeping clients in contact
yes
finally got my editor to open
now gonna look for that module
in the plugins ui
YES FOUND IT
it actually had to be thrown in uproject i think
so yeah i should be able to get access to those classes now
i hope
nice
dedicated servers are running, advertising with our session backend (IOnlineSessionInterface), but devoid of game configuration, waiting for a client to contact them via beacons
so in steam, we advertise the servers through steam backend
yes
how do you find the servers after?
well
especially, finding a server that is 'available'
you can have them pop up in steam server browser as well
although i belive you need to set that up with valve
we already deployed our dedi server as another app id
yeah my dedicated server shows on the steam server browser
you can set stats on your dedi server session
like how many players are in
and then when you do a find session query
you can query off of that data to determine if it should be factored into the search
results
hmm, then send a reservation using a beacon
then server tells every host to travel after its ready
yeah
it all makes sense
well the query will return and then it will give you the sessions to choose from, but yeah
that i belive is the intended flow of all this
wait, how can you "make a reservation" on the dedicated server after findsessions query?
assuming with a beacon but
reservations beacon wise are only for the party host
not the dedi server
you only try to travel folks there if there is enough slots for all of your party members
now im not sure if there is a reservation thing on dedis for that
would be nice to know
beacons (UOnlineBeacon) are used to make reservations on the server
server being dedicated server i think
huh
if you try to travel your folks after the find sessions query, someone else might have already travelled before you and you might end up hard travelling for nothing
so dedicated server must notify the party host : you're ready to travel
so maybe it could be worth having two different beacon connections
for the party and for the party to the server
yeah thats what I think as well
i dont know how they usually handle that
now only thing thats troubling me is
how do you open a beacon to the server
after findsession query
you get a connection string or something from the query i think
you do
and that session would be the one
however if you have two beacons, you are now going to have an issue with ports
since port 15000 is defualt, it will try to override to that
you will have issues
that might be why they used XMPP for party system
it could be
I'm off for the day, hope we share more info about this later
ill add you
yeah, thanks
good luck, and have a good night as well!
Does anyone know how to replicate every single animation and shooting damage
Also which is connected to steam servers
you need to setup replication for every animation and every damage
Alright thanks
at what point does it become ok to send a server RPC? Is it ok in OnConstruction?
@green jackal hello
are you the same guy? https://answers.unrealengine.com/questions/510856/ionlinepartyinterface-usage.html
twitter pic matches!
can you share some insights on how you have implemented party system using an xmpp server?
my player controller has some state, whether the player is wearing a VR headset or not. the state needs to get replicated to pawns that it controls, with skipowner because the local client always knows the state itself. If I change the replicated variable during the call to PlayerController::Possess, the skipowner condition might not apply because the pawn isn't owned yet. Where is the right place to set something like this without that race condition? Maybe ServerAcknowledgePossession_Implementation?
hmm, no seems like a security issue there, the client can acknowledge any pawn and that isn't really validated except elsewhere
@drowsy badger been a while but I can give you some direction. Not all XMPP server software works with the UE4 implementation. Epic uses Tigase internally but we couldn't get it working so we went with OpenFire. Had to disable SSL for that to work properly. Also had to make sure our server had all the required subdomains setup, if you look through the XMPP plugin you'll see what I'm talking about. Hopefully you're using C++ because I don't think any of this will work in Blueprint.
yeah of course, I went with Openfire too and the authorization works ok but for some reason after the "presence" test it crashes, I'm just calling the FXmppTest test method btw
you said the project is abandoned on the answers hub, can you share some code of the relevent parts?
ok I fixed the crash, the logout was being called twice
I can see myself in the openfire admin panel so I guess its all good
so you just send data back and forth using xmpp for party state stuff and thats it?
did you use UParty or make your own structures?
yeah, used UParty
and we just sent it as chat messages, json string
that seems to be the way Epic intends for it to be used
there's existing functionality that does it for you. Either in UParty or the Online Subsystem
yeah I think I've seen it somewhere
thanks, can I ping you in the future if I get stuck somewhere?
yeah, definitely
thanks!
did you need to implement stuff being called in UParty functions in OnlineSubsystem ? Like in UParty::CreatePartyInternal it calls Online::GetPartyInterface but there is no party interface in any of the subsystems (except the epic's), so do we have to implement these in a onlinesubsystem ?
@green jackal
yep, had to create the subsystem implementation
I'll just need to implement a party interface and return it in the steam subsystem, hope that'll work
So by default Unreal will destroy the playerstate of a disconnected player?
yes
Yet some how the ShooterGame is remembering the team a disconnected player was on and putting them back on it
PreLogin has a UniqueId field maybe that is what they use
but postlogin would have to reassign teams...
That is confusing.
APlayerState::CopyProperties
oh thanks!
np
Hello, I have some weird issues with my simple LAN multiplayer setup.
video https://www.youtube.com/watch?v=jo-ql-7duVQ
doing this in C++ & blueprints
excuse my poor choice of "art" 😃
weirdly client doesn't get UMG hud that is created on BeginPlay for player actor which I thought was going to be clientside
and the client actor doesn't accept any input, but "server" one does and replicates to client just fine
if anyone has any ideas or maybe wants to take a look at the code or needs some information just @ me, I will be going to sleep soon (pulled an allnighter yesterday trying to get this to work)
When I run a dedicated server it starts up fine but immediately shuts down, no errors, looks like a natural shutdown. Can't find anything on Google. Here are the logs https://gist.github.com/Vaei/8ccf8e720ace87fccc7cdbf756eb3fb9
@quiet raptor use the HUD class to spawn the umg HUD, or at least use a "is locally controlled" check, but the actor is a poor place to do it regardless. Are your players actually actors and not pawns or characters
What is recommended net update frequency and min net update frequence for fps game?
game have hight frame rate
120-140
@grand kestrel yes they are actually derived from ACharacter and I'll give it a try for the UMG. have any idea on why player input doesn't work on the client?
How are you providing the input
@grand kestrel i have player controller override and action bindings set up, works fine if I run without server and works fine on host, just client wont respond to any input
@grand kestrel this: https://i.imgur.com/7IKI9bx.png ?
how large of a world can a dedicated server handle?
@quiet raptor cast GetControlledPawn, and don't use this->
ok, I'll give it a try!
So ACrappyFlapCharacter* character = Cast<ACrappyFlapCharacter>(GetControlledPawn());
If it doesn't work then use UKismetSystemLibrary::PrintString(this, FString::Printf(TEXT("Found %s"), *character->GetName())); // Typed in Discord and may need a correction Using the blueprint method will tell you if it's the server or client (and which one) is printing, it will tell you if it found a valid character
@ruby epoch UT4 uses default net update frequency (100) but also sets min net update frequency to 100 from 2, for their characters
Depends on your game and your target specs
20 felt horrible on OW
I'll also trust that Epic know the capability of their engine (probably more capable than source engine)
The matches are 5v5, if you have more than 10 in a match then maybe it's better to low it
Also depends on what you're replicating and how much bandwidth it uses
@ruby epoch i think csgo is using 64 for their competetive servers, 128 on some other tournaments
@grand kestrel about that printstring, should i have put that in "OnFlapStart" method or did you have something else in mind
OnFlapStart and under if(character)
Ensure that both clients and server print "Found %s"
You can do an else and put UKismetSystemLibrary::PrintString(this, FString::Printf(TEXT("No Character Found for %s"), *GetName()));
ok, I'll try this and then I'll have to go to sleep, need to wake up for work 😐
Wait why are you calling reset jump state
Remove that
If you want to release the input do it elsewhere
Like following UCharacterMovementComponent::DoJump
Oh, it doesn't release input
You're not meant to be calling that yourself
Just take it out
It could be interferring
as far as I've looked into the implementation it does just reset jump count and maybe something else
I'll remove it for the sake of finding what's causing this
It's entirely redundant, at best
You're calling a method that is called when your character stops jumping
One that you'd ordinarily not need to call yourself
@grand kestrel got this, but only on the host https://i.imgur.com/4ViQsg2.png
client & server logs
You're not spawning your pawns manually are you?
So you have a player controller that has no character
it appears so :/
though it should still print that no character was found, shouldn't it?
Not unless you did the else
I did add it, but it didn't print anything on the client
yeah, I removed those
Then you either don't have a player controller or the binding isn't working on the client
what could be the issue with "this" in that context though?
Probably nothing, it's just redundant
And if your client has no player controller or binding then you've done something incredibly strange
Either way, you need to find some more information because can't do anything other than take guesses
I was used to typing it out, just for the sake of knowing if it's a class variable or some local
well, I've got some hints from you and I'll try to follow it up tomorrow (today ;_;)
thanks for the help, I'm off to bed now 🙂
Sure, night
Yo guys, what is the fastest way to get ping in BP for PIE tests? Right now I'd use a multicast even that starts counting time and compare the time difference when I need to check the ping. I realize it's not ideal and I'd be glad to see if there is anything faster/better
APlayerState::Ping is exposed to BP, no?
oh boy, thanks
Or are you not looking for the ping...are you looking to simulate ping? I might be misunderstanding
Oh, ok
Keep in mind that value is actually your ping /4
It's not super precise, just to fit it into a smaller size
I wouldn't use that for actual logic, just for general ping info
ah that's a shame, but good enough
I am trying to make something that is delayed by 2 seconds happen simultaneously with consistency between player and client
If you send the RPC from the server along with the server timestamp, you could delay the difference
But if the ping is over 2s (that would be terrible, but I would still support it), that wouldn't be great
timestamp is consistent between player and server?
like server time is undoubtedly the same as client time when it reaches it
I mean time is global
the universe has a purpose, there is a god and all that?
I would look at AGameStateBase too
There's both ReplicatedWorldTimeSeconds and ServerWorldTimeSecondsDelta
I'm sure you might be able to figure something out with those 😃
Hi guys, does anybody has some time to help me out with something? It's multiplayer related
Oops, well, neither are exposed to BP =x
@trail bloom that's what the channel is for—if you have a question, just ask it 😃
can world origin shifting be feasible for large mp maps?
Great! Thanks. I've posted this in the forums:
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1362724-reflection-and-networking
I will try to explain it here but the answers hold some info that may be relevant. I have coded an inventory system which relies on an actor (the inventory itself) which holds an array of UObject representing item stacks, those item stacks hold the actual item that is also a UObject. Different items have different type but all inherint from UItemBase class. I also have a datatable with each of the items. For each row there is a field with the class of the object so when it is referenced from the game by id it is instanced as the corresponding class.
Now to network all this I'm sending some small USTRUCTs describing the items via RPCs called in the inventory actor only when needed. It works flawlessly. My problem is that this system lacks flexibility since I'm subclassing the UItemBase class and I'm loosing the type info over the network.
Any idea how to work around this?
Hmm, not sure how much I have to offer on this, unfortunately. Do you feel like you're really losing that much flexibility in having a common parent if the system will pretty much be used for this one system?
I've gotten spoiled with just being able to marshal/unmarshal arbitrary objects on demand in Go lately, so doing something like this is a tad painful 😄
sorry for not responding, thanks a lot lethal! I will make the best thing now!
Hehe good luck, sorry to give more hope when they weren't exposed anyways :p
I feel you. Got back to C++ from Groovy two weeks ago.
I have an IEquipable interface that is bothering me. Not every equipable is an item and not every equipable item behaves the same in the client.
For instance when I drag an equiped item into the inventory. If it is not an item then it shouldn't let me do anything but if it is it should go to the backpack. I would like to have that info to do some UI work to show the user what can and cannot be done before he tries
With Seemless travel, do playerstates get recreated?
I need some Guidance with PlayerStates. I have my custom game mode that I use to assign teams on PostLogin (works) and then I do another team assignment on InitGameState where team assignment is to set the team int var on the players PlayerState, but for some reason, I get the impression that the constructor is setting the TeamState back to 0 but can that be the case?
I don't believe player states persist, I'd make an array on GameInstance and gather the information and pass it through before travelling, then reassign it
Not 100% though, I could be wrong, haven't checked in a long time
Yeah they get reset you will want to use CopyProperties in Player State @neon mango
Check out the networking compedium for info
http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf
I can't imagine how would you support latency higher than 1s in any real time game
even if it somewhat works for local player
it definetly won't work for remote players who are waiting for updates for laggin player
so you either favor the local player and others feal cheated
or you favor remote players and local feel cheated
either way it's bad
I wouldn't go about supporting anything higher than 250ms
it's still almost 0.5s of latency
If you're referring to my comment, by support, I mean not have the game flow literally break because of a bad connection
The way you set up code over MP should do its best to be agnostic to the connection and still do things in order (or at all, for that matter), even if it's a choppy occurrence
Having a tiny second of bad connection breaking your gameplay for the rest of the session isn't good :/
Many players have pings of 3-500 in some parts of the world
@brittle sinew if your client is not authrative the regardless of lag
server updateds will override current client state
updates*
so it's really impossible to break game by to much lag
If you build it well, sure :)
you can't really build it bad, beyond giing client authority
There are a million ways to not do that though, so i just think it's best to be aware
worst can happen with aurotative server is snap updated to some state in past
Well, time-sensitive RPCs like the person above was talking about can definitely wreck things
If you're strictly speaking about property replication, sure
uhm time sensitive RPC ?
But RPCs throw a whole different spin into the way you design it
when you are coding multiplayer you do it with assumption
that everything is event based
and everything is async
you can't have time sensitive events in network code
its never going to work
Again, you might. :)
And I would agree, that's the better way to do it.
But that's not the only way to do it, and some may choose other ways that are more dangerous
idk I would never even think about doing it in way that lock you code into some time frame
all I can say
they are doing it wrong (;
so it's their fault entirely ;d
Sure, and that's the whole point of my comment, haha
If you're not careful in thinking about the implications of a networked game, you might run into situations like that
If someone's being diligent about that it's probably less likely to happen, but still not impossible
well yes, but it doesn't change the fact that I wouldn't even think about supporting latency higher than 250ms
even modertly fast games are hardly playable with latency like that
I attempted it
and it is just pointless
someone is going to suffer in that case, and I rather make only player with high latency suffer from spike updates than rest of players ;d
Yeah, I wasn't saying they needed to make it smooth, just that they should set up their code in a way that would be affected by that, like you were talking about
@regal hazel do you know any good docs like this for engine in general?
MVP series by Mathew Wadstein (his whole channel is blueprint tutorial heaven)
https://www.youtube.com/playlist?list=PLSlkDq2rO1t7eEyfF8eiTsGGGtFOBz1vb
Gameplay Framework Guide
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/
Official UE4 Udemy Course
https://www.udemy.com/unreale4/?couponCode=BEUNREAL
Content Examples Sample (Download from Epic Games Launcher)
@quiet raptor
@regal hazel have read through most of the framework docs there, also got one c++ ue4 course on udemy. (more interested in c++ side of ue4 dev)
General UEC++ Tutorials
https://www.youtube.com/playlist?list=PL3gCaTLUSAUsHG2BzsAs-HIeP08DyWtHh
Battery Collector Tutorial
https://www.youtube.com/watch?v=mSRov77hNR4&list=PLZlv_N0_O1gYup-gvJtMsgJqnEB_dGiM4
Introduction to C++ Programming in Unreal
https://docs.unrealengine.com/latest/INT/Programming/Introduction/
Shooter Game Project (Download from Epic Games Launcher)
Survival Game (Also networking)
http://www.tomlooman.com/survival-sample-game-for-ue4/
FPS Template
http://www.tomlooman.com/fps-template/
@regal hazel thanks, will take a look
Anyone here working with Xbox One?
@regal hazel it's not so much the reset method as it is the constructor gets called again?
anyone here run into an issue when running server/client via command line, where the client will load into the level briefly, then the screen goes black?
Does InitGameState get called before PlayerState's CopyProperties and does Pre/PostLogin get called before PlayerState's CopyProperties?
Set 2-3 breakpoints
And check :D
@dense citrus Seamless Travel?
Any Subsystem in it?
Listen or Dedicated?
Is your GameMode set to do a Seamless Travel?
no
Headsup, "PostLogin" doesn't call on the other maps GameMode then
You need to replace it with postSeamlessTravel and such things
@thin stratus no crashes anymore but endless level load 😄
Is it possible to see lost packages somewhere?
Accurate, yet not the answer :p
Guessing you mean packets?
stat net has that information I believe, if you're just referring to amounts
The network profiler is also probably better if you want something a little more in-depth, but I haven't used it personally
Hey everyone. I just joined this discord because i've heard its an Unreal engine 4 discord and i really need help with something in UE4. I've always wanted to make a multiplayer game(s) and i keep try and trying and it never work. Someone here can help me making just a working mp like with server i mean, someone can teach me how do i make a working online server and stuff please. Any help would be amazing
@agile crane this is a great tutorial going from start to finish on setting up a dedicated server build: https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)
There is no text on the page as i can see
And i rather like, video tutorial. I don't like reading or staying on a white page and read
Sorry something happened with the link on mobile- just search UE4 Dedicated Server and you’ll find it
trying to wrap my head around sometihng: If i have a function on a client (say, a Fire function for a gun), I need to call it on the server, then have the server replicate it to the rest of the clients, right? Is that a multicast function? or am i mixing that up
@inner iris it's Discord haha, it doesn't include the trailing parenthesis in links
The page its still empty. Sadly
Add the ")" onto the end of the link in your browser
@brittle sinew ah gotcha- on mobile so just tried to quickly paste
Anybody here know why Multiplayer is not working like, when i open my multiplayer game two time on my pc i can find my server and join it but when someone is not in my house like not a lan and its not working. Every multiplayer project i find or i tried always work Lan only. Someone here know how to fix that ?
Well, you're probably failing to successfully expose your server to the internet, which would usually be accomplished by port forwarding
That's some pretty basic network administration though, and IMO outside the scope of the server
I don't get it
I tried adding advenced session, still not working. I tried subsystem, still not working
Well, I can't really speak to what you're doing wrong without any way of knowing
@brittle sinew yeah network profiler doesn't show what gets lots, but I suppose you can't see what is being lost
Stay nice glitch :)
Yeah, i'm staying nice 😃
@wintry cove ah, you meant the packets themselves instead of just counts of lost packets?
Hmm, couldn't tell you :/
And no, @agile crane, I would more prefer that you do some debugging yourself, but "still not working" doesn't really give me any info to go off of
Alright. Everyone its working but when other people that aren't in my house using the same connection as i use can't find and join my server or if they create server i can't find and join them
Its only lan. I don't know how to make 24h server or something like that
I tried adding subsystem code into my game engine text file and i turned on Subsystem null plugins
DefaultEngine*
Well yeah, subsystem null doesn't support session connections over the internet
Oh alright
You can either use Steam if you're planning on releasing the game on Steam, set up your own subsystem, or connect directly by IP
The latter of which would require manual port forwarding
Its a fan game i'm making, i won't release it on steam. I don't know if there a way to do that at least without steam
without external service, no.
Is there any plugin or code i need to install in my project for get a non steam 24h server ?
Oh ok
politely pokes channel with question again trying to wrap my head around sometihng: If i have a function on a client (say, a Fire function for a gun), I need to call it on the server, then have the server replicate it to the rest of the clients, right? Is that a multicast function? or am i mixing that up?
so it goes client requests server to call function, which replicates it back down?
You can call Server function in owner client, and replicate back to clients by property replication.
ah ok
You can ignore owner client by adding conduntion to replicated property. COND_SkipOwner
thanks.s that makes more sense 😃
@agile crane nope, but you're going to have to have a barebones understanding of networking
Still dipping my toes into networking atm
There's nothing that magically connects you to your friends or a dedicated server—services like Steam do that, or you can connect directly by IP
I guess i won't be able to make a working server then. But can i at least do that without publishing the game on the steam store ? like just a non steam game but the game detect steam or something
If you don't want the player to have to know a certain IP to connect to a server, you'll want to use something like Steam, GameSparks, etc. or write your own master server
How do i made my own 24h server ? please
😐
Well that's just a matchmaking/sequencing/etc. server, not the game server itself
But I don't really have a great answer to that question, there are a million ways you could do something of that nature
I would probably whip up a quick HTTP or sockets server in Go, but that's just me and what I'm comfortable with 😃
Okay.
The master service basically is application/server. You can write in any language which is doesn't matter. But if you don't have any knowledge about this you are going to have trouble.
Not sure there is a free services but it's better to look for it.
Alright. Ill check out for making server or stuff like that. But thanks for your help : )
https://www.gamesparks.com/pricing/ Try this at least, free and you will understand the system how it's works etc. And later you can look for other options.
@agile crane if you want a simple single 24h server instance, try following the guide I posted earlier and use a free amazon EC2 server- it’ll work fine provided you have a static IP
You just need to either search for the words “UE4 Dedicated Server” (first result) or else add in the “)” that isn’t in the link
Alright, ill search now
@low elm Gamesparks uses it's own replication instead of UE4's and don't allow you to upload your own binary, meaning you need to build your code specifically for Gamesparks
I wanted to use it too but that was the dealbreaker for me
Nope
The server sends to all, period, but you can change who runs the code, you wont stop the RPC running though
well how can I change who runs the code?
they should add a NetMulricastExcludeInitiator
AController::IsLocallyControlled() <- the client
I don't have that, but I do have IsLocalPlayerController
is that the same thing?
well its not really working, becuase when I call GetController its calling it on the clients too
@grand kestrel
Pawn->IsLocallyControlled() I mean
Sorry
Which calls IsLocalPlayerController
And you just do if (!Pawn->IsLocalPlayerController()) { code here }
Then it wont run on owning client
now it doesnt work for any client
I only want to exclude it for the Client who called the function
@grand kestrel
Then you've done something wrong elsewhere
Because if it doesn't run on any when using that condition it will think they're all local player controllers
No worries
does anyone know why is my client disconnecting from the dedicated server?
this is a suspicious line:
[2017.10.03-05.20.55:734][816]LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
Hello, is it possible to change the spectator class of a game mode on runtime? or spawn a spectator pawn from a different spectator class?
@twin juniper Login request: /Game/Maps/MyLobbyMap userId: Invalid? I would suggest you debug your login routine
by your I mean engines xD
@rough iron my login routine is from the wiki:
and that's basically it
just open level to local host
That's all fine but you should debug it, you already got the logs so just set a breakpoint in C++ and check why the engine is disconnecting you
my project is BP only 😦
Hi. Is it possible to inherit FSocketSubsystemWindows without copying whole socket subsystem code ? I need to customize FSocketBSD (without touching engine) but don't see a simple way for that.
@violet sentinel, make a subclass of FSocketBSD, fortunately all functions are virtual well you can override and change the behavior easily
@rare cloud yea, I made my own subclass of it, but i couldn't solve linker issue. out of office already, will try do smth else tomorrow.
and to replace default socket with my implementation with fixed i need to change InternalBSDSocketFactory method which creates an instance of fsocketbsd
did you add the SocketBSD module to your project ?
yes
oh I understand the problem, there is no export maccro
erf
I guess the only way is to subclass FSocket
and make your own implementation
both classes you want to subclass haven't SOCKETS_API well you can only use the type but you can't subclass it
for now i mplemented mysocket : fsocket, with pointer to socket implementation, delegated all calls to impl and added requested stuff. i hope noone will ask more, lol. In MyNetDriver::CreateSocket i wrap returned value with my class
would this work:
Server RPC (On player, with authority) calls a multicast function on another actor which does not have authority
will the multicast be called?
@twin juniper So, Server is invoking or Client?
@wary willow ACharacter calls a server rpc, which then calls a multicast function which is on another actor which is just placed into the world and essentially has no Owner
So, client-owned to server = good. then server to multi of unknown actor should still be good.
Designating function replication across the network
@twin juniper Let me know if it doesn't though
@wary willow someitmes it does, sometimes it doesnt
its strange
also, timers are strange too...
You have it set to reliable?
if u start timer A on server, but u multicast it... does it get called on client or the server?
or both?
Let's see
I usually have timers in GameMode
so server
Then pass it through GameState
then replicated down to owning-clients
But, to answer your question directly, I mean, it you are Multicasting anything from server, it should execute like the docs says
That executes on all
@twin juniper Just tested it. Called Server RPC in Character, to unowned object in level.
As long as the object is replicated
It works
@wary willow what about calling to a component attached to said actor
the multicast is on the component
@twin juniper Test it yourself?
But, it should work nonetheless, since I have component managers on actors
Is it reasonable to update the player UI from the playerstate like this?
I see a lot of examples which have the kills / deaths / score etc bound to a PlayerState cast in the widget, but that seems really expensive for something that won't be changing all the time
Well, first off, your naming conventions need a bit improvement
Next, you should be getting most, if not all, the widget info from playerstate
By "bound" I am not sure what you mean though
If you mean "bindings", then yeah, you don't need to do it like that.
So this logic is in the playerstate, but is only setting the UI vars when they are changing
You can make it event driven
Yep that's what I meant
This is what I tried to do, in order to get it to be event driven
The first part of the logic is setting the actual playerstate vars which would need to be updated regardless
Then the second part just updates the UI
Inside of a widget would this be a safe way to get the player char? https://i.imgur.com/PTdViv0.png
because it seems like its always getting someone elses character
._.
@wary willow do you know?
@twin juniper I set the character reference directly when adding the UI from the controller, but I'm pretty new to this too- works for me
@twin juniper depends how you create the widget. Is there local multiplayer
@stark dome Its a 3D widget
but its constantly showing the same other players text
so if we have 2 players, i see my name above ur head as well as mine
and you see yours over mine and yourself
Yeah the owning player is going to be you because you own that widget
@stark dome Yeah, i understand that i justdont know how to fix it 😒
A player on another PC won't be the owner
Because u should see your name
and i should see my name
on our respective characters
Is the widget attached to the pawn
i think the pawn has to tell the widget about itself then
so on your pawn get the widget and store a reference
@stark dome BeginPlay() if HasAuthority() == false, Set Character = this
would that work?
yeah should work
@stark dome is the authority check going to mess it up tho
its basically saying
only do it on the client
but not other players
or server lol
@twin juniper if that code lives on the pawn, your local pawn will be the only one with authority
other connected players pawns won't have authority
@twin juniper why do you think that
hey guys, is there a reason that MoveComponentTo doesn't respect the rotation that I give to it on the client side only?
holy crappers its complicated to make a "dedicated" server in unreal
In what context do you think its complicated?
my project is blueprints so i had to do the empt yc++ class hackiness and when i try to build development server i get an error about a missing header file
im not c++ developer :/
You need to compile from Engine source to have an Dedicated Server exe
Get the source from GitHub and compile it, then you will be able to build an server exe
There is some good tutorials on how to do this.
What do you guys think are the top 10-20 tips for starting with multiplayer in blueprints? Stuff like using GetPlayerController(0) for local controlled player, etc.
Would highly reccommend taking the time to seriously review the gameplayframework docs and actually process the information.
Honeslty id stay right away from using GetPlayerController(0), that thing seems to get alot of people confused especially working with Multiplayer.
@fossil spoke So, what suggestions would you have then?
Like @severe widget said, making sure that they have an thorough understanding of the Gameplay framework and the context that each class is in is fundamental
Docs and common sense (you know, thinking about things) should be enough.
It should be but for beginners even simple stuff when you think about it can be pretty abstract.
</joke>
is anyone in here using the Shooter Game template in their project?
wondering if anyone has ran into a bug where weapon projectiles fail to show up any time a "MoveComponant" node is executing in a BP
they hit the target on the server and the hit replicates to clients, litterally only the projectile is failing to render/replicate while moving
As soon as MoveComponant finishes moving, projectiles show back up :/
@wary willow On my end, I'm still learning multiplayer after having spent like 2 years on single player. Things that have tripped me up are when to use multicast vs run on server, what should be considered Reliable, the importance of the network profiler. etc
@fossil spoke Regarding the “GetPlayerController(0)” thing mentioned before, I’ve seen it used in a few examples, should it not be used?
As far as I could tell, it’s an easy way to get the current local player controller but perhaps I fell into the confusing trap that you mentioned before 😄
Its fine to use, the point i was trying to make was that in an Multiplayer context newer users that dont fully understand the consiquences of running some code on the server vs on the client can get unexpected results
Assume that your new and you think "Hey i need to grab the PlayerController for this Player, i know i can just use GetPlayerController(0) cause thats how i was taught to get the local controller, oh wait why does my code always return the first player when i wanted player number 3 instead."
The server has all player controllers so if someone like that accidentally ran the GetPlayerController(0) on the server side not knowing that this is not going to have the perceived effect it can catch them out.
I just recommend that it not be taught to newer users for that reason. Its an neat usage but it needs to be respected and understood fully by the person who is using it. Otherwise thats how bugs occur.
Ah gotcha, thanks for the explanation. I’m still pretty new to all of this so that makes a lot of sense and I can see where it can be confusing. The hardest thing to wrap my head around is getting a mental image of what is happening on the client and server differently. So in this case calling the GetPlayerController(0) on the client will always return the local player since he has no access to other player controllers, but calling it on the server will return the first player controller in the list of connected players?
Folks is there a way to get an array of UniqueNetID's of players that are currently in a given game session?
Nah for matchmaking
I've found GetNamedSession()->RegisteredPlayers
that seems to be what I want
Yus
Actually. I wonder if they already matchmake with all players in the session... hmm
Idk what matchmaking service you are using
PS4 / XBL built-in ones
but tbh, I'm tempted to just use my own :/
make life easier
(hopefully)
meh that'll do...
@chrome bay if you want to use your own you have to go through a ton of extra certs
for your backend
xD
Ughhhhhh it doesn't let you matchmake for groups of players though 😦
or parties rather
your normally merge groups together
one member is assigned a leader
so he hosts actually
and has a list of players
like a mesh xD
I am definitely going to have to hire someone to help me with online sub-stuff haha
it's hard work and needs deep knowledge
