#multiplayer
1 messages ยท Page 506 of 1
and all you need to do is following:
1 - server sets new combat mode
2 - OnRep function, which is just UFUNCTION() without any additions fires on all clients setting the boolean to match the servers
3 - inside that OnRep, you call a UFUNCTION(BlueprintImplementableEvent) void CombatModeChange(bool InCombat):
sending it the value of IsInCombat as parameter
4 - you replace that multicast node in BP with that EventCombatModeChange
and that's all, everything works
ok so part of why i got so stupid with my thing here... is... theres a need to make a client function that all it does is call the multicast right? to go from C++ to BP. i dont think u can make a BlueprintImplementableEvent that is on the server, so theres a go-between?
you can make one just fine
and server should call it separately whenever changing IsInCombat boolean, preferably from a function void SetIsInCombat(bool NewCombat);
as the OnRep doesn't happen on server
Hey team,
If i have a spline mesh that may end up extending for very long distances would I be better to split that up into multiple splines for performance or would keeping one actor be better regardless of size?
and is there anything else i could do to improve multiplayer performance of spline meshes that are modified at runtime and could potentially be very long
c++ or BP and how long is long?
@winged badger im a bit thrown by that last part.
which part?
are u saying CombatNotify and EndCombatNotify (the things changing the bool) should be run on server and then call another function... on the client? i dunno my brain just goes in circles with that part
and the "you can make one just fine" part. make a simple go-between function? or a multicast BlueprintImplementableEvent
ah, didn't pay much attention to those as they are largely irrelevant for networking here
Hey Zlo,
Blueprints, 8129x8129 landscape.
in theory could go around and around the landscape but likely never would
Spline pointed currently being spawned every 2 seconds of motion
I guess that is the better question. How many points should i limit the spline to before forcing a new spline
that is barely 300kB/hour
you do have a limit of 40kB per package tho
and one vector is 16 bytes
i'd leave myself a buffer there, so say 1024
How did you calculate that? Sorry i've only started learning unreal engine 3 months ago ๐ I would love to learn that. Any resources you could recommend lol?
That should be plenty though.
The only way I could get this working was by executing every addition to the spline mesh as a multicast but I'm assuming that there is a way I can instead run this on the client only and update the other clients every 'x' amount of seconds of something.
Is there anything you would recommend I take a look at to improve network and gameplay performance?
you can cache the spline points as vectors locally
after say 30 seconds, you send a Server RPC with an array of vectors
let the others catch up
Ohh yeah I think I remember seeing add spline as an array eh?
I'm pretty sure there is a node just for that lol but either way could set that up
for this, i doubt you need tangents and roll
I do have an issue with the spline mesh on hills. the mesh is always flat when i would like it to curve with the hill. I assumed I could fix it with one of those lol
Thank you for your help though ๐
i don't recall what function is called, but it does start with Set and ends with Axis
it basically determines how your mesh is layed out along the spline
or rather which of its up/forward/right vectors is running along the length of the spline
The only thing i can find is set forward axis in the details panel of the add spline mesh component node which is set correctly
aside from that
you can set points up vector to be the hit normal of the HitResult when you trace downwards into the ground from the SplinePoint vector
and you don't need to replicate that, each client can do its own damn trace ๐
Already got the linetrace happening on the client ๐
i mean when it gets replicated points from other clients
it can do a trace down to determine the up vector at that spline point, instead of having it replicated to it
if you're not doing that already
well right now im running a line trace to detect if the player is on the ground and if it is its adding the spline mesh point every 2 seconds currently so i was thinking I could just use that same line trace info
I found the nodes Set Location at Spline Point, Set Tangent at Spline Point & Set Up Vector at spline point.
Set up vector will do the trick i think?
Thank you so much I will work on this tomorrow when I have some time ๐ Now I can say I did something today lol
Hi , We are looking to create a mobile multiplayer, I am not sure which subsystem should i go for.
please help
I run the delete weapon server everytime i want to delete the weapon base of a specific character (the player's character), because if I don't the weapon base will float in the air even if the character blueprint is destroyed
however, if this script is run on the server player, it will destroy it on the server, but not the client; but if it is run on the client player, it will not destroy it at all.
pls help
sounds like the weapon is not replicated
wait you do a multicast for the delete?
just delete it only on the server and make the weapon replicated
does the pic of settings above count the weapon as replicated
do i have to replicate movement
i dont think you need movement
idk
i was following the blueprint multiplayer guide by Unreal
this is basically the OnClick of a button that switches characters
is there a function that can detect when a blueprint class is created
because this switch character is basically destroying the old class then making the player possess a new blueprint class
try a print text on the end of DestroyActor and see if it even get this far
alright
ok so the function is only running on either the Server or Client1, depending on who switches class
how the event is server only ?
idk the custom event is set to Run on Server Reliable
but it still only executes on the client that is switching blueprints
aka pressed the button
kinda looks like this at the moment
ok looks like rpcs dont work in widgets good to know^^
so you have to do it in the player
right
ill go and try that
wait so i threw this script in the parent player controller class
how do i access it from the widget now
get player controller
not sure but i think you cant do rpcs in the playercontroller class too
i would do it in the playerclass
do you have a parent for the players then you only have to do it one time
and now call it from the widget
this wasnt working
it will always fail cast
use get player character
ah alright
its running on the server now
thanks
#offtopic virtualbox can't do DX11 so virtual machine is out of the question? ffs.
no idea also not a good channel for this kind of question
@umbral loom Virtual machine for what purpose ?
@bitter oriole for multiplayer. so i launch one instance (on vm with second steam account), hit launch session obviously on spacewars id......... then I launch it not on vm in main machine, and see it in the list of games.
You'll probably need a second machine anyway at some point.
arg
i fully understand copyprotection stuff, i don't want random fks being able to copy my game, but damn this makes it hard to even test stuff.
๐
It's not exactly a new problem
so I guess my question is why can't that game launch in a win10 virtualbox instance
Because VB either doesn't support HW acceleration, or you didn't set it up properly for that
leaning towards the forward, I have it set up for 3d acceleration, and the error message is: "DX11 feature level 10.0 is required to run the engine"
which virtualbox doesn't seem to support no matter what is clicked. ffs. is there a free vmware I can use to launch the vb vm?
VMWare isn't free, no
Speaking of testing your build on 2+ different computers on Steam, does anyone know if it's possible to have steam auto update after you push the build live without having to close, wait and reopen steam on each of the computers?
Have found this to be a bottleneck when trying to test multiple builds
You can just wait, but restarting Steam is much faster
However, you don't need to push builds in the first place
You don't even need a Steam ID for your game
i don't have one of those friends with a vmware license. dag nabbit
No need for any of that
You do need Steam
But the Spacewar default ID works fine
Just have the game on two machines and run it with different Steam accounts, no packaging even needed
I've found it's actually way faster to download the ~20 MB update from steam rather than copy the whole file across
Ah so like the whole editor project?
And do launch game?
Whichever works best, but yeah
That could work if I duplicate any changes on both machines
would just depend on the complexity of the changes
Just push and pull in source control ๐
True! thanks!
why can't there be an easy test method for indie devs that don't have budgets for second machine or vmware??!!
Because games aren't made by one person alone
So no one really cares about that particular setup much
Besides, you don't need to test the Steam callback setup every day of the week
And multiplayer games need, well, multiple players for much of the development, so naturally you have multiple machines
I have, alone, done that. def not every day of the week that's true. i don't want anyone else to test it until I know it works.
You'll need playtesting all along the development so find a close friend to test it
No one said that
But UE4 is absolutely not made for single developers by any stretch
iirc the last huge ass game that was shitty and sold big was .. what, angry birds? made by how many ppl?
you're right
Angry Birds was no solo effort by any means
The closest to solo that still was a hit game is probably Stardew Valley
A single-player, pixel-art game that was like 7 years in dev
disagree
On what ?
It sold 3.5 million units
shrugs
god i wish i could make something that sold that hard at $2 or even $20 or $59.99 a copy.
Steam's average is less than 1,000 copies across all titles
So don't hold your breath
I'm not.
Hey, I've reparented my Pawn class to the Character class, and I notice that the mesh component on simulated proxies zeroes out the rotation every time they move. Anyone familiar enough with the Character class to understand why?
does the rotation get moved to the parents?
The parent of the mesh (the capsule) doesn't have any rotation in my game code, if that's what you're asking. I only need to replicate the movement of the character, not the rotation actually
sounds like the rotation handling is undefined and defaults to zero.
Here's an example. The character on the left is a client. The rotation is controlled by how they aim, hence why the rotation doesn't need to be replicated. But once the client moves, and when replication occurs I suppose, the mesh rotation is zeroed out, somewhere in the Character or CharacterMovement code.
Hey. What are the best resources for learning to make a multiplayer game with UE?
The pinned Network Compendium, Shooter Game, Unreal Tournament, and everything else pinned in this channel
Today I learned about the pin button. ๐ Thanks!
np ๐
@hoary sandal that should work.
@dark edge it doesn the only issue is that the the value is not the same for the two meses
Hi
@hoary sandal not the same on one client or on all? As is it won't be the same across the network as you're running the random everywhere. Run it on server to set a color and use repnotify to apply the color.
@dark edge I have two meshes one for the hand in first person the one the player sees and one for the player 3rd person, I basically want the same color on arms and body, but different between players
@hoary sandal you gotta generate the random color on server and use it everywhere. Use RepNotify to apply it.
ok going to try that thanks ๐
@dark edge new to rep notify so I just wanted to make sure I made it right https://gyazo.com/de77d9837038f5d62a8468e6d9113778
That should do it.
yeah it does work thanks again I didn't imagine it being so simple ๐
ohh can I ask you one last thing, we are trying to wrap up the game for the mega jam here
I have this small inventory system, once the client uses the piece it would destroy on the server as intended but the client still has the widget
has anyone else experienced worse connection quality with Steam recently?
before I could connect to a lobby session in 3s, now it takes 20s+, and a ton of packet drops etc. I even tried an older build of my game which was fine, is also now super bad at connecting etc.
In my game, the server totally manages the array of item slots (struct)
And i use RepNotify heavily
I use repNotify on that array of item slots and trigger a refresh event on the client.
So then the client can call methods like requestEquipItem or request SwapItemSlot to move an item to a diff slot
And then the server actually does all the logic and checking, and then edits the array, and then RepNotify triggers and the client gets the new array from that and rebuilds the UI
That way cheating is prevented too of course
The client has a limited API if you will
(Those 'request' methods are repped to the server of course. )
@ebon bramble how to you make it so the repnotifies only go to the people affected?
So it doesnt spam in a massively multiplayer setting?
In the replication conditions? I never knew how those worked
And make that InventorySystem component be a subcomponent of the character actor
Cool :)
What does its component-ness have to do with replication in this context?
Oh because owner
It doesn't.. just that if it's owned by the actor and the actor is owned and possessed by that player then
Yea
Ownership
It knows who the owner of the connection is vecause it is a component righr?
Yeah it just worked for me. I guess all components of an actor inherit ownership of the playerstate that owns the actor
Something like that
So then the rep condition knows to only rep to the player that owns the actor that has the component
Sonething called outerchain?
Yeah I don't know all the details I've never had issues related to that its just worked and been mostly common sense, intuitive
Seems like it does a good job guessing ownership lol
In c++ people talk abour Owner in terms of climbing outerchain whatever that is
@ebon bramble do you feel like RepNotify is the preferred way to do things if possible? I'm thinking it is, although it sometimes is picky about structs.
Yes unless you want to get into C
Well you can also use explicit method calls but RepNotify is convenient and reduces verbosity . It only reps what it needs to do the most part .. deltas
You can always optimize more in C im sure but there can be significant time investment there, trade-off . I don't know C well
You are right in that repping arrays of structs can cause issues unless the structs are small . Keep them small w no substructs
I've had a twenty second lag spike because I was an idiot and repped a giant nested struct array with like 50 fields lol
Refactored that real quick
So my item slot struct is like 4 primitives
Itemname, quantity being two
so in bp how do i make the server switch/restart a level
witout kicking everyone on the server
tried servertravel
i activated seamless server travel in the gm
@worthy perch
so do i use execute console command?
Any body have any idea how I could keep track of racing placement in a multiplayer racing game
Removed incompatible build: ServerBuildUniqueId = 0x00000000,
anyone know what causes this with steam?
@nocturne prism spline is probably the approach.
spine?
Landing page for Blueprint Spline and Spline Mesh Components.
I would use a spline to build the track, then it should be fairly easy to project car position to place along spline.
Or you can just use collision boxes if you just need time splits and not constant position
Ive seen the collision box approach I don't really think I need the constant position? any pros cons to both approaches?
are there alternatives to steam for onlinesubsystem that can be implemented relatively quickly?
why is this not working? keeps saying i am missing the body
Hello guys I have problem with a list of connected user. I have made the list in a event tick because I wanna add late the ping, but the array don't stop e create every second the same player. I need to be sure in the list there is only unique user name.
Any one can help? Thx guys ๐
you need to clear verticalboxcenter at the start of that
if you want to go with that appraoch
recreating player list on Tick is pretty terrible
you can setup a notification system, even in BP, for when a player joins/leaves
and if it looks empty, its because you're doing it on Tick
what is the best place to learn server optimization In mobile games because from the looks of it even the character movement is giving me a pain
in a LAN game
does anyone have any tips on what I should look out for fast paced game networking and some links to helpful stuff :/
thanks in advance
well its not just jitter
its a problem with the clients
i didnt even touch the CMC tbh
and vanilla version is very bad at it in mobile
what are some tips to avoid this, or should I just try to go for a custom CM
@winged badger thx. Where I put the notification? In the game mode? Sorry I'm new on ue4 and programming
@twin juniper describe the problem exactly so that people could actually help you :)
Client Inputs AddMovementInput as usual and server doesnt respond very well
only replicating movement takes 4 kb/s
and AWS recommends 2kb/s for mobile games
I am not using AWS but
even if only movement takes 4kb/s
how should I get around it
my problem is when I join my session on a phone from another phone
4kb/s is just the default minimum amount, I think.
You can lower your minimum and that should probably get your 2kb/s if you have nothing.
I don't know why there even is a minimum.
there is too much packet loss
and character moves like 2fps and its not even smoothing
even tho I played around with the network properties of CMC
you're not sending any reliable RPCs on tick, are you?
no not at al
just to test it out
I shut of all of my inputs
and stopped replicating all my components
only movement input is there
and yeah
and let me try it on a vanilla template
yup
its still there
I was expecting it to not
but yeah
im using 4.23
just open an empty project
and set play mode to listen server
and an extra client
and watch how the client moves on the server
@twin juniper Any specific settings I should test with? Two characters look very smooth, with Net Update Frequency reduced from 100 to 20
humm I just did it with complete defaults
let me try with 20 tho
thanks
umm
it does look smooth on local but other clients are seeing it weirdly
I just reduced it to increase chances for jittering, but I'm not that experienced with network settings
I am not experienced as well I only know the idea of writing my gameplay code in multiplayer
never got into advanced optimization tho
Hmm, what I see isn't jittering, but it does extrapolate the movement on the simulated proxies, then when stopping it has to go back a little
that is there yeap
If the packet loss is too much (bigger than 10%), the available bandwidth is too small and RTT is significant, you won't be able to do much about it as that is textbook bad internet conditions.
well there are too many computers logged in to the router
im in an office
but surely it should not affect that much
Single process in editor with 2 or 3 players looks ok?
you dont use single process
I'm in an office with 30+ computers too, but good internet at least
mine is ok to in single process
@twin juniper the emulation is fine on NullSubsystem as long you don't use statics
@twin juniper oh cool
but I also tried it
after packaged game
apk to mobile platforms
and its still there
If you are using WiFi, I expect a lot of packets to be dropped no matter thr signal strength
even through LAN connection ?
Have you tried Client Authoritative Movement enabled? Does it help? (You shouldn't ship with it enabled)
well
I saw that and tried
didnt notice any changes at all
I thought it would fix it since it would use client location right ?
nope
LAN should be ok, especially with Client Auth enabled. Never seen those happen..
let me get back to you
in a few minutes
I will try it in a packaged build :/
um
What's the listen server's or dedicated server's fps / tickrate? Maybe it does a lot of late updates or has a jittery update (time it takes)
Yep, those too
I usually set them from an .ini and I think it was also some kind of floating point threshold to be set or else it still won't let the client be authoritative (set it to 999999.0f). Can't remember for sure the variables name.
Do some tests and come back to us :)
sure thanks
Alright, so I'm stuck on an issue. On Character, the rotation of the mesh component (and capsule for that matter) is reset every time movement replication occurs
I have a lightweight example project to demonstrate the issue. Anyone experienced with this?
What do you mean "reset" ?
@rain coral that going "back movement" mentioned by you a while ago sounds like mispredicted extrapolation probably. I don't know if it can be disabled / enabled. Maybe some other guys know. Didn't notice it in unreal, is there something like that implemented in CMC?
Well put a memory breakpoint on the rotation and see from where it gets overwritten.
It's not interpolation
@bitter oriole It zeroes out the rotation. So in my example I've rotated the mesh, not the root. When movement replication happens, the mesh is set back to (0,0,0)
Are we talking about the local rotation of the character mesh ?
@supple basalt That wasn't an issue I presented, more a note on what I noticed when trying to help unrealemir figure out his problem. But the docs say that the simulated proxies are extrapolated
@bitter oriole Yeah
@rain coral oh ok, I see :) regarding to your problem, I usually use memory breakpoints to get a callstack on the problem. Else it can be really hard to track it down. If you are using BPs, R.I.P..
If anyone want to see what I mean. A, D keys for movement, press spacebar to rotate the mesh, then move again after, and the 'other player' will be reset. On the server it's constantly reset
@supple basalt I can't breakpoint the Character source code though, don't have the debugging symbols for that part of the code. I do use C++, but in this example project it's blueprints
Ahaa
or DevelopmentEditor, its just better to use Debug
If the mesh is the root mesh, there is no way to do this
Ok. Epic doesn't recommend BPs for large projects and never for multiplayer, it's in their "BPs vs C++" article in the online docs. The symbols are large in size, but they are really worth it.
You should handle rotation in the CMC
And please don't listen to that stupid advice
Epic uses Blueprint heavily in large projects
yeah, but backbone is always c++
Sure enough
if you are manually altering rotation client side
and haven't RPCed that to server, or incorporated it into the FSavedMove
that is what i'd expect would happen @rain coral
@bitter oriole I was just telling what they are telling us, didn't want to offend anyone :P
I use C++, so the BP vs C++ isn't relevant to me atm ^^
@bitter oriole It's the mesh that is included with the Character class. Handling rotation in CMC, do you mean that it has its own pipeline to rotate the mesh so to speak?
@supple basalt I doubt the documentation says Blueprint are unsuitable for large projects
@rain coral Root mesh rotation is effectively the actor rotation
So yes, CMC updates that every single time, by design
It can't work any differently
The rotation of a main character component is a gameplay concern, it's handled by CMC internally and you should drive that from the player input
What I'm trying to do essentially, is rotate the bird in the bird cage, but not the cage. It seems strange to me that the bird's rotation in this metaphor should be forced
Quote: "Network Replication: Replication support in Blueprints is straightforward and is designed to be used in smaller games or for unique one-off Actors. If you need tight control over replication bandwidth or timing you will need to use C++."
What's the bird cage in this scenario ?
The actor
As I said, these are recommandations, they don't say BPs are bad, we are using them too when it makes sense :)
@supple basalt Blueprints work perfectly fine with multiplayer and are use extremely heavily by Epic
Of course you won't write character movement in BP
But don't recommend not using BP in large projects
We mostly use them for UI and for leven design / data driving the mission scripts.
@rain coral You can't have different rotation on actor vs root actor component.
But not for netcode.
If you need an additional mesh that doesn't rotate, that's easy
But I somewhat agree with you, there is no right answer.
You can agree as much as you want as long as you don't tell people not to use the main engine tool ๐
Heavy usage of BPs with no best practices taken for them can be bad in the long run though.
Anyway, blocklist and life goes on
A Character is structured hierarchically like this: Root (Actor) -> Capsule -> Mesh
The mesh isn't a root component in this case. Seems like the Character component shouldn't concern itself with the rotation of the mesh, only with the root
Main engine tool, haha.. ok, whatever. Didn't want to upset you, I'm sorry ๐
In this case it is weird that it resets rotation
You do use the Character class too, right ?
I have uploaded the example project if you have an idea what causes it.
Yeah I use the Character class here
An alternative could be to rotate the Actor itself. But I don't need to replicate rotation in my game, it can be calculated based on something else that I replicate. So if I were to do this, I would want to bypass rotation replication altogether. Somehow?
its not really weird if the flow is:
1 - client uses input to adjust rotation, but not via CMC
2 - client doesn't RPC new rotation to server
3 - client moves via AddMovementInput, server still considers original rotation to be correct and overrides the client
The easiest fix is to disable rotation inheritance on character mesh
That way you'll control it all the time
@winged badger In my example, the rotation is RPCd, but it's overridden on the server's simulated proxy. You can see it rotating for a frame, then snaps back.
@bitter oriole Aha, rotation inheritance on the character mesh sounds exactly like what the issue is. How do you disable that?
@bitter oriole Isn't this just for setting the rotation in the editor?
No
The issue persists
If the issue persists, then the character class is controlling the mesh directly
Yeah, I'm quite sure it does, behind the scenes. It's quite rigidly designed in that regard
But let's say that this is bound to happen. Can you think of a way to skip replication of the actor's rotation, when I use the CMC replication? The rotation can be calculated on the client, and I want to spare the network traffic
You can do this by either modifying the CMC in engine source, copying it as a new class and reimplementing Character/CMC yourself with modifications, or working around it
Alright, I'll try to figure out a way to reimplement this then.
Thanks for assistance =)
Any idea how does one go about stopping the player from WASD movement from server side?
Probably want to explain that question
@ember slate call DisableMovement on the CMC.
ok possible dumb question, im doing a line trace from a weapons muzzle (socket) currently to be the projectile, but when i go to shoot (dedicated server with client holding the weapon) the line trace goes straight down. out of curiosity i printed out the Z axis of the socket on both the client and server and they are very different, the client is correct at like 300-450 depending on where im at, but the server shows -300/-450 depending on where im at. if i play as the server the line trace is correct, starts at the muzzle and goes where it should but its only if dont have the player as a server that it messes up. the weapon is attached by the grip at a socket on the characters hand, any idea what the cause could be?
FVector MuzzleLocation = MeshComp->GetSocketLocation(FName("s_muzzle"));
FRotator MuzzleRotation = MeshComp->GetSocketRotation(FName("s_muzzle"));
FVector EndLocation = MuzzleLocation + MuzzleRotation.Vector() * 1500.0f;
UE_LOG(LogTemp, Warning, TEXT("ACTOR HIT: %f"), MuzzleLocation.Z);//shows different on server and client
the X axis is the same on both
yep the Z axis for the character and weapon is the same on the client and the server, it just seems like its the socket location's Z axis that is off for some reason which makes 0 sense as everything else is correct
its possible as i havent updated it in about 2 months, never had issues before though
for example (the line trace visible is the client), the 200+ z axis is client, the 160 is servers, server is detecting hit with the floor
https://gyazo.com/f40c5fcf9b0be614a00d34d97734009d
Hello,
I'm trying to send large arrays or FTransform through an RPC regurlarly. When I do that, new players cannot spawn in the game. If I reduce the array size to a small number (5), everything works fine.
What are the limitations and what logging should I enable to debug this? I do not get any errors on the server or on the clients of why the player did not spawn. If I debug the PlayerController, the ClientRespawn receive a nullptr Pawn.
Is there an Engine.ini configuration that I should make to make this possible?
Thanks
How large?
Nothing wrong with that code @ocean geyser
As long weapon is in same position
It works
any thoughts? i raised the socket up by about 500 units in the engine and tried again to see the change in the Z axis, the client is correct (at a little over 700) but the server showed it as 240. its like it cant keep track of the Z axis, it also never seems to change as it moves slightly during the breathing animation so as long as you dont move the value never changes on the server, idk what the heck its reading from but its not right but the X axis is correct
Aim offset animation applied only on client?
no aim offset currently
Or broken compiler, print location and rotation of the socket pre trace to find out
when the player picks up a weapon it changes their animation but its visible on other clients due to a replicated variable. i think you just solved my issue though, its probably using the old animation(arms down by the players side) on the server
server not playing animations
server will be in T-Pose
or A Pose
verify Visibility option in skeletal meshcomponent
i don't trace from the servers position, i have the client send in the position, cause i don't want to play animations/adjust bones on the server
@Zio 70 transforms
That wont break replication
Transforms are not ideal for replication though, as you sre sending scale as well
@Zio Is there a LogCategory that should print my spawning error. I sent only translation and rotation and I got the same thing. After a certain number of it in rpc, the other clients could not spawn.
@meager spade found the issue, in the animation blueprint i call a c++ function that checks whether or not the player has a weapon (the weapon variable is replicated so i just do a nullptr check), if the player has a weapon then it sets a boolean in the animation blueprint to true which makes it go to a different set of animations like this. this works fine on all clients as they can see the change but the server doesnt. the only time it works correctly is if i have the server be a client as well, if the server is also a player then other players can pickup and use the weapon like intended, but as dedicated it just fails
@ocean geyser so it breaks only on dedicated?
correct, the dedicated server think its playing this so its shooting straight down
https://gyazo.com/7598ab45e476c01aa74b59fb5a476cff
but the clients see this
https://gyazo.com/94010d0c37898e37d076dc947c0fb78c
Is the MeshComponentUpdateFlag set to AlwaysTickPoseAndRefreshBones?
testing now, it was not
You could enable it on the dedicated server and see what happens
negative, same issue. i think im just going to go from the clients muzzle position for now, not sure how easy that would be to cheat though
could pass in the transform from the client, check and see if the location is within X range of the servers
that way people wont be shooting from wherever they want
Either way you need to fix the animation on dedi
yea. still have 0 clue what the heck is going on with it, the server knows there is a weapon in hand so idk why it doesnt seem to change what animations its using
Most FPS allow client auth shots, as the game feels more responsive that way
If you are doing the logic in C++, just breakpoint the dedicated server and see what happens with that boolean.. is it ok?
Those that cant do quality valudation are swarming with hackers
hold on i think im about to attempt to fly out the window, think i forgot to do something
wait nvm -_-
Fortnite uses passed in locations from the player
but it does checks to ensure its within valid tolerances
Battlefield also. They can always run aimbots anyway.. :)) but not on consoles.
anyways, i have a weapon actor and an OnRep variable (a reference to the weapon) so when its null i have a function return false (meaning player does not have a weapon) and when its not null it returns true, this functions is blueprint callable and called on the animation BP to set a HasWeapon boolean in the animation BP so other players can see the change in the players animation who picked up the weapon. i dont have a replicated bool as that would just be something else being networked and this seems to work fine on clients but not on the dedicated server. literally any other scenario is fine. i think im going to stick with going from the client and doing checks to make sure that the client isnt trying to shoot from out of range if that makes sense
It does not blindly accept: the server does a lengthy verification to prevent cheating. This is more the area of the anti cheat team so I can't really give too many details. High level, its checking things like rate of fire, max number of targets, distance and angle to hit target, etc. It does do a trace but its more for ruling out impossible shots / penetrating buildings ("yes you could have hit that") rather than authoritatively deciding what was hit ("based on my view of the world, this is what you hit").
from dave ratti
not to shabby
so my guess is (with fortnight) the client sends the line trace and if it makes a hit the server checks to see if the start position of the line trace if within tolerance of the players muzzle(or wherever it comes out of in that game) and checks to see if the end position where the hit was made is even possible (such as no trees or anything blocking the hit)
welp i will be rewriting to go that route
that is how i do it
i use gameplay abilities aswell
and i use the same method fortnite did for there hitscan weapons
but it all depends on how many players you want
like fornite did it that way cause to have server animate and transform bones for 100 players
would be expensive on the server
I have a blueprint that attaches a weaponbase to a characterblueprint by making it a variable EquippedWeapon inside it.
The weaponbase has script for firing inside of it, including raycasting and particle effects and sfx.
Currently, the raycast result seems to be printed accurately from both the server and client. But the particles and sfx only exist on the player who fired the weapon.
However, how do i make a firing system that requires the client to call to the server, then it executes on server, and still calls the hits each respective player correctly
Id set the owner of the weapon to the player who is holding the weapon to make RPC calls a little easier. might be worth having a OnRep boolean that toggles true/false each time you fire with a function that plays the effects and such each time you fire (with exception of the client that fired) so the effects and such only happens on clients where the weapon is relevant. not sure if this is correct but just a thought
if its a small game you can probably multicast just fine as you wont have players 60 miles away needing to know that another player fired their weapon
uhh how do i do the multicast
can you teach me on this a little
my method of firing is a bunch of script in the character blueprint and calling in a function from the weaponbase
@ocean geyser
create an event, under replication set it as multicast. multicast events need to be called from the server so you would also need a server event to call the multicast event
so client left clicks, calls server event, server event calls multicast
thanks! do you know how to replicate the particles and sfx too
you respond to either a multicast or a callback that someone is firing
you do not replicate either
not sure with particles, but for example when i animate the weapon (such as the bcg cycling) i multicast it so all clients can see it
as the asset is defined on the weapons CDO, so you don't need to
but the other players arent seeing the particle effects
they will if its multicasted, it will run on all clients
whatever you do to replicate the shot itself @viscid bronze
can be used to trigger the particle effects locally
you just need to know when to show them on simulated proxies, everything else is the same
but i already put this infront of my fire event
the particle effects are inside a custom event called from the weaponbase though
thats the vanilla input->server-multicast setup
also doesn't show the relevant parts
okay
This is where it connects to the custom event
In WeaponBase : Custom event fire
In weapon base : custom event fire part 2
pt 3
@winged badger
GetPlayerCharacter[0]
seems like the culprit
you start firing then some other player checks his character for IsAiming... etc
not your character, his
Do you guys have any cool blueprint muliplayer resources (other than the standard Epic games playlist to make a simple multiplayer game using steam?
best stay away from GetPlayerController[index] and GetPlayerCharacter[index] until you know exactly what they do and when its safe to use them
they are not required
check pinned messages on this channel @indigo brook
Will do @winged badger
there is always a... relative relationship
if not you can always make one
weapon is attached to the character? GetAttachParent or something similar to it
i have a replicated pointer to my OwningCharacter on the weapons
that i set at the time of spawning the weapon
how do you do that
also if i use that vanilla input-> server-multicast setup
if the other player has the same character class it fires his weapon too
the RPC arrives on a correct instance of the character
but then when you handle it
you're checking the variables in the wrong one
okay how do i fix this though
sorry if this is stupid i am pretty new to unreal
@winged badger
get a relative reference from weapon to the character
not a static one, as those don't work in MP
there is a node that lets you get an Actor the calling Actor is attached to
that works
GetAttachParent or some such
this?
that should work
note: i am not certain that is the only error, as you have non-replicated IsReloading and CanFire too
that might not allow for execution to even come this far
(that should work as long as weapon is attached to the character)
still dont work though. maybe sth to do with this?
hello, im trying find something related to database integration with server for ue4, does someone can recommend me some solution?
as long as weapon is replicated, it will replicate the attached owner
Yeah its set to "replicates'
How to locate client 2 in a session?
player array
client 2 should be the second element of the player array
But where to find this array ?
gamestate
OK thanks
The player array has only one node get but no set
There is no other way to do it?
you only use it to get the player array, you dont set anything to it. you really need to stop with the multiplayer stuff for now. youve had some very simple previous questions that could be solved by anyone with moderate experience with UE4. stop with multiplayer, stick with singleplayer stuff until you get more experience with UE4 to where your comfortable and have learned as much as possible, then consider multiplayer
I know very well the get and the seven, but with this get I do not see how I will have the player 2
player 2 should be the second element of the player array
dude........look up player array
Yes then?
the second element should be player 2......just get the second element of the array
he probably doesnt know use the array nodes
How to recover the second element of the table, after I will not bother you for such simple things
Nodes designed to aid in working with Blueprint arrays.
use the Get node, give the index 2
or 1
I already used array, and that several times
OK, I will try. Thanks
So you gave me two methods?
its the same
just the variables are different type
the array nodes adapt to the variable type them are connected
Index 1 is specified to indicate Player 2 not true?
you re trying do an split screen?
Player array is in game state, not player state
just hold the mouse in the connection
it will show the variable type
"player state object"
So the second screenshot is the right method?
he meant it holds a list of player states
OK @ocean geyser
the screenshot you sent gets the second element of the player array which is what you asked
Thanks it works
can someone explain this to me? What actually is UNetDriver? This has been the nemesis of this project since i started it.
These are two different errors
The one in yellow means you tried to RPC from a non-player-owned actor
First error is self-explanatory, "is locally controlled" is only for Pawn
where im confused in the picture is that it says PlayersState is not an actor, but then it says it IS an actor in the log.
engine is contradicting itself?
a pawn is an actor too isnt it?
Yes
But any actor isn't a pawn
"is Locally Controlled" is a Pawn method, not an Actor method
Doing this in PlayerState won't work, since PlayerState is not a Pawn
If you want to check that the PlayerState is local, you should get the Pawn from PlayerState and then call is locally controlled
This will work
I've rethink my sentences and delete them instead. Nevermind.
Im still wondering why that warning is being thrown in a playerstate. its weird. Im doing a has authority check from Begin Play
and then calling a Server function from Remote
The first error is that Is Locally Controlled does not exist for Player state
So it simply can't work ever
yeah i understand that now
i deleted
this is what i was talking about
this is causing that warning
but i dont understand why
OOPS
from remote not authority
"remote" can mean many things
You have to call this from the player owning this instance
Calling this from another client will cause the error you have
so its calling it for all clients then
from the playerstate you can try, getowner() -> isvalid(true) -> cast to player controller -> get controlled pawn() -> isvalid(true) -> here you can check pawn is locally controlled or not.
Just check the owner first.
Get the pawn from player state, check islocallycontrolled, if true then call RPC
Two nodes instead of that authority check.
what about has net owner
i used that in the past and it got rid of owner warnings
Maybe
More than one way here
You can also get the first local player controller and check if his PState is the current one
Beware that the server will have multiple PCs.
Has anyone messed around with spatial os?
Hello does anybody know if I need to have the binary build on my computer to run Unreal Engine Dedicated server?
@twin juniper I haven't mess with it but here's a video on how you can get started https://www.youtube.com/watch?v=jaSwJm2Lnmo
Sponsored by Improbable (Creators of SpatialOS) Sign-up here! http://bit.ly/2ZrkF2Q UnrealGDK Documentation: http://bit.ly/30FUoyY In this tutorial series we...
How can I join my dedicated windows64 server via android client ?
I made server work with local mode
but no response in online mode
nvm did it
how do i make it so that it doesnt spawn the hud widget for everyone on the server, only the one who switched to Blue class
With this node (switch has authority) @strange tangle
Try it first, but I'm sure it will work
dont think im doing it right but yeah the hud only spawns for the server player now
@silent birch
Or do it with a custom event for customers and for the server no custom event
@strange tangle how do you tell if you are the blue class?
Begin play, if IsBlue, spawn the hud
@dark edge this is put in the Blue class
@strange tangle does it being a server or not have anything to do with it? or should every blue class spawn the blue HUD?
Then just spawn it at begin play, no condition.
that just spawns the hud for everyone else in the server though, regardless of what class they are
@dark edge
@thin stratus because i want to make this hud appear the moment the players switches classes
So 0_Base is a Character child?
Alright, do you understand why this creates a UI on everyone?
(sorry, am working at the same time so repsonse time is slower)
first think you need to understand @strange tangle is that the instance of character on server and the instance of that character on clients are largely independent of each other
they run all their code, collisions... etc locally, with few exceptions
only real connection between them is a NetGUID (how they are uniquely identified over the network), which is used for RPCs and replicated variables
running the code independently of other instances of the character on other machines very much includes Tick() and BeginPlay()
so server spawns a Character, it runs BeginPlay and starts ticking
@thin stratus kind of vaguely do
i think its because player controller index is 0 and everyone is 0 so it just makes it appear in everyone's screen
it sends a packet to the clients that they should spawn an Actor of that class, at that Transform, and assign it that NetGUID
when a client spawns it, it runs BeginPlay and starts Ticking on that client
so every Character, from every player runs their BeginPlay
on every machine, including the server
and every Character creates a HUD Widget, assigns its ownership to local PlayerController
@strange tangle To put it short, no, this is not the reason. Using PlayerController 0 is not the best, that's true, but the main reason is because you are doing this On BeginPlay of a Replicated Actor.
so you don't have one HUD Widget, you have as many as you have players
Zlo's explanation is more detailed, not gonna repeat that
and the one from the player that joined last happens to be on top
ok ill read through it and understand it
You can't do this in the Character's BeginPlay at all though, cause it's too early to check which instance is the one of the local player.
What you can do, in Blueprints, is use "OnPossessed" (it's an event that already exists) and perform a ClientRPC, that then creates the Widget.
In C++ you'd have the chance to do this at more streamlined events, but well.
preferred solution is to create a class derived from HUD
PlayerControllers will instantiate one for themselves, only locally
all you need to do is make a blueprint deriving from HUD
They want to have it created per CharacterClass. So it's not bad to do it here I guess.
and set it as your game HUD class in your GameMode
At least in terms of being more or less complicated
and then create the widget in BeginPlay of the HUD
it will be local, and it will insulate your widgets from the network
which is good, since they are not replicated anyways, nor is the HUD
HUD can directly access your controller (GetOwiningPlayerController) and Character (GetOwningPlayerPawn)
which also saves you from using GetPlayerController[0], which is a function that many many people use incorrectly
and when they do, it thoroughly breaks their game
side note: when accessing a controller from pawn possessed by it, use GetController() function
alright. but my character has to switch between HUD classes as it switches between blueprint character classes. will that still work even if i set it as the game HUD class in GameMode
@winged badger can do
HUD in terms of game framework
is a class... designed to manage your widgets
it can easily be made to re-instantiate the HUD widgets if you jump characters
okay. alright
so a blueprint class with HUD as parent class?
aside from the game menus, and the widgets attached to Actors in world space
(latter are housed by widgetcomponent on the actor)
i highly recommend creating all your widgets from a HUD derived blueprint
yes
alright good hold on
how do i put in an already existing widget blueprint into a HUD blueprint class
@winged badger
HUD class is not a widget
its a manager for them
so you create a widget and add it to viewport from inside the HUD, in the simplest scenario
ok. thx
hey guys I'm thinking on buying a multiplayer template on the marketplace to learn while I play around with the package, is there any you guys recommend ?
A person? For help you with your game @hoary sandal
I think most MP template will teach you a bad practice here and there, which unfortunate. However, Allar's generic shooter was a rather good one, unfortunately no longer available to buy. Maybe there is ShooterGame too from epic's learn tab, but it's a cpp only project, that might be difficult for some to adopt. But in the sense where you should focus your efforts when creating mp games, cpp (and therefore shootergame) should be one good example for you to learn from.
@silent birch no I meant if there's any multiplayer templates that you guys recommend in the marketplace
@rotund sapphire I downloaded the multiplayer shootout, It though me a couple of thing such as the usage of game instance to handle states, I been browsing for a bit these are the two that I have seen that caught my eye
on begin play i m spawning an actor on owning client
for clients... its spawning twice
but for server it spawns once only
any idea why?
if i do a switch has authority before... it doesnt spawn for clients at all
Is there a way to not replicate gameinstance variables? So that every player has his own variables?
no
is there another way to travel variables between levels?
EliteNas i think you're better off spawning on server only and wait on client until the object will be replicated. Dont spawn on client.
@rotund sapphire but its a in game menu
@tough totem you can't replicate in gameinstance, but you can make stuff in playercontroller and gamestate to replicate, so for instance on beginplay you can use these classes to force some variables on clients, and use the server version of gameinstance to store / retrieve the data from.
@rotund sapphire should i spawn in game menu for each player on server too?
If that makes any sense for you then just do it.
It doesnt because each player in vr with have their own in game menu
Thats too much stuff for server to handle
But i think you're better off syncing some shared data in gameinstance by using the playercontroller/playerstate/gamestate (PS and PC is better if data will be personal), and the game menu actor will access the info using the local gameinstance or whoever holds the data.
It's a system you will desing around the requirements :)
@rotund sapphire My problem is, that the clients have different values in variables in one level. Now I want to travel these values (when the player travel to another level) with the player to the new level. Tried to do that with playercontroller but I heared that the playercontroller resets on level change
there is a mechanism implemented for playerstate to travel with maps you can use that too in this case.
ok I will give it a try
all of the source code is right there
how to use firebase in unreal engine, or any other alternative of firebase in unreal?
Hi everyone! Im starting with multiplayer stuff and I've been trying to do a rock paper scissors. Simple. The issue is that from the server it doesn't detect that the variable changed on client. Any help? Is is not just as simple as mark the variable as replicated?
If you wan't to change a variable from client : Create a custom event, set it to : run on server and make it reliable, then from that event you modify your variable, if variable is set to replicate everyone will se the new value
@left parcel Worked! I tried what you told me before but I created the custom event on a widget blueprint because it's where I was triggering it. Created the custom event on the pawn and called it from the widget and it worked. Thanks!
changed switch has authority graph to this, this should work to support both multiplayer and singleplayer right?
or are there any other possible issues? (I'm building my game for multiplayer but also want singleplayer to work)
please ping @ me if you respond, thanks
In Standalone, the client will have authority. I don't understand the logic in your pic. That sequence is wonky and probably shouldn't be allowed to compile.
yea but in singleplayer client wont ever execute and I need visual stuff to work, so I made it so if it's singleplayer it will execute both @worthy perch
HasAuthority should be true in singleplayer.
yes but if I play a particle for example, I play it from 'remote' and not on server
@worthy perch thats why I need both to execute if it's singleplayer
Then don't even do an authority check. Unless you want to support a dedicated server, in which case you play the particle if you're not a dedicated server.
@past totem how did you get your bps to look like that?
@fleet raven enjoy and dont look back! https://github.com/Sythenz/UE4Minimal
thanks, I'll have to check that out later
Is it still not possible to build dedi server without building the engine from source?
I remember trying that and every change in my project, I needed to rebuild the engine, and I couldn't solve that, so I gave up
But for testing I can just build the game and run it as a server?
what kind of change?
Any blueprint change iirc
that never happened to me
It was like 2 years ago when I started so maybe I messed something up
But i dont wanna try it again just yet
I think i saw you can just add launch parameters to the shortcut and launch the game as a server
Yeah I remember using that
You can also use editor's project launcher for compiling and cooking data for both dedi server and client only. If you plan on nativization then do it separate profiles, otherwise you can do it in a single one. No need to compile the server/client from VS it will do it for you.
Yes the guy working on the openworld project had this stream for fun he create a server instance that works with character movement component but it's a bad idea spending your years on such a project unless you're overqualified for doing anything else but server coding.
agreed
Yes that is exactly what we are talking about.
LAN you can use tcp, online you can risk udp it not much different (relatively speaking). You may also want to consider implementing advanced routing techniques that allow two player across to world play the game. steam sockets is one way, webrtc another but it's very advanced topic man.
Fortunately for you it is 100% open source you can read the engine code and figure it out. This will be your first challenge, and if you succeed you may have a chance build a custom server out of it after all.
if I replicated TArray of Ustruct , it seems wont replicate when the struct's property change
seems it only replicate when the whole struct add/remove from the array
I think that's because NetDeltaSerialize doesn't recursively check the members of the USTRUCT you're replicating.
use FFastArraySerializer instead
its documentation and example of implementation is in NetSerialization.h header
thanks let me check
structs do replicate
the members have to be UPROPERTY
inside it
for it to replicate the changes made
Can someone teach me on how to use a blueprint derived from HUD?
I want to use it for managing different widget blueprints depending on what character blueprint the player is using.
can I set more than one owner for an actor?
anyone know how to travel between levels with all clients? So for example I have a level were all clients are (Lobby). Now I want to open a new level (uses seamless and got a transition map) and send all clients in the lobby to this new level.
I'm having some issues updating a widget on all clients. I've previously used a text widget and updated it using setText and that worked just fine, but I cannot get it to work using a web browser widget with loadUrl. It seems to work on the host only. I'd appreciate any help.
question I have four player start but Sometimes I won't always have 4 plaeyrs how can I make my first two players spawn and the first two player starts?
@nocturne prism What do you mean?
nvm I got it working I was trying to make my racers spawn and specific player starts based on how many player I had compared to max players
so for instance I have 4 max players but if I only had two during that race I wanted them to spawn at the first two positions
Hi guys, got a question regarding Fonlinesessionsearchresult. You can use that to get the FOnlineSession and then get the owning user name when finding sessions. How do you do essentially the opposite, of when you join a session, on post login, you give your owning user name?
To invite someone to join you on a session, is it a plugin?
Nope, just c++. I want to make a lobby that displays a widget with the players name when they join in a scrollbox. But I don't know where to find the owningusername of the joining player, or currently joined players.
Can be through the server name node
And how do I access that? Is it in uworld?
Hi everyone! I'm trying to spawn some particle effects when i shoot from my weapon that is an independent actor. The problem is that Clients doesn't spawn those particle effects if events are created on the weapon actor, but it does if i create them on the player event graph. Any logic behind that?
This code works fine on character blueprint but not if I called it from the weapon actor.
Yeah your location is set to 0 0 0
So it's spawning the particle effects at location 0 0 0, either in world space or relative space to the attached component
But if it's attached to a socket, particle should spawn on socket location and be attached right? Or am I wong?
Even if I set a world location it still doesn't work at all ๐ฆ
Is the particle too small?
Build powerful visual scripts without code.
Even with 1 scale doesn't work. I'm going to put in on the character and moving on but it's weird. Thanks!
Does it compile successfully, if so, just ignore it.
Ignore the Error List entirely. Real problems and warnings show up in the Output log when you build.
Yeah
It was private
Are properties even necessary if you are running a c++ only project?
I'm currently trying to figure out how to spawn this actor on the game's startup
Also this should probably be in #cpp I accidentally went down here
How do I assign teams in blueprints? Iโve been trying to give a value to playercontrollers whenever onpostlogin is called in the game mode
If I have a class BP_Item, which on 'interact' event interface modifies a player pawn variable that is set to replicate, is there any reason why onrep only fires on server?
Player pawn interacts with item_BP, which fires that event. However the player 'FEquipped' variable is not being changed. Any help would be appreciated
its what blueprints do
OnRep there is not so much a replication as much as a setter callback
And as always RIGHT after I make a post, suddenly the answer is revealed to me. I didn't have 'set component to replicate' checked. -.- Solved
you could set a variable locally on a client, and its OnRep would fire on that client
Im trying to avoid running anything on the client
How do you avoid cheating?
i have less of a problem there, as its a co-op tactical shooter
If you for example allow client to add items to inventory, anyone with cheatengine can have unlimited items
oh
but i do have some sanity checks when client RPCs stuff over
in c++ a server RPC has _Validate function as well
and it will autokick the client if it returns false, like he shot a target 10k away with weapon that has 2k range
Is a simple operation as I showed that CPU intensive? I'm more worried about network bandwidth
its not
my game is very loot heavy so it probably adds up
if this is not a learning project, i do recommend starting with c++
BP doesn't have access to any of the advanced networking tools
true, but the tough dedicated server stuff I've already handled, if I need to delve into cpp more I will
I kinda hate it
i will admit its an acquired taste
a lot of math heavy stuff is preferred in cpp jsut cause nodes are a pain when doing things liek that
but after a while you don't mind it at all / start to prefer it in many situations
its not just the math stuff
also anything that has to do with structs
tell me about it -.-
and handling collections
yeah i agree with you, but frankly my project will be delayed a lot fi I attempt to become proficient in cpp
in c++ you can one-line something like sort this array of actors by distance to something
in BP its 2 screens worth of nodes
lol
custom functions exposed to BP is good enough for me in those situations, for now
Where should i be assigning team ID to players?
Should my variables such as PlayerName be set as replicated for my playerState in a multiplayer game?
yes
PlayerState already replicates PlayerName on its own though
@ebon nimbus that depends on how you decide which team the player belongs to
That line isn't even worth typing out.
if you are assigning them automatically as they log in
is different from letting them choose team in lobby themselves
either way, as controllers aren't replicated, you should have the TeamID in PlayerState
and override Find/ChoosePlayerStart functions for the spawn locations
Hey Guys I am using GameSparks for Android and IOS platform to build a listen Server , I want to know is it possible to create a listen server using game sparks, Just like steam.
I have created and authenticated players using game sparks services .
I dont know what should be done next should i host sessions ?
and try to join with other authenticated users . Will Game sparks handle the connection between different clients automatically.
Can some one please guide me in a direction , thank you.
hey guys, just wondering if anyone has tried to implement multiplayer on a mobile platform here? kind of struggling to find any information on it online, I'm trying to have a host to 2-6 player connection through bluetooth. any points in the right direction would be a big help :) (Copied from an old post, of which I happen to have the same problem)
@warm summit Hi , I think to do the bluetooth connection you would need to set the subsystem to null , and do the bluetooth connection with a bluetooth plugin then , you can follow each step exactly like you will do to create session on steam.
I have not done this, but i think this should work.
as this is the way to do for LAN multiplayers.
My bad.@warm summit ,This wont work for Bluetooth , but this would definitely work for LAN
@bitter oriole Hey as you here , Do you know anything about multiplyer using subsystem ?
Never used GameSparks or Android or iOS
No
@novel citrus Afaik, GameSparks doesn't have any MasterServer stuff to host Sessions.
So, at least by default, you can't host and join sessions with it.
If they do, then your best bet is to ask them and not the UE4 part of the problem :P
@thin stratus thanks for clarification.
Do we have any subsystem which supports this.
Afaik, not yet, Epic Games own would probably allow it somehow, but CrossPlatform isn't supported in that way.
Each Subsystem handles their own Sessions, and even if you handle the Sessions outside of the Subsystems, connecting is forbidden as the UniqueID is different for, e.g., IOS and Android.
So you need an extra Subsystem for this and afaik we don't have one.
And it's not only about just having a custom UniqueID and someoutside server, cause even if you make your own Subsystem that pulls that off, you can't access the IOS and Android Subsystem stuff out of the box anymore.
So your custom Subsystem would need to somehow wrap the other two.
tl;dr If you can't pull that off, don't do Crossplatform Sessions or wait on Epic to release their system.
Which is likely going to be 2021
@thin stratus If i want to host for Android platform only will there be any solution then.
Yeah, using Googles Subsystem
They should have some Room/Session System
Might not be included in ue4s implementation though. You'll have to check the subsystem files
So there will be a possibility using Google Subsystem.
I will take a look into that.
At last some direction.
Thanks
This is my script for switching the HUD widget when the player clicks the the button Blue. However, on the client players it works normally, and on the server the old 0_Base_HUD doesn't disappear, but gets overlapped with the new Blue_HUD.
Pressing button P to print string prints 2 before onclick and 1 after onlick on the server, while simulating with 2 players.
https://cdn.discordapp.com/attachments/221798862938046464/648459865924042752/unknown.png
@viscid bronze Are you doing a listen server , Check if the widget is not getting created for server as well as for client on the Host machine.
HUD will only create on client . so in the begin play you would want to check if the code is running for server or client , and you want to do these specific things for client only.
@novel citrus yes. i am doing a listen server.
i think it is creating only one 0_Base widget for clients, but creates 1 for each client on the server for the server client
The beginplay is in the Player Controller.
Well on the host machine , as there are two codes running , one for client and one for server . so you would like to check if this is client or server , and for server you dont want to create any UI
On Begin play of player controller , check this
for server this should be true,
I am forgetting something .
I had this issue in my game . and the problem , was on server machine , i was creating UI two times , one time for server and one time for client.
Guys let's clear my doubt... Does STEAM host our Mobile games also....โ๏ธ๐
Steam does not host game servers
@pastel thunder Hi Akhter2000 welcome to the club NO
And Steam does not do mobile
So, what does setam do?
And who host our games?
Your servers you mean ? You do
Your game servers that you build
@pastel thunder There are two Types .
Dedicated and Listen Server.
Dedicated is hosted remotely and all the players will connect to it. and Listen will be like player vs player , where one of the player will be hosting and other will be joining.
You need to rent server hardware, put your game server software on it, etc.
You can avoid needing dedicated servers by using listen servers, but this doesn't work for all games
@bitter oriole can u tell me company from there we can take rent?
