#multiplayer
1 messages ยท Page 314 of 1
@bronze lava you can copy/paste even landscapes
have done that before once had to downgrade some test project
besides landscape data, you are technically just copy/pasting asset references and locations, so if you have the same uasset on other project, that solution works from one map/editor to other map/editor
I now mean the items in world outliner, not just copy/paste the map uasset
Alright so I'll import the new assets first in to my 4.14 project, and then copy&paste assets from the map?
they need to be the same assets, I dunno if importing will work, you could try though
all in all, map instanced assets need to exist on the project where you are pasting them on map
Hmm. Well, I'll try and report back if it works :)
@fierce birch It worked, kind of! I have some manual work to do, but thank you!
np, that's a handy thing to know
one thing that many don't know is that you can copy/paste landscape from map to another
I didn't for sure :)
Hey, i just have finished setting up dedicated server on linux, working very well... but with a very big flaw, as i find out later. Everytime Restart Level happens, the used memory goes up by around 50mb without being freed.
I googled it and i stumbled across this: https://issues.unrealengine.com/issue/UE-34423
Seems there is a long time memory leak when using dedicated server in combination with runtime map changed. There are no memory leaks on the client, only on dedicated server
Is there any solution for this yet?
anyone gotten amazon gamelift working?
I've got everything building, I upload a build, create a fleet, but gamelift insists that I'm not calling InitSDK
my server is actually running, though, I can connect to it
Hey all, seems like the "jitter" issue actually wasn't on 4.15, it happens with 4.14 aswell. Sorry. Any advice on why CharacterMovementComponent is extremely jittery when connecting across the internet even with good ping?
Just tried with Net Pktlag=100, the movement is extremely jitterish. Is there no clientside smoothing on CharacterMovementComponent?
When sprinting, the jitter is much much less noticeable.
Just checked one of my earlier builds, and the movement is very smooth. I must've done something wrong.
@bronze lava does this happen all the time, or only when interacting with physical actors?
@golden crown all the time :/
okay, let me check something, there is something that might help you
Alright, thank you.
but as far as i can say, we don't have character movement issues in 4.15 with jitter, only when interacting with physicall actors
Yeah, I just noticed that it happens with 4.14 aswell
Didn't happen before so there's definitely something I've accidentally changed
alright, a very useful tool to track such jitter issues is the console command "p.NetShowCorrections"
just open the console in editor, call that command and always when this jitter happens, it will visualize it
i mean, if a server->client correction happens
use the output log to see whether NetShowCorrections is enabled or not (its a toggle command)
@golden crown Do I use it with net pktlag?
just as you want
probably there are permanent corrections in your project, with high and low ping
but with low ping, they are too small to see them
Well I do see a lot of red & green, which I assume are the corrections?
yes
red means client position (which is incorrect) and green means server position (the correct one, where the client will teleport to)
this, in my case, almost never happens (even with a very high ping)
but it starts to happen all the time when interacting with something dynamic in the world
like a moving platform, physic objects, such stuff, where its not possible to predict the movement in the real way
when you have this corrections all the time, if you are just moving on static objects, then there must be something in the blueprint/c++ code of your project causing this missmatches between server and client
Why dedicated server in shipping configuration don't have logs? :(
I'm must use Development configuration for logs?
Hmm so I checked, and there seems to be equally as many corrections on both my old & new builds. The old builds have smooth movement, though.
Actually this is interesting. There are only corrections when sprinting, when walking, there are none. This isn't the case with the new build, though.
@bronze lava Ah maybe the server/client don't know anything about the sprinting/walking mode?
@surreal prism well, guess shipping is uh... shipping, meaning it will cut out stuff which is not needed to work. Makes sense in terms of performance etc. if you really need the logs, then you need to use the development configuration, yes.
Hmm, that could be possible. I just tested, and in the new build, there are no corrections at first when walking, but when sprinting, there are corrections, and when ending sprinting, there are corrections. Pretty confusing. @golden crown
@bronze lava in common, corrections can happen. In your case, you should send an event to the server when starting to sprint but you should directly set the sprinting mode on the client (not on multicast), same for ending for sprint.
this may fix the issue
@golden crown thank you ๐
@golden crown for now, I completely disabling sprinting and am soon going to check if that was the problem.
@bronze lava Okay, and uhm, in terms of smoothing, i have tested out a pretty well solution as well (there are different levels of this solution)
@golden crown Even disabling sprinting didn't fix the problem. Mind telling a bit more about it? :)
It's strange how there were absolutely no network corrections in the old build, but now there are loads.
okay, for smoothing, its very very important to implement a visual only smoothing
Hmm, I'm only using blueprints, though.
you can implement a visual only smoothing by only use blueprint ๐
just have the logical actor and hide it
and the visual actor which interpolates towards the logical actor
That is definiately something I should implement, but it's still important to fix the underlying issue first, I think.
by this approach, you even can split up logic and visual a little bit
yes it is, i cannot tell you why you have so much corrections, for our project, its working so far
I'll just have to keep looking. Now if only I had a backup of my old project. :/
but i hope these correction visualizations will help you a little bit, its a nice tool
I'm sure it will! Thank you :)
Okay so, just randomly to check if I should add that to my Compendium:
Who knows how to use the Ping variable of the PlayerState correctly?
When is the correct moment to set the name tag of a player in a multiplayer game? I'm finding that if I do it right away, players that join my game don't see the name being set for the players that were already in the game. Note, this is for a simple POC using blueprint.
So it seems as though a certain pawn of mine isn't able to do damage when they control it client side, but works Server side and another pawn works client side and sever side? Not sure why this pawn would not be able to do damage.
hey all - just prepping ahead here - if i had a TEXT component on an actor (pickup item for example) and i wanted to rotate this text to be facing the player character (IN MULTIPLAYER) how would i pull this off so its only to OwnerSee and have the rotation set to YOU AS TEH PLAYER - and not to someone else who is also viewing this object?
someone uses AdvancedSessionsPlugin it's working well with steam? )
I have it workign @surreal prism - whats your questions?
peer to peer that is - dedicated server is another ball of wax i'm not familiar with
@surreal prism ?
and p2p and dedicated ๐
i dont understand
default Epic SteamSubsistem have a problems, it's show ping 9999 for p2p sessions, also i can't get PlayersCount/PlayersMax for p2p sessions
yes i see ping as 9999 as well - even connecting peer to peer
but your playercount/max should work fine
you're getting this from your SESSION right?
whenever you FIND SESSION - you'll be creating a widget i assume for each session. any way you do it, store the FindSession[] into a variable
so you can use the SESSION for the PlayerCount/Max like you say here
in my own projects work - i do a FindSession -> ForEachLoop -> CreateWidget()
each widget is a button with some variables in it - which takes session information and stores it in each widget
therefore you can pull stuf flike above
ServerName
Ping
Characters Max/Current
i'm use FindSessions, after it's success i'm iterating array of FOnlineSessionSearchResult
i'm can't find CurrentPlayers in FOnlineSessionSearchResult
it's has NumPublicConnections
it's MaxPlayers
but where is CurrentPlayers? ๐
ah ok you're using code not BP's
1 sec
Session is a variable of FOnlineSessionSearchResult
does it have exposed methods?
session.?
i cant find anything under SESSION - i would ASSUME its a struct type
but its not showing anything here
@worthy wasp how in blueprint you get CurrentPlayers? _
from session GetCurrentPlayers and GetMaxPlayers
ok, thank you)
each widget has a session variable stored to it
so you can get things l
this is in the child widget thats created for each ServerList (ROW)
SeachResult = type BlueprintSession
return Result.OnlineResult.Session.SessionSettings.NumPublicConnections - Result.OnlineResult.Session.NumOpenPublicConnections;
thx, found solution in source ๐
why ping is 9999 for p2p? ;)
it's steam feature?
unreal engine feature
Epic doesn't think it's a bug
dunno, maybe it's appid related
It's known to Epic though
#define MAX_QUERY_PING 9999
521
522 /** Representation of a single search result from a FindSession() call */
523 class FOnlineSessionSearchResult
โฆ
527 FOnlineSession Session;
528 /** Ping to the search result, MAX_QUERY_PING is unreachable */
529 int32 PingInMs;
Constructor seems to fill it
FOnlineSessionSearchResult() :
PingInMs(MAX_QUERY_PING)
{}
I could be wrong, but as far as I can see, the Ping is never filled
Which would result in the MAX_QUERY_PING to be taken
They are always constructing it like this FOnlineSessionSearchResult* NewSearchResult = new (SearchSettings->SearchResults) FOnlineSessionSearchResult();
And then only passing the Session pointer of that SearchResult struct if (!FillSessionFromLobbyData(LobbyId, NewSearchResult->Session))
Only part where they actually fill in the Ping is in void FOnlineAsyncTaskSteamFindServerBase::ParseSearchResult(class gameserveritem_t* ServerDetails)
// Fill search result members
FOnlineSessionSearchResult* NewSearchResult = &NewPendingSearch->PendingSearchResult;
NewSearchResult->PingInMs = FMath::Clamp(ServerDetails->m_nPing, 0, MAX_QUERY_PING);
But no idea what the difference between the class OnlineSessionAsyncServerSteam and OnlineSessionAsyncLobbySteam is and when which of them is used and when not
@BorMor#5075 @slim holly
Why can't I tag him
-.-
Thanks, I understand ๐
Does NetQuantize have performance impact when ran into huge bunches?
I mean the answer to that question is always "yes, depending on your definition of impact and huge"
the intention is that the time taken to quantize the values is made up for in sending smaller / fewer packets so you'd have to profile to find out if that tradeoff isn't working for you
You can probably make your own quantizer by just bitmasking and bitshifting your values
By cleverly considering what input data ranges there are and so on
That would cost you nothing
Hey all, I'm still struggling with an issue I have had for some time with my CharacterMovementComponent. When connecting from across the internet, the client experiences extremely jittery movement and the server constantly corrects the movement. It seems like the movements between the client & server aren't in sync. // This didn't happen before, so I must've accidentally changed something. Any advice is appreciated on what could cause this.
commonly issue that client tries to set actor location while server is doing so too
therefor server constantly corrects it because it's lagging behind, while in reality it's up to date
@slim holly thanks, but I found out that it was happening because CapsuleComponent was set to replicate. Disabling this fixed it. :)
I am interested in looking into making an in game purchasing system. Can anyone point me in a direction?
Does anyone know if the engine resolves SRV records in DNS ?
@thin stratus off the back of your question yesterday, what is the correct way to use ping in playerstate?
From my understand you shouldn't use ping directly if you want to display it, should use ExactPing instead right?
The thing why I'm asking this is
That the Ping in PlayerState (not the one in SessionResults) is in byte
You need to multiply it by 4 to get the actual ping
Yep, makes sense ๐
hmm I've had steam dedicated server working for forever. but when I upgrade to 4.15 it's not automatically copying over my steamclient.so file from D:\UnrealEngine-4.15\Engine\Binaries\ThirdParty\Steamworks\Steamv132\Linux to my built project. Trying to remember if I had to do anything to get that working. Anyone know?
(Linux)
ahh I see, I think it was the pull I was using that was copying that file over for me
thanks guys
Any tips for replicating ragdoll physics ?
Do you have to replicate ragdoll physics
Well right now if cilent moves a dead body, no one else sees it move
It even seems like if the host moves a dead body, no one else sees it
Frustrating interface issue: under Play-advanced setting, options that are only exposed when you un-tick "Use single process", "play as client" and play as "listen server" are retained even when you tick use single client and they are no longer visible, steam will not work unless you un-tick use single process and reset the option to use "offline",
Since when is steam working in PIE anyway?
when you launch the stand alone from within UE editor the above settings effect the stand alone, they shouldn't but do.
Sorry should have mentioned was using Stand alone, and the multiplayer options in separate section below it over ride stand alone. Selecting and deselecting an option in multiplayer options hides sub options, the sub options are still active but hidden, so if you forget you changed something here you won't see which sub option is selected.
Hey all. How can I track down why my Steam multiplayer sessions are not found by other players?
I had this working a while back, but now it doesn't work and I don't understand why
Are you sure you set everything up right? @ocean dust
@ocean dust i was just about to ask the same question.. it was working for me for the last month then yesterday.... not working. didnt change the code for that part and didnt modify the ini files at all. on build i get SteamAPI disabled!
@twin juniper No! That's kind of the point. How am I supposed to know if it's all set up right?
It's a tangled mess of plugins, .ini files, build scripts, and Steam magic
Well mine is setup right.. it was working the day before yesterday and none of the bits for that part changed at all
which makes it hard to figure out why it just stopped working now
the engine is kinda buggy all around like that to be honest. one of my character classes reverted to defaults of some things randomly as well on a failed build.... its really frustrating
Is the Steam matchmaking service down, perchance?
Yeah
I have mixed feelings about Unreal for these reasons
It's obviously built to be a professional tool
But some of the random bugs are perplexing and, quite frankly, terrifying
i doubt it... since yesterday.. seems unlikely it would still be down. the build failed because i did a LOT of work between builds and there was some orphaned variables being referencd. i cleaned it all up based on the logs. but since then my one char class was fubar'd... no explanation as to why... think i got that all fixed again but the matchmaking is also down
and i dont know if its related. but none of the code for that was touched and no reason to have edited the ini files. so I dont know what its problem is.
builds fine now. but. no matchmaking
Huh. Well, please let me know if you (or anyone else) has a reliable way of tracking down multiplayer session issues
you said you had yours working at one point?
Some time ago
But SOO much has changed
I didn't expect it to work this time around, but I want to know why it doesn't work
well not muhc has changed around the sessions handling really.. but i havent found a good way to test Steam match making in the editor if its even possible. I used to use my own tomcat server to handle the session listing.. started using the steam one a month ago.. its limited but it works (well it used to). Its pretty straight forward. So in terms of troubleshooting.. i donno. I upload the build to steam and then try it on two pc's. I know its passing through the create session stuff because its loading the map afterward. but the sessions aren't listing for others all of a sudden. not sure how to track that
"upload the build to Steam" <- what does that mean?
I've never done that
Also, are you using the Advanced Sessions plugin?
Oh. I have my game on Steam as an app. I upload the build there and run it from the Steam interface
Ya I am
hmm.. i might have just "fixed" my issue. I'll see when the build completes. Was getting an error that it couldn't load defualt online system Steam. I just deleted my DefaultEngine.ini file and replaced it with one from like a month ago (since it hasn't changed at all) and tried building again.. didnt get the error in the log this time
The log when packaging says Something like "cant load default onlinesubsystem STEAM using NULL
in the DefaultEngine.ini you specify the default system so i thought maybe for some random reason it decided today it didn't want to be able to read that file anymore
this was the error I had in the log. LogOnline:Warning: Unable to load default OnlineSubsystem module Steam, using NULL interface
do you have that in your log?
I guess the first question is do you have the Steam info set in your DefaultEngine.ini file to start with
Yes, I think so
as in: yes, I have changed my DefaultEngine.ini file
is it the right changes? I dunno.
Would be SUPER COOL if this was in an Editor interface somewhere
but that would be too easy
too many people would be able to easily make Steam games if they did that
I have this part:
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")```
Is that supposed to be under Engine.GameEngine or Engine.Engine? Or both?
is that ALL you've added to the default file?
no
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bVACEnabled=000000
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"```
Also tried SteamAppId=480 but that didn't seem to change anything
for the first line i only have it under
[/Script/Engine.Engine]
and yours works?
for the last month and a bit up until last night... yep
and maybe now too since still havent seen the error in the log
Hmm alright. Will have to try that later
the rest looks fine to me. i have more stuff but i dont think its needed.
did you add this [/Script/Engine.GameEngine] ?
because I don't have a section called that at all in my file
I'm using it
this doesnt work for you?
pardon the mess, its test code
๐
also, is your online subsystemsteam plugin enabled?
In the plugins browser? Yes
Also, I've slaughtered at least two goats
and said some incantation
but I'm not sure if it was the right one
JK!
Is there a way to browse the sessions I have open?
Lol try one more
To make sure they are being opened correctly?
no i dont think so
also just making sure, you know to test steam sessions you have to run the game standalone right?
not Play in editor
and you're testing LAN right?
what? no, Steam
steam sessions dont work on the same network
Well that's annoying
but no, that shouldn't be a problem
my other test account is testing from half-way across the city
so should be good
hmmm
did you try the bp i sent a pic of?
because aside from bVACEnabled=000000 and your appid my settings and plugins are exactly the same
and it works
hmm
steam is installed correctly to the engine right?
like when you open standalone you get the little popup in the bottom corner
Id suggest you start with the ini file before making any code changes since it was working in the past
Is it Engine.GameEngine or Engine.Engine?
Engine.Engine
I actually have an entry in both
Sorry no. Just the one. Maybe GameEngine was from an older version? I dont know.
Hi. Hopefully someone can help me. I try to experiment a little bit with multiplayer. I want to call the server for a different actor which I get from OnComponentBeginOverlap, but I always get a log LogNet:Warning: UIpNetDriver::ProcesRemoteFunction: No owning connection for actor FirstPersonCharacter_C_1. Function ServerReduceHealth will not be processed.
Example
yeah see it... but anyway it doesnt work...
also triggers should exist on server side
ServerSide
I mean ServerReduceHealth shouldn't be replicated
depending on the trigger, either use auth switch, or spawn it just on server
trigger = item in my case an axe?
oh so it's a melee weapon hitbox
then auth switch is the way to go
Guys, the online plugins, do they need to be engine side or project side now?
you can even use the remote pin from the switch for visual like blood particles and stuff
steam/utils/null etc etc
you mean the has authority?
yea
allthou, I would consider using traces for hit detection aswell
ok. This is currently a test
you might run into problems when doing particles for hits if you're just using trigger box
mkay
@slim holly It works now ๐ ty
steam mp down?
Anybody have much experience sending a UObject over the network via RPC?
I need to be able to send stored input data, but need to be able to cast structs etc and do templated stuff :/
@chrome bay, this code will work : https://hastebin.com/vonulonezo.cpp
if the UObject isn't replicated you will override the ReplicateSubobject function from the component
and explicity set this object has replicated by the component itself replicated by the ActorChannel
hmm but this is for a standard replication not for an RPC, well the code I sent will work I guess
Keep in mind the RPC replication use more resource than a normal replication
Yeah replication is fine, but for RPC's not so much. I'll have to keep working with structs for now
RPC is neccesary in this case
@chrome bay, Ok I will make some real test tomorrow, actually it's time to sleep ๐
np's, same here :p
Well good night !
Questoin regarding "Game Mode" in stand alone, or packed game does your game exist as server until it connects to a session run by another computer, and then your "Game mode" becomes unaccessable on clients? If so then functions/rules in game mode would work for individual computers during main menu set but fail once clients transition to Lobby level, am I understanding it correctly?
iirc GameMode returns null on remote clients
clients server copy of controller can still talk to gamemode
thanks, I'll have another play see what breaks ๐
i'm trying to get level loading setup in my map, but i have a question, if you have your main level and have a player that walks through an unload trigger when going to the next level. will level 1 despawn if other players are in it?
http://i.imgur.com/Or7FEPs.png
Would anyone know why player state variables are reset on server travel? (Not even talking custom data here)
or why ClientGameEnded would be called twice on the server?
PlayerState is not an persistent class over level transitions
Yeah not persistent but data does get saved over to the new one via Copy Properties, right?
Im pretty sure you have to invoke that manually, it doesnt happen unless told explicitly
Havent used it to be honest, i always figured it was something you had to manage yourself
Hmm interesting, seamless travel appears to call it for you. But when not using it, it doesn't
Yeah you can only preserve stuff during seamless or you'll have to manually save it
Using savegames and whatnot
Or just save it in the cloud somewhere and load it again once travelling is done
Dunno how well you can save instance references tho
You might have to save all your vars to a struct and save that
Hmm Seamless is working great, except for a weird bug I'm getting with UI on the server not appearing properly after the first time
I lie, it appears but construct isn't getting called on it for what ever reason
Just finished the huge multiplayer blueprint tutorial. I feel like a new man coming out of that one LMAO
@jolly berry And its just the beggining :p
woo! haha
Any good reads on replication that involves C++ code?
now I have to actually start replicating functions/variables that exist on my C++ framework
thanks!
has anyone had issues with non-seamless travel in 4.15? I'm using RestartGame and it's dropping my clients now (steam)
@chrome bay, Hey ! Well after some tests, we can't replicate UObject using RPC
Yeah I didn't think so... never mind, I'll stick with structs for now until I come up with a solution! Just means I can't make my movement stuff a plugin for the time being
uncheck bUseSingleProcess in Advanced Settings, then run
thank you ๐ forgot about that
hmm so RestartGame is working fine in standalone. But it's not working in my packaged steam game
@deep island does your steam auth pull fix something with travelling? https://github.com/EpicGames/UnrealEngine/pull/2135
Yes.
I was using your pull in 4.12.5 and RestartGame was working fine. But then I upgraded to 4.15 and I wanted to try out steam dedicated server without your pull at first (I'm not really using steam auth yet). But now RestartGame isn't working correctly. My clients are getting disconnected.
Yes I fixed something about that.
I see some changes in your pull around travelling. But it looked like it was only needed if I was using steam auth
I am using a dedicated server with steam, but I'm not actually on steam yet so I'm using 480
Are you using the other PR?
no I'm not using any PR right now
I wanted to try 4.15 ootb
because your pull isn't upgraded to 4.15 yet, and it looks like epic isn't going to merge it anyways
Maybe they changed something in 4.15.
I can find and join sessions just fine. And my game is working with out of the box 4.15. This RestartGame this is the only issue I've found so far. My clients aren't travelling correctly with non-seamless.
Anyway I fixed a disconnect problem because was send an old ticket, but if you don't use my PR, it's useless.
okay, yeah I wasn't sure if that was necessary since I'm not really using steam authentication right now
With restart, the clients send old parameters.
hmm okay, I guess I will try and see if that part is needed for me
with seamless travel the travel works. but the docs say to use non-seamless for end of game
not many steam people around huh
ShooterGame uses seamless travel for restarting the game tho
so I'm not sure why they say to use non-seamless in the docs for that
are you guys using seamless or non-seamless for restarting the game?
non-seamless was working for me before in 4.12.5, with the #2135 pull at least
but now it isn't in 4.15, without the PR
@rough iron any ideas?
Depends on your game actually
if you are doing party matchmaking a la gears of war then when you end a match you might just go back to your party
they do it for ranked games for example
you can of course just use a seamless travel if you are not using any type of party matchmaking, or just keep the players together
I did a mixed system for a PS3 game where I started using party matchmaking but for non-ranked games when a game ended we gave the option to maintain the teams
also using a non-seamless travel helps with any leak xD
you cleanup the mess xD
also it depends on what 'the end of session' is for you
I haven't implemented matchmaking yet. Currently I was just restarting the game and keeping the same players in the match. And non-seamless was working for that before.
for example if you aim for consoles and you have to send some data to the leaderbpards (live for example)
you have to recreate/rejoin a new session
I am going to implement matchmaking, but haven't yet. Right now target is steam PC
even on steam, stats are flushed at the end of a game
there is no hard written rule though
Hmm okay, well I do aim to support parties too. Non-seamless travelling seems broken ootb in 4.15 with steam tho
it's just dropping my clients and sending them back to the main menu
I'm just calling RestartGame() from the GameMode
the server travels fine tho
so im trying to work with a login system for my game. is it possible to be in my main menu level and have the editor run the mainmap as dedicated server? right now with dedicated server checked the dedi is running the mainmenu map so when i get a successful login it just connects me back to the main menu map lol
have any of you guys had the network profiler working with steam p2p? crashes the game every time i run the command
@dawn glen you can set the default server map
have you tried standalone?
yes
as a client?
the standalone dedi it starts says the map is main menu
did you run it as a client with use single process unchecked?
i have dedicated server checked with one client and sungle process
ok
change online mode to as a client
do i leave it this way if im quick testing in editor (not standalone)?
*multiplayer mode
no
idk if you can get two different maps loaded without standalone
thanks for the info
for some reasons its rebuilding my code lol
this might take a while
no difference. im in my main menu level with those settings and hit standalone and it ran the server in teh mainmenu map
[2017.03.07-16.39.14:357][ 0]LogWorld: Bringing World /Temp/Autosaves/Game/Maps/MainMenu/UEDPCMainMenu.MainMenu up for play (max tick rate 30) at 2017.03.07-09.39.14
hmm maybe you have to add the map as a parameter in "Server Game Options" in the advanced options
that seems to have done it. i get a nasty error when i try to load the map then it asks me to load default and works
Hm, i think that's not possible. You'll need to start the server with cmd and the map as a commandparameter
Pie always starts the map you have open for all afaik
@thin stratus i got it working, i can use single process i just had to tell it to use a certain map in the server game options. Then it complains the map doesnt exist cause its running out of some temp directory and a pop up asks me if i wanna run default map, when i hit yes it loads the mainmap and the client loads the menu map
your out of my range with that issue unfortunately ๐ฆ
hehe darn
Hey all, any advice on why Players start "teleporting" instead of smoothly walking when they are too far away from another Player? (using CharacterMovement)
actor relevancy / prioritization
I do have "Always Relevant" on, if that's what you mean?
If 'AGameNetworkManager' is set to use distance based relevancy, the Actor is relevant if
it is closer than the net cull distance
how far apart of the players?
about 200m and they start teleporting. The teleporting only occurs every now and then, especially when changing direction, at other times it's smooth.
what are your network conditions?
Do you mean the CharacterMovement(Networking)? I'm using blueprints
no I mean how are you testing this? are you simulating lag or is this a real network or what?
Real accross the internet, when simulating lag teleporting does not happen
and you have reasonable pings?
it's interpolating the locations, so it's never going to be perfect
The pings stay in the range of 60-100ms. What I 'd want is instead of just teleporting, it smoothly interpolates the positions
@rough iron yeah I pasted the logs. it says it's timing out https://hastebin.com/opesusayog.md
Could it be that you stop listening for some reason?
Or you have to nat-neg again?
When making a non-seamless trav you can specify to not notify the clients
hmm I don't see why it would stop listening, all I'm doing is calling RestartGame
void AFPSGameMode::DefaultTimerTick()
{
if (FPSGameState && FPSGameState->TimeRemaining > 0)
{
// Decrement time remaining by 1 second
FPSGameState->TimeRemaining--;
// No time remaining
if (FPSGameState->TimeRemaining <= 0)
{
// Waiting to start match
if (MatchState == MatchState::WaitingToStart)
{
StartMatch();
}
// The match is in progress
else if (MatchState == MatchState::InProgress)
{
FinishMatch();
}
// The match has ended and is ready to be restarted
else if (MatchState == MatchState::WaitingPostMatch)
{
RestartGame();
}
}
}
}```
That way you can search again for the session in case you need a new natneg handshake
Could you check if the restart goes through EndSession?
And CreateSession once the servee finished the travel
If yes you should research for the session
it looks like it goes RestartGame -> ServerTravel -> ProcessServerTravel -> ProcessClientTravel -> ClientTravel
Yes but check if the session gets destroyed
okay, I'm checking the server logs too
It could also be that the loading takes long on the sever
And results in timeouts
If thats the case the clienta should wait until they perform their travel
ahh I didn't think of that. this map has grown quite a bit
Once you got more info we can debug it further ^^
okay cool, I'm bring up the server now
These are the server side logs
the only steam line I see is the following
[2017.03.07-17.33.49:435][890]LogOnline: STEAM: Removing P2P Session Id: UNKNOWN [0x110000104F771D1], IdleTime: 0.033
@rough iron is that the session getting destroyed?
Yep, also your session does not a name
Could you create it with the name 'game'?
Try to set a breakpoint on that line
The callstack should tell you why its destroying it
Could be because the session is not the game one
how do i give the session a name? SETTING_SESSION_TEMPLATE_NAME ?
I used to set that property^ but they moved it somewhere that it wouldn't compile at so I commented it out
is that the correct way to set it?
When calling create/join session you can give it an FName
Just use 'Game'
Or all in lowercase
FNames are incasesensitive
ah I see, hmm I'm already passing it GameSessionName which should default to Game
GameSession->HostSession(UserId, GameSessionName, "FFA", "UnderDark", false, true, 4);
bool AFPSGameSession::HostSession(TSharedPtr<const FUniqueNetId> UserId, FName SessionName, const FString& GameType, const FString& MapName, bool bIsLAN, bool bIsPresence, int32 MaxNumPlayers)
{
// Get the Online Subsystem
IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{
// Get the Session Interface, so we can call the "CreateSession" function on it
IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
if (Sessions.IsValid() && UserId.IsValid())
{
SessionSettings = MakeShareable(new FOnlineSessionSettings());
SessionSettings->bIsLANMatch = bIsLAN;
SessionSettings->bUsesPresence = bIsPresence;
SessionSettings->NumPublicConnections = MaxNumPlayers;
SessionSettings->NumPrivateConnections = 0;
SessionSettings->bAllowInvites = true;
SessionSettings->bAllowJoinInProgress = true;
SessionSettings->bShouldAdvertise = true;
SessionSettings->bAllowJoinViaPresence = true;
SessionSettings->bAllowJoinViaPresenceFriendsOnly = false;
SessionSettings->Set(SETTING_MAPNAME, MapName, EOnlineDataAdvertisementType::ViaOnlineService);
///SessionSettings->Set(SETTING_MATCHING_TIMEOUT, 120.0f, EOnlineDataAdvertisementType::ViaOnlineService);
///SessionSettings->Set(SETTING_SESSION_TEMPLATE_NAME, FString("GameSession"), EOnlineDataAdvertisementType::DontAdvertise);
// Set the delegate to the Handle of the SessionInterface
OnCreateSessionCompleteDelegateHandle = Sessions->AddOnCreateSessionCompleteDelegate_Handle(OnCreateSessionCompleteDelegate);
// Our delegate should get called when this is complete (doesn't need to be successful!)
return Sessions->CreateSession(*UserId, SessionName, *SessionSettings);
}
}
return false;
}```
GameSessionName is defined here
Mhhh so set a breakpoint
But I'm not sure how I can debug this with breakpoints. I only get this issue in packaged game that is actually using steam.
Standalone PIE looks to not even really use steam and the travel is working
There are no sessions in pie, it uses the OSSNull
right, so I'm not really sure how to debug a packaged game
You can juat run the game in non package mode with -game
Then it wont open the editor
That should be enough
and then attach vs to the process?
Or juat run with that argument within VS
oh I didn't realize that was possible
^^
Hey guys, I'm having a really weird problem with steam session right now. I am able to create and join a normal session using the space wars steam id. But as soon as i swap out to use our own games steam id it fails to make any session. Any idea's what would be causing this?
Running from VS with the -game command worked and let me debug but I couldn't find any sessions. So I ran the packaged game instead and attached the debugger to the process
ah cool ^^
if you install the VS unreal extension the argument list is directly in VSs main view
ahh okay I do have that installed, but I must have hidden that at some point
it hit my breakpoint in the p2premove
not much help there yet
it's not hitting my breakpoint in ProcessClientTravel clientside
ah nvm that would be server only
I'll try ClientTravel instead
so the host is disconnecting the clients, but that is expected with non-seamless
@rough iron any idea what to debug now? I've been stepping through this and it gets disconnected and then it loads the entry map. Non-seamless is suppossed to disconnect and then reconnect right?
logs
@rough iron client: https://hastebin.com/iqolazovam.md
oh ignore the LogHttp stuff, that is for stat tracking. I just don't have the stat tracking server on right now
Has anyone stress test build-in character movement component? How much characters it can handle with 2 players network? I have encountered strange "lag" on client side with something around 40 npc characters around..
What is that stuff about @jolly siren ?
Steam + non-SeamlessTravel = Clients loosing connection?
@thin stratus yes
the clients are disconnecting and getting booted back to the main menu
I'm calling RestartGame but yeah it does a Server and Client travel under the covers
And I'm trying to figure out why it was working when I was on 4.12.5 but now it doesn't work (clients disconnect) on 4.15
Hm
Well if it works similar to ServerTravel
then this is how it is
ServerTravel needs seamless travel on steam
that's what I got told the past 10 times
If you have SeamlessTravel set to false the clients won't connect after the travel
I was using this pull on top of 4.12.5, and it has a little bit around travelling but not much. I'm not really using steam auth yet because it isn't public yet. So that's why I scrapped that PR (plus it isn't ready for 4.15 yet and epic isn't going to merge it anyways)
Yeah RestartGame is just a higher up function, it uses server and client travel underneath
I would accept that, however this was all working for me in 4.12.5
I looked the PR up and down and there isn't a ton around travelling that was changed
I can only tell you what I got told here. The PR shouldn't have anything to do with that
the PR was only for Auth stuff and Dedicated Servers
and I even got told that Dedicated Server + Steam should work without hte PR
yeah, I've been using RestartGame without seamless for a long long time now tho
The PR would just be for making sure a player is actually owning the game
Yes, it does. That is why I am not using the PR anymore, because I wanted to test dedicated + steam in 4.15
and it is all working fine
except for this restartgame bit
Did they change something about the RestartGame function maybe?
hmm I haven't checked that, I will look
Because that would be the first thing to check if that is doing something different now
All in all I still don't know if you can avoid Seamless Travel then
I mean Epic even says yo ushould use it as often as possible
ยฏ_(ใ)_/ยฏ
yeah I know, I tested with seamless and it wasn't dropping them. So I will fall back to that if I have to. I see that shootergame uses seamless for restarting the game.
This bit of the docs should probably be updated tho
unless I'm misinterpreting what ending a multiplayer game is
@sterile pebble Dunno about it's performance limits, but... this was done in UE4, the bit here about "Days Gone": https://youtu.be/Vztn6HPL_Z4?t=49s
I assume that's singleplayer, however.
... and I was definitely scrolled up to some old conversation and am responding super late to it. -_-
Either way, "Days Gone" probably has some serious custom optimizations to pull off that densely packed zombie swarm AI and on top of that is likely single player and unconcerned with needing to replicate so many NPCs positions.
@sterile pebble About 10-16 is a good limit, but you can go higher (see Unreal Tournament). paragon uses much simpler NPC's for it's minions, they don't use the full character movement system I believe.
In my UE3 experience with Smite, same thing - simpler behavior for NPCs if you're going to have a lot.
Even forgoing actual AI if it's dumb enough and settling for hard-coded, simplistic logic in an actor. But that's rather extreme.
@thin stratus yeah ServerTravel changed between the versions. And that makes sense with leaving the match all together
the PR also did change ClientTravel
I guess I will just change to using seamless and put some sort of transition map between restarting the match
I played a game yesterday, done in UE4
Which is Tiger Knight
Where you control a General on old Asian battlefields
And in one mode you lead 20-30 units that all fight on their own
And it's 6 vs 6
Which means at the start of the battle, it's like 360 units on the field
And it's not lagging for me
Another thing is, the Launcher solution they have feels weird
It just feels like UE4 is not made to be used as a launcher and the nlaunching a second version of the game to actually game
Transition is way too long. League of Legends for example nearly instantly boots into the loading screen
Funny you say that - the Epic launcher is actually a UE4 application. ๐
The Epic Launcher is Slate
slate isn't the game tho
I meant a gameclient that is used to chat, skill etc, and search for games
and then boot int othe real game
I'm not saying it's good or bad, just saying it's funny, because it is legitimately used for the Epic Games launcher.
Which, I think supports friends and chat too?
Well it does not support 3D rendered graphics
Not sure. I don't recall to what extent it's slimmed down. I digress.
Hi guys can someone help me ? Im trying to implement spectator mode in my game
This code doesnt work as expected :
// Start Spectating
PlayerState->bIsSpectator = true;
ChangeState(NAME_Spectating);
ClientGotoState(NAME_Spectating);
SetViewTarget(PlayerToSpec);
When a client try to spectate someone else, he successfuly goes into spectating state but his viewport is updated to somewhere random and not the player he wants to spectate
However it works well when the host try to spectate a client
I tried to add ClientSetViewTarget(PlayerToSpec); but it doesnt change anything
@jolly siren, @thin stratus I don't see why it shouldn't work for non-seamless travels, out of the box it might fail (it does on PS3/4). You just have to ensure to travel the server first, ensure the session is ok and then let the clients join. When you server travel you can flag it to not notify clienta, so they won't call their client travel directly. What I did (quite some time ago) was to use the beacons to handle all that extra logic. While you can just try to research and join again, juat make sure the server holds the playerids of all the clients to reject any new ones, you can even set a property in the data tbe server announces so you will find only that new session. Another issue might be tge size of the map which takes too long to load and then produces timeouts, to solve or atleast minimize that just use a very small persistent map and stream everything in non blocking fashion, that way you will re-listen in just a few seconds.
ahh okay I see, that makes sense. Yeah ootb it doesn't work anymore. I am switching to use seamless for now. Just figuring out how to clean some things up such as widgets that remain on screen after I travel
Good networking is extremely hard and requires a lot of effort
I would love to be able to share code and full implementations but all those are property of the companies I worked (and work) for
Makes sense, yeah it is hard for sure. Idk why it's one of epics smallest teams tho ๐
N8 for now ^^ just tag me if you need more help ^^
thanks moss! โค
Hey Peeps! I hope someone can help me cuz I'm already going bald pulling my hair over this ๐
I'll explain what I want, and what's happening.
So I have a pawn, that players possess on playstart. Now there is a map on the level. I wanna delete from this map, as the pawn falls down onto it
I did like, made a BoxCollision in the pawn, and made a lookup/delete logic that deletes parts of the map in a given range.
So I've hooked up to this event in the map to the pawn like:
In Pawn:
On Component Hit -> Cast to Map -> Call Event
The map is spawned on begin play by the server, and is replicated
So what happens is, no matter how I set this custom event, it only deletes under the listen server's pawn, not under the client.
The map is being spawned on SwitchHasAuth but has no owning actor set up.
So if anyone has an idea, please don't hold yourself back. I've been trying for days now... ๐ฆ
@raven viper The 'map' only exists on the server so any event ran there will ofc only be executed in the server. Set up a multicast and run the same code to all clients. Also fyi, the replicated option won't work in destroy as far as I know
Why does shootergame get the hud in gamemode? that doesn't make sense to me since hud only exists on client and gamemode only exists on server
void AShooterGameMode::RestartGame()
{
// Hide the scoreboard too !
for (FConstControllerIterator It = GetWorld()->GetControllerIterator(); It; ++It)
{
AShooterPlayerController* PlayerController = Cast<AShooterPlayerController>(*It);
if (PlayerController != nullptr)
{
AShooterHUD* ShooterHUD = Cast<AShooterHUD>(PlayerController->GetHUD());
if (ShooterHUD != nullptr)
{
// Passing true to bFocus here ensures that focus is returned to the game viewport.
ShooterHUD->ShowScoreboard(false, true);
}
}
}
Super::RestartGame();
}```
Anybody had an experience where multiple players in PIE aren't in the same session when you have a custom session class?
If I uncheck single process, works fine
@jolly siren Dunno, but that honestly seems like a bad design anyways, IMO.
Debating whether to rudely temporarily use the default game session class and see if that fixes it
UI should read things from other things, not be written to by the things it represents.
Almost anything visual should follow such a pattern - read from the "model", not be written to by the "model"
Yeah I don't understand how that can work
Oh wait I know what it is
I'm trying to clear the on screen widgets before I travel because it looks like seamless travelling leaves them on screen
It's for multiple split-screen players
Event driven isn't bad at all. It's extremely powerful. But that is not an example of event driven design.
hmm they must hide the scoreboard somewhere else for actual multiplayer then? because they have to hide it or it will still be on screen after you seamlessly travel
The problem is edge cases, I prefer to just tick UI's usually
For a simple enough UI, no big deal.
That will murder other things.
And this is where I'm not sure how much I can actually say or who I would have to ask about what I can say.
And probably no one short of legal would be willing to risk their neck by telling me what I can or can't say. ๐
ahh they are overloading PreClientTravel in playercontroller too
Well, for Sat Command I did a purely tick-driven UI. It was just a lot easier. (see http://store.steampowered.com/app/514670/)
Hovertank game UI is pretty much the same, but some stuff is event driven - e.g. end of game etc.
@jolly siren it's just my guess personally, but I think that's what it's for
IIRC, the player controller Client functions in ShooterGame hide/show scoreboard too
Yeah, they are hiding it in the pretravel for real multiplayer
Btw if you have VAX installed, there's a good shortcut to use (Shift + Alt + F)
Just put the cursor over ShowScoreboard and use the shortcut, all references to it come up
so you can figure out where it's being called from
ahh yeah I just use ctl + shift + f to search for things. I haven't paid for vax
If it works and isn't a bottleneck for you, @chrome bay, then that's totally appropriate. I'm just defending the choice to do (properly) event-driven UI, as well as vaguely adhereing to a view/model approach, where stuff like UI and animation depend on the thing they represent, not the other way around.
Thanks tho that was helpful. I had tunnel vision at that section of code ๐
Yeah it always comes down to what suits / is easier :p
I always forget that SG supports split-screen...
ermagerd PIE stop fucking with me...
yeah I always forget about split screen too
man seamless and non-seamless have a lot of differences. have to change a lot of code. postlogin doesn't get hit on restart, and tons of other things
it's going to take a bit to convert this to work with seamless
looks like others have ran into it too
This is more of a generic architectural question, but in an RTS game how would a pawn figure out if another pawn is an enemy (or belongs to another player)
normally the pawns have a player controller, which is tied to a player
but in this case, each pawn has it's own aicontroller and thus no real connection to a player
Hello all
I'm getting the error dlopen failed: dlopen(/Users/Shared/UnrealEngine/4.14/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/libsteam_api.dylib, 5): image not found
Where can I get that dylib?
libsteam_api.dylib Wild guess, Valve.
@jolly siren Seamless and non are two very different approaches, I do not see the need to behave similar. Just two different methods with tneir pros and cons. The guy in the thread talks about events when a map is loaded, those are already there in form of engine callbacks. Post login and PostSeamlessTravel already call a initialization method for each player on the server, so that would be the common point for your ini routines.
@hollow hatch You would need to save that by hand. Make a variable in the ai that saves a PlayerController or the rts pawn or playerstate of the player
Or use simple team ids
What is the use of ProcessEvent
function ?
The project I'm working on have this
Look at the process event function. Can you tell me why its been used ?
How to replicate aimoffsets smoothly?
the character class already replicates control rotation, which you can use to drive aim offsets. It won't be that smooth though. Not much you cna do about that
can always interpolate towards the replicated target
thanks @thin stratus , i figured there'd be some native support, guess not
@rough iron yeah, it's okay for them to behave differently. I'm just finding that I have to recode a bunch to get my game back to the way it was since I can't seem to use non-seamless anymore. When the game restarts now, i'm not sent to my character selection screen, hud elements are left over, etc. But I will check out PostSeamlessTravel and see if I can get it all converted.
Hi guys, I want to connect my client to Dedicated Server. My lobby server has loaded the map on game server , but the client is still connected to lobby only. How to fix that. An pointers please ?
@jolly siren ok ^^ let me know about your progress ^^
@desert breach you should be more specific about your approach, there are mutliple ways to implement a lot of stuff
yeah running into a ton of issues :/ things are working completely different and a bunch of crashes. Wish I could just have everything restart like it was on non-seamless. All this left over stuff is breaking a lot of things.
Yeah I know, net code is normally a thing to be very hard to put into later in development
well I had net code all working with non-seamless ๐
having some crashes where non-null invalid pointers are left over after the travel
and after travel I get a whole bunch of this stuff
Warning: CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)
and timeremaining stopped
and nothing is getting damaged
lol
that happens when the moved are not getting through
does anyone know what isn't called with seamless travel that normally would be with non-seamless? besides postlogin stuff?
not much, begin play is for object when they come in play in the maps, so it has nothing to be with travel itself
PostLogin is not called because there is no login process
neither is logout
objects that persist won't call beginplay again tho right?
like playercontrollers and gamemode?
I don't see why seamless would be good for RestartGame. I want to restart the game, everything from scratch
no
if you hold a single persistent level and steam all others in
you can just make a seamless travel to the same level and unload/load all again
I'm only dealing with a single level right now. I'm just trying to restart the game on the same level
but RestartGame seems to suck at it with the way my game is coded to work with non-seamless, it expects things to just restart
how do you "unload/load all again" ?
when I call RestartGame with seamless it's automatically spawning a pawn the next time even tho I set DefaultPawnClass to null. My game sends you to a character selection screen and shouldn't spawn a pawn until after the player selects a character.
Are you destroying the Pawns before you restart?
It might be that the PlayerController keeps the Character alive
Might be worth to try to just clean up the game first
that's what I think is happening ๐ฉ
I will try and figure out how to clean all this up, sigh
hmm well when I select a character in the first game I spawn as that character. and then if I go back to the character selection screen and select a different character it switches DefaultPawnClass, but doesn't actually change the character (which is correct). And then on the next game restart it spawns the new character that I selected. So it doesn't seem like the character is being kept alive
i am nulling out DefaultPawnClass in AGameMode::InitGame, AGameMode::HandleMatchHasStarted, and the gamemode constructor
I'm starting to think that non-seamless doesn't work with steam because it's using a relative url instead of an absolute one
actually nvm the travel url with non-seamless looks okay, it has the correct steam bits in it
Browse: steam.90107305280225282//Game/Maps/UnderDark?game=/Game/Blueprints/Online/BP_FPSGameMode_TDM.BP_FPSGameMode_TDM_C?Restart
looks the same as the one for when the map is first loaded, so it's not the url
LogLoad: LoadMap: steam.90107305280225282//Game/Maps/UnderDark?game=/Game/Blueprints/Online/BP_FPSGameMode_TDM.BP_FPSGameMode_TDM_C
guess I should just take this opportunity and start planning out my actualy matchmaking/lobby system
pls dont
unless you have 5000% understanding what makes a good match
just go for random
pick a random session that has room?
@jolly siren Non-seamless is not possible with OnlineSubsystemSteam
That's what I'm hearing. Even though I have been using it for years all the way up until I upgraded from 4.12.5 to 4.15
It used to work, could have possible been the steam auth PR
I read about it and tested it in 4.14 I think
yeah, it used to work great when I called RestartGame with non-seamless it would just disconnect my clients, restart the game, and reconnect the clients
made restarting the game super simple
nothing to clean up
RestartGame might be different then travel
no it uses travel under the covers
That's good to know, I've never used it
I always load the next game mode manually and I clean everything up within it
to restart the same level/game?
No I don't have to reload to restart
I reset GamePlayState and Score etc and respawn pawns
You want to load as little as possible for VR
ahh
So better to do all of that than load the same level again
gotcha, yeah I'm not on VR
what about if I do Game -> Lobby -> Game with seamless? it's still going to remember things from the first Game?
You should use beacons, that way you gain flexibility. Scourge: Outbreak (UE3 but the travel, beacon stuff is literally the same) does that, it also uses non-seamless for travels in the campaign when going from one checkpoint to another or from one map or mode to another in versus games.
Btw the netcode in that game is mine xD
N8 folks
I outlined the matchmaking system a bit in the wiki
It's pinned I think
Nope it's not xD ok n8 for real now haha
lol okay I'll try and find it
Quick question, Multiplayer servertravel lobby to first level type example, where to place logic for create sessions and join sessions? Game mode, game instance, playercontroller or game state? ... should be game mode right? my brain is melting after comparing conflicting information.
@rough iron I have this doubt. I called up host game function from Client side 'player controller' file. And then it calls host game function from gamemode pointer references, which is executing from lobby server. Server is getting this function called and loading the level. But client doesn't load it. Should I call load level from client explicitly ? Epic Staff some light on this please
@queen holly , @chilly basin @leaden bluff please guide me for the query above.
You should reading the docs about travels and level streaming
@rough iron okay
@fossil spoke ^^ Morning xD
๐ ah oh
Small writeup on Party Matchmaking => https://wiki.unrealengine.com/PartyMatchmaking
@thin stratus Could you pin it?
I read that a while back, nice write up, defs bookmarked it ๐
cool ^^ It needs some cleanup and bit more samples xD
Yeah was about to say, code samples ploxx
๐
I maybe in need to review it again soon
^^
is there any way to manipulate listen server tick rate? Like here -> https://answers.unrealengine.com/questions/236035/dedicated-server-tick-rate.html
or in case of listen server -> tick rate will be actually fps of server player?
/Script/OnlineSubsystemUtils.IpNetDriver] cant find such string in config file..
yes on a listen server the rate is the same as the host
and what actually happens if they differ? Like, host is running on 100 fps, but client only on 30?
I think I know answer..
Hey guys, is it possible to pass information to a server after the user has logged in? So for example my use case is when someone connects to the session, they have a variable that gets passed to the server so it can spawn an appropriate actor, for that connecting client ๐
I've looked at using playerstate but I think im looking in all the wrong places ๐
After GameMode::Login you just start calling your client/server RPCs for all your custom logic
I should probably point out this is for a blueprint project... sorry! ๐
@rough iron
I have a feeling this is not possible without some form of cpp wizardry lol
haha ๐
Use OnPostLogin in the GameMode and call Client/Server RPCs on the passed PlayerController
Looks like im gunna be reading for the majority of this afternoon again! ๐
@wise bridge as @thin stratus said, it's just RPCs
Indeed ๐ I know what I must do now, thanks guys! ๐
^^
๐ Quick question, I've got the player controller setup with the variables I need, in the gamemode BP, ive dragged off the new player pin from the OnPostLogin event, I can see my variable but it is doing this...
Its saying its a firstpersoncontroller ref, should I try making my own playercontroller BP instead? ๐
@rough iron thanks for the wiki link, I couldn't find it myself ๐
@rough iron Okay thank you ๐
I did a bunch more debugging on the non-seamless travel in 4.15 and I couldn't figure out where it is supposed to reconnect after the disconnects. Couldn't figure out why it was working in 4.12.5 with the PR but not 4.15 either. So I guess it's back to converting to seamless.
@rough iron Is this the correct way to get the variable's passed to the game mode bp?
Or am I seriously missing a trick here ๐
This is my player controller setup... am I just being an idiot? lol
So the check works but its using the servers check rather than the clients..... this is so frustrating lol
No idea what you are doing xD but you might first check @thin stratus s compendium and get a clear view on where stuff gets executed
most of the time the errors are comming from the fact that net roles are not a thing to peeps ^^
^^
@wise bridge it's basically all around the questions: Where am I? and Where should I run?
somehow seamless travel is causing imaginary player input and is causing a crash
๐ฃ
Never pressed the MenuRotatePreview button
But it's listening, try to check why you have it in the stack
hey devs. You know multiplayer in and out. I am looking for some suggestions for an overhead announcer for multi games
Can anybody think of commonly forgotten lines from announcers?
what type of game?
yeah but you guys develop multiplayer games
yes. voice pack
audio people would need to consult multiplayer experts anyways, so I would just end up here
I just want to get suggestions from you to make sure i'm not forgetting anything
really depends on the game type but..killstreaks, multikills, match time, intro, game over, etc.
i want it to cover fps and moba
mainly deathmatch, team battle, king of the hill styles of gameplay
Trying to replicate grabbing an object and it is only working server side.
@neon mango More info :P Code, what exactly are oyu grabbing? VR or what?
@digital sail Well, first thing would be checking out existing games
The Killstreaks, Match Time, Intro/Outro, "Teamkill", "Attack A/B/C" etc are quite common I guess
cool. Thanks @thin stratus
do the overhead announcers say things like "attack a/b/c"
Differs. Overwatch has these to announce the next attack points
Games like CoD/Battlefield might have the mto announce that a point fell into enemy hands
Figured it out
I needed to replicate few more variables and pass along the camera info from the clients
So I call basically ClientFunction which calls ReplicatedServerFunction
And that is for both Client And Server
So I have a question regarding rag dolls, will rag dolls replicate ok if no player controls the body?
It seems after setting a body to go into rag doll replication no longer works? But it could just be my logic.
Hmm looks like the mesh isn't replicating even though its parent capsule is
Its odd that GetMesh()-> has no replication bools
I'm getting new notification
LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//OnlineAsyncTaskThreadNull DefaultInstance///Thread_2b3c_0///####STATCAT_Advanced#### old //STATGROUP_Threads//OnlineAsyncTaskThreadNull DefaultInstance///Thread_9c8_0///####STATCAT_Advanced####
what is that?
something something async threading, but I've been doing widgets for past 2 days
what is the right way to tell on the client when you have started possessing/unpossessing a pawn? I see APawn::PossessedBy() and APawn::ReceivedPossessed(), but they only run on the server
I used to have a call from the server on Possessed
manually adding an extra RPC?
ah, looks like it goes through the player controller
and calls APawn::Restart and/or APawn::ClientRestart
Hey all, I'm trying to get sprinting to work on multiplayer. The code compiles fine, but nothing happens when I sprint. Could anyone look at my header (https://hastebin.com/bupafapeka.cpp) and cpp (https://hastebin.com/ugivodenuy.cpp) ?
@bronze lava I think you need to call ServerSprint from the client instead of ServerSprint_Implementation
ServerSprint_Implementation is what runs on the server once it receives the RPC
@fringe dove I'll try it, thanks!
change line 14 to: ServerSprint(_Sprinting);
It worked! Thank you so much, what a silly mistake that was
look at shooter game's sprint/run code as well, you probably don't want to have to wait on the replicated variable to replicate back to you or it will feel sluggish
Will do, thanks :)
yea a custom RPC @fringe dove
@modern fable I've done it that way in the past.. but there has to be a better way. The client knows when it begins possessing via an RPC already
But it is a very complicated chain of events from looking through the code
I asked about it here a minute ago, there is a Restart method that looks like it mostly is the right thing: https://forums.unrealengine.com/showthread.php?139247-When-is-APawn-Restart-called-What-does-the-documentation-mean-by-quot-usually-quot
I see
The other problem with adding an RPC is it can arrive before the pawn has been replicated over to the client if you are spawning at the same time as possess
Haveing alot of trouble storing data inbetween rounds. I have values like score/ round number that I am storing the game instance class. However I can't seem to replicaite them to the client so I can update the clients HUD with Previous Match Winner and Round Number
Bidwa, game instance is not replicated and only exists on the server. Have a look at the Game State here: https://docs.unrealengine.com/latest/INT/Gameplay/Framework/GameMode/index.html
Overview of the Game Mode and Game State
doesnt the gamestate values get reset after servertravel is called?
I need information that will carry over after one round is over
Yeah, I think the gamestate gets reset. Only thing that is persistent is game instance what I know of.
So save in game instance and sync it over to game state when needed? ๐ A bit messy but thats an easy solution.
from Exi's pinned compendium "The PlayerState has two functions dedicated to deal with reconnecting Players and also Players that traveled with the Server to a new Map.
With 4.13 released and my Pull Request accepted, these functions are now available in Blueprint Children of the PlayerState.
The PlayerState takes care of copying over the information, which it already holds, into a new PlayerState. This either gets created through the Level Change or because a Player is reconnecting. "
No mention of persistence for gamestate though...
Any thoughts on why my setting a position on tick isn't working for anyone except the local players machine?
I set the location of a SkeltalMesh to a players position on tick
when is the gamestate class created?
@minor anchor reckon you could pin that?
@true peak Gamestate is created once the gamemode has been initialised
๐ cheers
I'm randomizing meshes during the construction script of some level geometry, the client runs the construction script as well and so there's a difference between server side/client side. What is the proper way to deal with this? Have each actor update to client on login seems like a hack
so if gamemode only exists on the server, is it impossible to preserve torn-off actor on a client through the seamlesstravelactorlist?
ah n/m I see there is one for player controllers too
Hey all, I'm getting some steam errors while trying to connect to a friend's session. Have already enabled steam in ue4 and added needed info to .ini file. Getting these errors LogOnline:Warning: STEAM: Removed incompatible build | LogOnline:Warning: STEAM: Unable to parse search result for lobby. Lots more errors like this after it. We are able to see each other's sessions
Full log file here http://pastebin.com/N8UqNZ7c
So with 4.15 gameplay tags have all new features, but right now limited documentation. My question is in the Gamplay Tags advanced panel in the editor there is a fast replication option. If you hover over this option you will get a pop up message, at the end it states "For this to work, tags must be identical on client and server." What is an instance of how client and server wouldnt be using the same data table for tags AND how much should I really need to worry about using fast replication over standard use?
Hi guys, could really use some advice regarding character client smoothing, I'm using Move Component To for my vault system, it works great over multiplayer but the client is always a bit "flickery", i've made it much better by switching to custom movement mode and setting the max speed to 5000 but it still flickers a bit, anyone know a good way to get around this? https://gyazo.com/fd06be00d8dc184c82a3ff799976d1a4
its not overly bad now (used to flicker like mad) but would be great to have it as smooth as it is on the server
scratch that, it was the "ignore client correction" node i needed
Hi guys, setting up a little test multiplayer using blueprints and after much reading still a bit unsure of a couple of basics, during or after server travel do "player state" and "game state" reset their values and variables?
Yes
To maintain them you would need to use a SEAMLESS ServerTravel
And then handle copying the data with functions like APlayerState::CopyProperties(..)
ah cheers, that helps a lot, thanks, trying to put things in logical places for replication to avoid double handling ๐
hey guys so, steam vs hosting player login information locally
which do you think is better lol
like using a sql db or just hosting it on steam using their system
with steam i can do an automatic login, but with sql i can have more control over my players data (if they lose something or something gets corrupted i can always do a rollback for that specific player)
You were talking about hosting the data
Steam has a cloud per User and Game + SteamID
@twin juniper
ohh
@thin stratus so I could, in theory save my game data directly to their network? Okay, is it possible to just unpossess a pawn when the player logs out instead of destroying it (if i want people to loot corpses of players like in rust)
I know I could just call UnPossess() but if the client disconnects will that be enough to stop the server from destroying the player pawn?
ill just test it
lol
It technically should. There is no reason the Character should get cleaned up
You said that the oss for steam lets you use the players steam id right? So could I just store that steam id on the player pawn when they create their character and when they logout -> and login again I just loop through all unpossessed actors for the one with their steam id?
And possess that one
would that work do you think?
@thin stratus
Correct
by steam id you just mean their login right? lol like mine is : bdoom
or... is it something else? lol
because what happens if they change their steam url? you can change your url to a new one lol
wouldnt that technically just wipe their account data lol
How about you google steamid (:
It's a unique 64bit id or something like that. It's unique per account
anyone knows which source files I should look to find replication source code? I want to look how this happens in code, internally.
Hey, I could use a bit of fresh eyes/advice. I've wasted 4 full days now and can NOT get steam matchmaking to work after upgrading to 4.15. Was working perfectly fine on 4.14. I didnt change ANY of the matchmaking code, nor edit the DefaultEngine.ini file. I put the advanced sessions plugin for 4.15 in and enabled it. No errors around that in the logs. But when I package the game, create session always fails. The steam stuff works because I get the overlay up fine. I don't really know where to look anymore. It's been working for the last month without issue on previous engine version. I've been messing with the DefaultEngine.ini, the target.cs files just out of desperation because I'm stuck. I managed once to get create session to work, but then joining always fails. Right now creating a session fails. I didn't test this before making a ton of updates(since i didnt change this at all) on the new version, so restoring a 4.14 version that works STILL. Would be a lot of work too. Any ideas ?
@dusty sleet Enable VerboseLogging for the LogOnline (google), and then show us the log when trying to create a session
Also show us the code you use to create a session
is Steamworks updated for 4.15? @dusty sleet
@thin stratus I tried enabling the logging but when its packaged, where are those logs saved?
@twin juniper hmm? just using the SDK that comes with unreal
it installs into its own folder 4_15 with its own thirdparty stuff. I'm assuming it ships with the version that works with it? I know the latest Steam SDK is like 139 or something, and unreal is still shipping with 132
ah.. ive been building for shipping. I'll try a dev build now and see
most likely its going to place them on userfolder... Perhaps a commandline or flag is needed
Does it also fail in standalone mode? @dusty sleet
well, try the latest steamworks sdk maybe?
its VR... cant run in standalone
Of course you can.
oh?
Start via commandline
nothing is impossible ;)
except a successful upgrade out of the box ๐
hmm i cant try that now... lets see...
UE4Game directly isnt easier?
can*
I have bat files. /shrug
it takes about 30 mins to do a package
tip: you have to place /shrug first to have it appended last
I'm a mod here. You would think i know :P
@dusty sleet I can send you a bat file to start the game if you have a few min
Not on pc
And need a coffee
@twin juniper true, thanks anyway (:
yeah ill be here all night trying to sort this
im jsut making food too so ill be in and out til its done
appreciate it
tried -game -log -vr
hm
Ehm, is that actually compiled for 4.15?
this could be created since troubleshooting. ive tried loading it at the project level and at the engine level.. so
shows up in the editor and is "checkable" im using the installed version of the editor here
Probably a wrong version is sent with the packaging?
It might still need to be recompiled for new versions. At least i need to do that for my soundvis plugin
can i open the sln and rebuild the solution to do that?
If you have a cpp project, yes
its not exactly that simple
You would need to delete the binaries that are inside the plugins folder and rebuild them
Oh it is, as long as it doesn't produce errors
using rebuild in vs deletes the output
hm...
How about downloading the 4.15 version from the plugin creator
yea, double check your plugins are up to date
