#multiplayer
1 messages Β· Page 450 of 1
One thing I do have is when the server receives the move it checks the input is valid as well - if not it just sets it to what it thinks it should be
Urgh
in some ways I miss the kinematic movement.. it was so server-auth and hacker un-friendly π¦
You override PlayerInput?
Yeah so say the local player thinks they can sprint but server disagrees, just clear it on the server before simulating
I mean, yeah guess that's a thing
Ah, yeah I do that with a "bWantsToSprint"
So it's not like Sprinting is replicated
But the request to sprint is
If that's not possible, nothing will happen anyway
The boolean can stay true, cause well, he wants to, but damn he is not allowed!
yeah that makes sense
Oh also, I ended up sending the whole information about hovering to the Server
God I hope chaos makes this easier
I want to go back to server-auth so bad
Cause I figured it is really not all that important if the distance or floor normal changes during one tick
And if Client and Server have the nearly the same normal and distance, server just takes the client one
Removes all sorts of desyncs
Chaos would hopefully just allow us to apply a Force at 4 points below the hovercraft.
And then magic.
Ah yeah makes sense, I'm getting a new floor on sub-ticks but keeping the same input
NewHoverAcceleration = FMath::Max(0.f, HoverInfo.DistanceToFloor * (GravityStrength - MaxHoverAcceleration) / DesiredHoverHeight + MaxHoverAcceleration);
I'm just hoping it lets you simulate a single object at once, then most but not all my problems would be solved
I replaced the HoverAcceleration PID Controller with the above
Cause I figured the simpler the equation, the better it stays synced
The equation solves:
f(h=0) = f_max
f(DesiredHeight) = Gravity;
f(h > DesiredHeight) = < Gravity
Where h is the current height to the floor.
f_max the maximum acceleration.
DesiredHeight the height at which we want to keep floating.
One thing I don't do is cache the spring length and use that to work out spring velocity
Seems to be more stable if I just update it on the fly
How do you remove/disable the replication graph in a project? I removed it from the .ini and it just uses the base version
Oo good question
Oh disable the plugin
One thing I don't do is cache the spring length and use that to work out spring velocity
Right, it's calculated in the same tick, just a different functions for me.
Seriously the replication graph is so gross
haha
Needs a lot of work
I think Fortnite is the only game that actually has any reason to use it
we've been using it on HLL
It's a nightmare
SO many crashes
I get why it's beneficial, but I honestly don't know how Epic have got away with using it in it's current state
Helps when you have the guy(s) who made the thing
I bet half the code to make it usable is in Fortnite itself
If we're lucky they'll slowly move it over
Oh definitely. We've subclassed it and the like, but I'm still not convinced it's ready yet. We had it replicating pointers to GC'd actors and crashing the engine... rip
Hey guys, in a top down game, i want to rotate the character towards the mouse. I am using an server RPC which receives the rotation from the client on tick.
when i profile the RPC calls, the number is huge like 20k+ in less than a minute of gameplay.
what is the best way to keep updating the rotation on the server and reducing the number of RPC calls?
Well, you do need to send some sort of data
As long as that's Unreliable and the only call and only sending very limited data, it's fine
@thin stratus how come the built-in ServerUpdateCamera function has much less call count than mine, even though both are in the event tick?
Same actor?
Actually not sure without looking into it sorry
Did you change the NetUpdateFrequency? The default of 100 is quite high.
@worthy perch no i've kept it to 100, how much is a "Good" value?
I'm not too sure myself, but ~10 appears to be decent.
I did this, but surely that's not a good way to do it at all
Changing NetUpdateFrequency won't change how many RPC's you send
Oh, I didn't know those were RPCs. I guess I'm tired...
Well, you could reduce your TickFrequency.
I would strongly suggest using character movement component to modify character rotation
Depending on what you're trying to achieve it might already be available
Do you need to do such a thing on Tick as opposed to specific events?
You want to be really careful with modifying character transforms like that for multiplayer because it almost certainly won't work correctly with prediction and replay
well if i reduce the tick then the other functions that are used locally would get affected too
@chrome bay i don't think the character movement component has what i want, as i have tried to see if it does, and searched online, and found nothing. might be wrong though
What's the desired effect?
http://www.dreambotstudios.com/ue4-rotate-character-to-look-at-mouse-location/
something like this
Setting the character movement to follow Control Rotation, then setting the control rotation of the controller to look at the mouse is the best way.
yea but then i'd have to send the mouse location to the server, right?
Control rotation is already sent to the Server via character movement so no
And the benefit is it then works properly with prediction and replay, and you get all the benefits of character movements netcode
If you can stun a player so that they can't move, I would most likely check on that inside the MovementComponent, right? -_-
Having the AddInputVector in BP but all the rest in C++, specially the ServerCode, does create a lot of annoying situations if you want to prevent cheating
Guess I could just set the MovementMode to None
@chrome bay Any idea how to sync running out of energy when sprinting?
I get 0 corrections when starting and stopping (even if rapidly spamming the key), but the Energy variable isn't 100% in sync, so it's not 0 in the same frame for both server and client.
Also can you just release your amazing movement components?
!
hahaha
Hmm. I guess if movement is driving it, it has to be saved/decremented as part of the move?
When MoveAutonomous runs maybe decrement the energy value there?
Otherwise hard to say
Gnah that would mean I need to move energy into the MC
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
Or at least somewhat access it via that
Does a client call PerformMovement more often than a Server?
Yeah or some kind of delegate that broadcasts to update anything that should effect movement?
Most of the time probably yeah, at least if your combining moves and throttling outgoing and suchlike
It would need to be two events that call exactly the same amount of time
Cause otherwise the server might reduce later
Or earlier
I guess they're being called with the same total delta time though right?
Yeah but if the Server doesn't call it in Frame X and energy would be 0 in that
Then the Client would set it to 0 one frame earlier
or even multiple frames
I mean you can't really see anything related to that correction
But it annoys me
Cause it's so obvious why it happens
waiting for that "make multiplayer" button π
One day
When we are 70 and half our brain isn't functioning anymore
Someone just has a "make mmo" button
I do want to release that movement framework as a plugin btw I just really need to polish it a bit, and it's never going to be a kind of plug-and-play thing π¦
So many ties between actors and movement
It won't ever be. The only thing you can do is make tons of Pawn Classes with their specific Movement Component
May it be Vehicle, Hover, Fly, Character
And then leaving enough space for people to customize it
So that your character doesn't need a capsule etc.
This is one other tiny advantage of the physics approach is that's taken care of then too
Urgh
Chaos better have a nice way to handle this crap
If PhysX wasn't hidden away behind so many layers and let you simulate one object at a time of your own accord life would be much easier
Ultimately you want something that works with every collision shape
And also accepts physics simulation for multiplayer
Then we are all happy
Well I've seen a chunk of PhysX code when trying to find out about the angular damping shit
And it doesn't look taht bad
But also not really something for networking
The main issue I still see is that Physics Objects aren't deterministic if you aren't looking at all of them at once
A 1x1 dust corn could move your bullet slightly upwards and it would hit a ball in a differnt angle
In the non-physics approach you just ignore all of that
Isn't static and blocking? F+ck it
Even though I still have to add the "CanInteractWithPhysics" stuff
Cause I currently can't move physics objects with the drone
Yeah I copy-pasta'd that from character movement, but it's so fugly the way everything interacts
I cut away 90% of the code for StepUp and MovementBase
I see myself re-adding the movementbase stuff cause the drone won't be able to hover on a moving platform otherwise
Is this the place to ask about Epic Online Services?
Alright, I'm a bit confused on it. It is a bit unclear on whether we need the game to be on the Epic Games Store or not in order to make use of the services
Well, as of right now, you can't make use of the Services, despite maybe the Ticket System
Metric system aswell iirc
Yeah couldn't remember the name
Iirc the Documentation currently has a EGS ONLY banner
But the weird part is, the metric srrvice mentions you don't need the epic games store. But it does say it relies on the Platform interface, which does only work with the store
On most of the other services
I would assume that as of right now, the systems won't work outside of the EGS
And you don't get your hands on them without Epic letting you in
The EGS will be opened up later the year
And the Roadmap for the EOS (!= EGS) says that it adds stuff like Identify Interface later the year
Which, in what I understand and think, means that at that point it will be available for everyone
Quoting from the overview: The EOS SDK exposes its interface through opaque handles, which are provided by the Platform Interface. An interface handle's lifetime lasts as long as the Platform Interface itself, and is required as the first parameter to every API function using thst interface.
It seems that the interfaces, even those who state they don't need EGS, need that platform interface, which does need EGS
anyone know how you can test if your connection is secure on xbox multiplayer?
@solemn hedge Anything console related is kinda NDA. You should stick to the UDN.
@night jay Platform doesn't have to mean EGS
@night jay Platform could also refer to PC, PS4 etc.
Similar to how the current Subsystem Interface works
That doesn't necessarily need a store behind it
It is referring to the Platform Interface
Which is in bold and capitalized in the text
And that interface is apparently what drives the whole SDK
Will have to see what it becomes in the end
It generally can't be fully connected to the EGS
As then you wouldn't be able to use it on Switch and stuff
Cause EGS won't ever be on that
The EOS sits behind all of this
the EGS communicates with the EOS for Entitlements and Friendlist etc.
But I would assume you don't need the EGS at all
You could even write your own standalone software for pc
At least that's what they kinda promised with "You can use it with every store on every engine on every platform."
Yeah, it is still a bit vague though, would be nice if they cleared up some of this stuff
I tried pinging them, but I think mostly the Community Managers are using the Twitter account and they were probably busy during GDC
Might be worth trying again
This is maybe an editor problem but I'm checking client side on the pawn if the pawn is moving, if he doesn't do anything the AFK will open-level to mainmenu (this is all behind a switch-has-authority with remote pin). When a pawn does open level back to the main menu all the others follow? Is this only an editor problem?
If you check on the Pawn and you only filter with "Remote" then it affects all
Remote is all Clients
You have to also either do "GetController" and check if that is valid
Or "IsLocalyControlled" with a branch
To limit it only to the local pawn
oh, because the pawn exists with all the other players
Yus
You could also just check it on Authority
And ClientRPC if they need to leave
Then they can't cheat the afk system :P
Sometimes
No, your question is largely answered and can be found easily via google.
I'm not supporting your ever lasting spam of questions, Crusher.
"UE4 multiplayer tutorial"
@north stone Can you help this lost person? He doesn't know how to use google!
I still don't understand that question tbh
This will blow your mind! How to use google for basic ue4-related questions. Yes, take this with a few grains of salt. Spongebob is spongebob. lmgtfy is lmgt...
I'm surprised you actually did a serious video on this
Don't want to see Allar's approach
Allar be going "this is google USE IT!"
"Ayyyye. Google."
After today the EU will not be happy you are using Spongebob in that movie
The ControlRotation that the CMC uses, is that Gimbal Lock free?
I previously used my own RotationVector that I passed to the Server
But would much rather use what Epic already has
Just wondering if I can easily do 360 movement with that
@north stone i love your video ill be sending a lot of people over to watch it π
I bet its harder for very specific code-things, but no experience with that hehe
Right now I want this code to proceed if the testing volume object is not in the way. If a testing object is present it breaks out. This works:
Is there a more efficient way to do this server side, check for an object at a location? I also need to acquire to terrain location at the same time. By using either an overlap runtime, or putting in a collision sphere in an actor and detecting that overlap at runtime.
I need to be able to get landscape level and certain actors. Right now location calculations are made during runtime. This actor spawns in a different location each time. Location it's not static, but the point checked is always a certain distance relative to the actor.
I imagine if I put an overlap box in the relative location, into the actor blueprint itself, it would save the effort of calculating the location during runtime, but add time to the creation of the actor because another component object would be present. This actor is created many times during the course of the game
@limber mortar overlap events are prolly what u will need, more efficient u gotta implement ur own data structure and search. But overlap events are already good enough
Hey if I'm setting up a dedicated server, and say my game executable has custom stuff in GameInstance, GameMode, etc, does the server also need the code for that? and if so, do I have to package separately or how does that work? I'm following the tutorial from @worn nymph but I'm slightly lost
only the server will have a GameMode, for one
Oh okay, so build a separate build of the project specifically for the server? orrrrrr....
most of the code is common to both server and client
okay so what would be the exceptions?
anything behind HasAuthority will be dedicated server only
i'm anticipating integrating playfab into my game, so i'm trying to get my dedicated server setup to experiment with that
anything behind IsLocal<whatever> will be on clients
well i know about authority switches, but as far as actual classes
GameMode and GameSession will be exclusive to server
correct me if i'm wrong, but the dedicated server is essentially the same code as the main project but just set to run as a host?
more or less
so rather than a local listen server like i would test with, you'd just connect to the instance hosted on the dedicated server
dedicated server doesn't need to render anything
doesn't need to tick animations unless your hit calculations depend on them
doesn't need to play sounds, spam decals, have any UI
okay gotcha. so i shouldn't make a seperate project, i should just build logic to test if dedicated server is running and have that run on dedicated server launch?
you can't make it a separate project
okay gotcha
but you do need to compile separate binaries
okay so do i need client binaries with the packaged server?
or client content or such?
any asset you want to reference over network... ever
server has to have
its not 2 projectse
if you tried connecting to a dedi in separate project you'd just get a class mismatch and get disconnected
pretty much right away
oh so packaging the server requires me to just place it with the client binaries and launch from the project folder
i think VS will do it for you, the placing
oh okay cool
another question
i have most of my team working with the pre-built binary version of ue4.21. if i compile the project for dedicated server using the source built version, then they package the project using the pre-built binary version, will that cause issues or will it work just fine to connect to the dedicated server?
afaik, it shouldn't cause issues
i don't work with dedicated servers, but i often have binaries prebuilt before i start packaging
you might want to get confirmation from someone who actually packaged a dedi for this one, though
i'm doing the programming for the whole project, so any pointers for how to avoid that sort of problem?
my team is mostly artists, so i don't want to have to worry about them learning to compile from source, but also make sure it doesn't break if the client uses pre-built ue4 and the dedi has source version
don't let them do the packaging π
your average artist won't be able to make heads or tails from a packaging error anyhow
Thanks madlios, I guess I need to figure out the most efficient way to use overlaps then. I have a few different ideas on how to apply them.
I mean I know how to make something overlap, and fire events, lol. But if I can shove .05-0.10 ms off a process I need to do so
first I think I'm going to take my calculations to determine those overlap locations out of the blueprint, and put the spheres in the blueprint directly
see if that speeds things up
@limber mortar #multiplayer is not the optimal choice of a channel to discuss performance optimizations not related to networking ^^
I needed to know if a server would handle one better than the other performance wise
was my original question
or part of it
nod
but I understand if part of my question might not be applicable, I'm in my first year using UE4
Is GameMode replicated? When a client tries to Get GameMode it says none but the host player gets it no problem
Is there a good way to get and cast the controller to a custom controller for multiplayer purposes? Trying
ACustomController* controllerRef = Cast<ACustomController>(this->GetController());
gives me NULL everytime and I don't know if it's smart to use the 'GetPlayerController()" function from UGameplayStatics
client's only have a controller for themselves, not other people.
so what you're saying is that my code is fine but the fact that I'm running it on one pc is the issue
or
i shouldnt call my custom controller from the server ever because when it does, itll call its own controller
or did i just completely miss the point
@rocky badger each pawn/character has a their own controller on server. on the clients only the player controlled pawn has a controller
for AI controllers then only server has it
clients have none
how about dedicated server memory cost? if we have multiple match, so i will start multiple dedicated server processπ
if i have a replicated array and it gets updated, does the server send out the entire array in the update or just the changed data?
Should be only changed data
thanks
@sharp pagoda that PDF is a TREASURE TROVE . Thanks for posting
You are welcome.
Yes, main thanks to you @thin stratus this is a really big help.
If I want to host a server from the main menu, and start 'listening' without doing a map change to a lobby (the lobby is integrated into the menu), how should this be done?
Should clients always run the main menu with the -listen paramter in case they want to host? Or is there a way to initialize a -listen without reloading a map?
Hmm, but I want to get players connected to me when I create a lobby, in the menu. Using the advanced sessions plugin. Don't I need to be a 'listen server' at the point where I accept joining players?
my setup is more or less the following. PlayerControllers own a Pawn, that acts as a movable camera. The actual characters controller by players are Characters possessed by AIControllers. When a PlayerController needs to control the character it will call RPCs on the server to give commands to the AIController. My characters are setup as ROLE_SimulatedProxy. Unfortunately SimulatedProxy is incompatible with the GameplayAbilities plugin. Is there a simple way to make my characters AutonomousProxies and still work properly?
I am sorry if the question is convoluted. I guess it's because I don't have a proper deep understanding of the topic yet.
@rain coral you need to create the session
@scenic raven make sure you SetOwner of the AIController to the PC
and just for good measure, make sure your Character's owner is the AIController as well
as some methods of spawning it like SpawnAIFromClass, will fail to SetOwner on the Pawn
Thx for the tip. Iβll double check the owners are correct.
without the ownership chain, you can't RPC anything from either the AIController or the Character
also, your AIController is not replicated by default
but for this setup, an exception is warranted
without having the client side AIController, that ownership chain will break
Is this utter, plain and simple doodoo practice
do notifies get called recursively?
( I presume not )
Is it possible to use a skeletal mesh physical asset for collision in a pawn in multiplayer?
I've been trying to figure this out for hours with no result
best I got was colliding with static meshes but it didn't react properly with other pawns no matter what i tried
I had a bit of a question about change static mesh replication, so I made tweet chain here with all the details, can anyone help me to where I'm going wrong?
https://twitter.com/mnrART/status/1111011358819209217
It don't want to change the static mesh on my clients, but if i set the replication to multicast i changes it on the client but don't updates it on the other clients.
I'm a bit newbie artist not programmer so please explain it a bit user-friendly
unreal pals need some heads up on replication, please see the full Twitter chain for context. #ue4 #noob #help
@subtle patio OnRep in BP is moreofa setter callback then RepNotify, it will get called locally on a machine that did a manual set of the variable, even if its a client
that screenshot of yours, it looks like it heads into stack overflow
@jagged stag collisions work the same multiplayer or not, but fully syncing a physics assets tends to be problematic
@winged badger Interesting.. thanks
How difficult is it to get a VR game replicating movement in a multiplayer game? I'm wondering if I should use something like Proteus template or if I should just build from scratch. Can't really find much documentation in that area.
@tribal solstice https://forums.unrealengine.com/development-discussion/vr-ar-development/89050-vr-expansion-plugin
VR Expansion Plugin
Updated: 03/23/2019
Playable Template Demo
Template Packaged Download (https://drive.google.com/file/d/0B5cM3oP2O4-UOS1jY1hFY3FJMEU/view?usp
lots of multiplayer support.
@gleaming niche Fantastic, I'll take a look at that. Thanks a lot.
Does anyone know if NetUpdateFrequency is used for the initial replication of an actor itself? Or is it only used for properties on that actor itself?
@chrome bay just wanted to say that your suggestion for using the control rotation worked perfectly! thanks a lot
what is the last function called when a listen server gets shutdown, exits?
AGameModeBase::Logout(class AController* Exiting) doesn't get called
if someone enters the quit console command
or uses the X button
It should though after a short time?
I need a place to unregister the server in
Doesn't that count as ALT+F4 basically?
So a DC?
Unregister the Server from Backend?
yeah it should be like an alt+F4
any exiting method tbh
yes from a mater server's server list
Custom one?
yes
You are lacking a Heartbeat
I could ping every now and then
That would take care of it
but I was wondering if there was something easier
No, Heartbeat is what is used for this
Server pings the MasterServer
If no pings come in anymore -> remove
You have to anyway
If the PC goes out there won't be any event being called
Then you'd have a dead Session in the system
That depends on your system.
Idk how the rest is setup
But tbh I doubt you'd use Sockets for that
MasterServer can def not keep them all up
Or maybe, but doubt
it's just a simple http python server
Yeah then a POST is probably enough :P
I will look into just sending regular pings
if they can show the port
might work
but thanks!
No biggie.
Other question: Has someone send FQuat over an RPC?
Got ControlRotation in form of an FQuat and wondering how to make this less bandwidth heavy to send
I know it's implementing NetSerialize by default
Hm, seems like Epic is packing Roll into a Byte and Pitch and Yaw into an uint32
I don't see them doing the same for the client though, so I guess the Server has less accurate values for the control rotation of the client
Why are you trying to send an FQuat over an RPC π€
Most of control rotation is already sent
Have a look at APawn::GetBaseAimRotation
You can just convert to rotator and do the other axis that you need the same way they do RemoteViewPitch
UPROPERTY(replicated)
uint8 RemoteViewPitch;```
I'm not using any Rotators atm
If at all I would do Quat->Rotator->RPC->Quat
To do the same packing Epic does
Why can't you convert to/from
This is also not build up on the ControlRotation of the Controller
Well, I could hack it in there
But all I actually need is to send the Quat via ServerMove
And that as bandwidth friendly as possible
I'm just confused that the CMC makes sure Input Acceleration is rounded for the client too
But ControlRotation stays untouched for the client, yet rounded for the server
I think the corrections regarding acceleration are a lot more impactful
So they want it to line up as much as possible
That's fair, I would need rotation to be the same too though, as the pawn can rotate freely
Also RemoteViewPitch is really just the ControlRotationPitch replicated extra from Server to Clients.
Indeed
That's a later step
Right now I need the Server to get the same ControlRotationQuaternion that the client uses
I guess for now I can just send the pure Quat
Why not use net profiler
And check later how to optimize it
And compare
Send the same RPC, one with rotator, one quat
At same time
See what they both consume
Then you can decide on your bandwidth budget for the movement and if its a good use of resources
And pack it the same way Epic does for the normal rotator
But I'm afraid the packing, since I'm actively using the Quat for movement, results in different rotations for client and server
Even though I'm not sure if
Hmm
Yeah, and you can achieve a rotation direction the same way with different axis
Just would need to pack them all 4
I think if its such a critical component of your game and you can't be certain they'll be consistent then you might as well
Might as well send it fully and care later haha
"My game is laggy"
"DEAL WITH IT CARL!"
Yeah, guess it could fall under premature optimization
Can't be too careful with fast paced movement replication
Indeed!
I'm doing shooting replication, its basically absurd
Full prediction and rewind for projectiles
With large player count π€¦
Almost finished only took ~6 months
Disgusting
Our shooting system is 90% projectile based
With bouncing
The only optimization I did so far was tracing for close combat and just doing a linetrace instead of spawning the projectile if it's too close
Not looking forward to further optimize that
The projectiles bounce or the players π€
Projectiles
Ah, ours does... everything you can imagine
Despite the Rockets
Well we have hovering drones
That shoot fast projectiles that can bounce
I will just leave it like that until someone starts crying about it
We can ricochet 71500cm/s 1200RPM full auto rifles using projectiles (not hitscan) with ours π
Its highly highly optimized
Ha, before that would happen I would talk my client out of it
Hindsight.
Hm, why would the save Start and End ControlRotation
What could happen between start and end of a move that would change the controlRotation so that it matters for replaying?
Only thing I can think of is corrections
anyone got any idea how to assign input devices to each player in splitscreen?
as in context: "Press X to join" to add another player in lobby
local multiplayer is still multiplayer. Granted, this channel is mostly online talk
Oh I wasn't saying you shouldn't ask here, just that the people who do those games tend to be single player and would be less likely to be in here π€·
Should the Screen be splitted when you press X? @slim holly
The main issue that I encountered with "Press X to join." is that you need a PlayerController to receive input.
And for that you need to call CreatePlayer
And that causes the GameViewport to render the splitted screen.
ye I can do that, but I wanted to see if I could use one controller for 2 players
since I lack the need for keybinds
I feel like PlayerStart is trolling me when it pops up and I want a PlayerState
Idk
and or, determine does player 1 use keyboard or controller
that's another issue
project settings has checkbox for assigning controller to player 0
but how do I do it during runtime
or do I have to go around McGyver style and just add 5 players by default, kick the ones that aren't being used
Splitscreen is limited to 4
yes, I was thinking removing player 0(keyboard) and just keep 1-4(controllers)
Let me correct that
You are limited to 0-3
As index
So 1-4 Players, that are mapped to 0-3
ofc it can't be the easy way
One Controller for two players doesn't sound like splitscreen though?
Are you just trying to control two characters with one controller?
like, Brothers
Like Brothers,?
Ah
Yeah that has nothing to do with Splitscreen though
Just implement the controls in the PlayerController
Send one event to PawnA
And the other to PawnB
my project is a slot car racing game, only needs 1 button
but like, I was hoping to do this without one-player-controller-two-pawns hack
- doing a camera split for one controller is major performance issue
Right the other hting would be using two player controllers
But then you need to, as you mentioned, somehow route the input through both controllers
I'm pretty sure if you follow the boolean you mentioned that sits in the settings
Through the Source of UE4
you might find where it's used
And then find out what to do to have one controller affect two controllers
any idea who handles IInputDevice
Nope
ULocalPlayer seems like a start π€
ULocalPlayer::SetControllerId
no that's not it
terminology is not helping here π
I wonder, wouldn't it be safer to send the Control Input Event instead of the Rotation directly?
I feel like sending the rotation directly is basically asking for an aimbot?
Doesn't have to be really
You can check for the rotation delta in Validate
Plus frankly, aimbots aren't really preventable with tech on PC
Fair enough I guess. Currently trying to figure out how to make ReverseControls a thing.
We have an ability that inverts your inputs for a specific amount of time
The CS scene has moved to triggers that "just" fire on aiming a player, which is much stealthier, funnier to play, and almost as efficient if you're any good
However in the original offline build, this was handled before sending the input over to the server
I would need to do that on the server side, but the rotation isn't an input as just mentioned
I could invert the InputAcceleration that the client sent
How would you go about replicating AIControllers?
But the rotation is already a fixed rotation, not an input
I could change the properties on the BP subclass of my AIController but I would like to replicate the CPP one.
nevermind, found it thx π
I don't think you can send the input only
since delta time between input and updates are different
you would have to accumulate the local input into pool and sign the packet to make sure server knows it's getting everything, but it would still desync over rounding errors
I would think "encrypting" input into a string library using random seed would put a major bump in the road to make aimbots
People will just script mouse movement
ye it wont stop them, but makes it less reliable than reading/writing the value directly in memory
There's no point doing that stuff. For aimbots, you need some sanity checks on server, a reliable way to ban people, and a report system
People will always find a way around tech on PC
most reliable way is to add human factor to it
It's the only way
Welcome to competitive games on PC
There's no trust built into the platform so you have to accept that people will play your game through Wine with a custom kernel and none of your software has authority to do anything real
Overwatch did something, most aimbots fell back on shape detection there
which means they couldn't read the memory
You don't need to read memory lmao
too bad every enemy had red outline to make it easy
You can build a fairly reliable aimbot by getting the video, building movement vectors over each frame to detect stuff moving vs its background, and clicking mouse if that object is covered by the center of screen
Works in pretty much any game, doesn't need any interaction with the process
Triggerbots aren't trivially detectable by even humans if the cheater isn't being stupid
It's important to spend time on making sure players can report cheaters to get them banned, and spend time logging every input on every game server to add checks in your game
you can detect it mathematically, but not with naked eye
linetrace and measure time over enemy and compare it to fire event frequency, Im sure it would look very different if you compare human and machine
like button held down time
The only thing a triggerbot does is pressing the mouse button at the right time, which happens to be what pro players do
Yeah you'd basically ban Shroud instantly haha
Valve has been having great success with machine learning because they had a reliable loop of millions of reports -> thousands of bans -> lots of data over year
Players look at video, tell machine learning that it was or not a cheater
machine learning now submit video
Players confirm or infirm
etc
There's no algorithm though
Every ban is player-decided
else if (PawnOwner->GetRemoteRole() == ROLE_AutonomousProxy)
{
SmoothClientPosition(DeltaTime);
}
Shouldn't this smoothing the movement of the Client being visible on the Server?
Cause I know that the CMC isn't properly smoothing clients on the listenServer
Now I wonder if the function is broken or if that's not the function I'm looking at
// Smooth on listen server for local view of remote clients. We may receive updates at a rate different than our own tick rate.
if (CharacterMovementCVars::NetEnableListenServerSmoothing && !bNetworkSmoothingComplete && IsNetMode(NM_ListenServer))
{
SmoothClientPosition(DeltaTime);
}
That's the comment in the CMC
@chrome bay Whenever you have time, could you give me a quick suggestion on smoothing the client on the ListenServer?
Cause even with the above code, the Client looks laggy on the server
it's basically the CMC code
Aaaactually
The SmoothingMode was linear
Exponential looks fine i guess?
I wonder though why the Client can see the server move, even though I'm not simulating the clients yet
plowing through souce is getting me nowhere
ok found lots of uncommented code, I could be close
alltho, AutoReceiveInput player list goes from 0 to 7
so 8 local player is maxium π€
I said Splitscreen is limited to 4 players
I think that was before we swapped the base of the discussion to something like Brothers :P
@winged badger following your suggestions, I refactored everything, in order to replicate AIController and have a clean chain of ownership Character<-AIController<-PlayerController. Thx a lot for that. Unfortunately the role for character is still SimulatedProxy rather than AutonomousProxy. Any tips on how to fix that?
i never did need to, but you should be able to set the Role manually
AActor::PostNetReceiveLocationAndRotation
AHA. That sneaky bastard causes my client to see the server moving even without simulating it
@scenic raven could be as simple as setting RemoteRole server side and Role client side to AutonomousProxy
@winged badger I wonder if by changing it manually something will break
i did see some functions that copies roles... somewhere
probably GameMode
but i don't remember much about it
void AActor::CopyRemoteRoleFrom(const AActor* CopyFromActor)
{
RemoteRole = CopyFromActor->GetRemoteRole();
if (RemoteRole != ROLE_None)
{
GetWorld()->AddNetworkActor(this);
}
}
will probably do the trick
right, since I can't assign devices to controllers, I just gotta add all possible local players and only spawn pawns for the ones that have confirmed to join the game
this prevents me from using the built-in splitscreen rendering tho, so I gotta figure that one
You can override the GameViewportClient class
It handles how the Splitscreen is created
Even the sizing
I creates one per Player
I added a check for "Player->bWantsToPlay"
You do have to clean the players who don't want to play up though
Otherwise, if you have an automatic spawnsystem from the GameMode
They will travel to the new level and spawn there
Alrighty. 90% of the hovermovement seems to work (I will never do something like this ever again!). Now one thing missing is when two of the pawns collide
Applying an Impulse on Hit is def not a good idea :D
/** Rotates controller ids among gameplayers, useful for testing splitscreen with only one controller. */
UFUNCTION(exec)
virtual void SSSwapControllers();```
Things you randomly find
even if I could overwrite the GameViewPortClient, having splitscreen enabled stops you at 4
which would mean player 0 is forced to use keyboard as input
Player 0 is never forced to use the keyboard
Our game also allows 4 players to play with 4 gamepads
only if you use "Skip Assigning Gamepad to Player 1"
Rather only if you don't use that
That just means that the gamepad is assigned to player two
So that you can test with only one gamepad
If you don't tick that, player one has the gamepad (and the keyboard)
also getting alarming amount of 404's when trying to google this stuff
okay I think I get it
input device is tied to controller ID, and controller 0 doesn't have to exist
viewport defaults to lowest index
Hello there, I'm in a bit of a pickle there. Me and my team are making an RTS using UE4, and we're having an issue regarding possesion of a pawn by an AIController on a client. We need to have the pawn actually possessed (we use a custom lockstep network engine, and made all behaviors deterministic), so that it moves, attacks and does stuff. What solutions do we have, besides going inside the engine, and enabling possession when you aren't a server ?
Hi,
Does anyone have any beginner's documents for Android connection to a server?
I need my app to connect to a server where data is stored for mostly reading and authentification. I have strictly NO idea on how it works, neither have I done this on a computer before. I need this for work though and I would be glad if anyone had a step-by-step list of documents for me, from how to setup a server for this kind of application, to how to actually communicate with it from an Android app.
(actually, I have done this before but in Java, for computer apps, with a team that knew better than me how to setup everything, and I was just making SQL requests ^^)
Thanks in advance for any help!
(I also posted this on #mobile but I think I can learn a lot from this chan too ^^)
anyone recommend a good multiplayer backend like playfa ?
playfab
i need an easy one to use for server listen, joining and hosting. friendlist etc
server listing
@orchid belfry What issues are you having? Pawns should be spawned by the server, apart from that, make sure the AI possession in the pawn is set to Placed in World or Spawned and I believe it should work
Does anyone have any advice for predicting movements applied to other players?
I'm trying to work on hit reactions where one player can hit another player and push them back with a hit.
Prediction works fine for the local player's movement component, but when hitting other players it seems like the moves sent up via the movement component aren't used
@thick shale movement component is a bit bugged if u dont use it the way its meant to
@thick shale not sure how u apply hit reaction
@thick shale but lets say u set velocity or add a small force, the server and client will actually desync for small amount of force/velocity, like a value of 20, and it also depends on fps
I'm playing a montage, and sending a saved move to the move comp. the move consists of a FRootMotionSource_ConstantForce
@gusty slate the problem is everyone handles spawning, in fact the lockstep ensures everyone gets order at the same time, and via the deterministic nature of the game, everything happens the same without having to transfer more than X is going to move to there. Therefore we need client to spawn pawns with their own ai controller so that they can receive and interpret the order
I saw that it was supported in the movement comp, tried it and it worked, but it seems like it only really works for Autonomous Proxies
Simulated Proxies don't seem to care
@thick shale im not sure in ur case, but i had issue with applying force to movement component of characters, had to resolve to add vector input
the only way that seem to work
@orchid belfry Hmm I am still new to UE's multiplayer, and seeing that you have a highly custom setup, I honestly don't know then π But I know for certain that spawning pawns in client (for example Controllers) just spawns them for the client
they do get spawned, but no replication and no AI possession really.
That's as far as I can help you π
@keen thorn so the idea is to maybe replace the rootmotion with AddInputVector?
@thick shale not sure man cus addinputvector does not calculate the root motion right
maybe someone else can help with multiplayer root motion
I'll give it a shot, seems like if I can crack this, everything else will kinda fall into place
ye
thanks
Question, let's say that I have an actor A that has a variable X. If I want for example the gamemode (server) to set X while X is only relevant to A (OwningClient) do I still need to make X set to Replicated?
Like for example if I want to give each Player controller a Team ID on PostLogin, does the TeamID variable inside the player controller have to be set to Replicated? Or is there some way to modify a variable in server and owning client?
I see. I'm using Tick and the debug filters on breakpoints to check and it indeed seems that way.
Btw, Cedric, good job on the compendium π Myself being someone that has experience with UE but not its multiplayer side, it's a great resource π
Thanks, glad it helps (:
do you have examples on data that suits one and the other?
Just so I can have some reference moving forward
PlayerState is meant to hold the publicly accessible data about players
its replicated by default, and everyone has everyone else's PS
TeamID is just something that fits into that category
and as its readily accessible from PlayerPawns/Characters
I see, makes sense
you can easily wire up something like visual cues for friendlies/enemies that way
I am trying to replicate an AIController. I set bReplicates to true
but it doesn't replicate
its also bOnlyRelevantToOwner by default
yep
@winged badger Thank you π
there isn't much more to it, i keep mine Replicated and AlwaysRelevant, as my game structure needs the information in AIControllers to simulate Characters you don't own
there is also the distance based NetRelevancy involved, as AIControllers are not guaratneed to follow your Characters around if you don't attach them
so they might end up going out of 15000 UU range
and yeah, never hot reload π
so I am hitting another interesting problem. The moment I change my character from SimulatedProxy to AutonomousProxy
it doesn't move anymore
did you also change the RemoteRole on server?
if I untick run dedicated server on editor it does
basically, just setting the Role locally should be enough to pass that GAS integrated check
and MoveTo server side shouldn't be affected by it at all
I see
isn't that a little hacky? Making the server think it's simulatedproxy while it's autonomous?
happier solution would be to override the GAS check
I have already done that in another branch
and it wors
It works
I wanted to explore a solution where I don't touch Epic code
but I fear that's the cleanest solution.
i have no idea what functions are virtual there
none. You have to go and fork the plugin.
it does work it's not that bad
but still
also I believe that check is totally bogus and shouldn't be there
internaltryactivateability does much better checks
tryactivateability does that random not simulatedproxycheck for no reason
btw why doesn't the server want to move it properly when role is Autonomousproxy?
that would require digging into the AIMoveTasks
i don't require my AIController character to be AutonomousProxy, so i never ran into that problem
Can I send something from my GameMode to the GameState so other players can see it? I have the GameMode tracking number of players using OnPostLogin, and I want my players to have a player list on their UI, but since clients donβt get the GameMode class I am thinking of sending it to the GameState
That should work right?
GameState has a PlayerArray variable
which is an array of PlayerStates, one per player
it would work @clear copper , but you already have built in solution
also, PostLogin option would fail in case of SeamlessTravel, as Login functions are not called then
how do I use 2 players option to get the 2nd viewport to have a pawn too like in the thirdperson template I cannot get mine to work the same way. It wont possess on 2nd screen? thx
@winged badger so do you use the GameState to check that the number of players in game is equal to the number of expected players after seamless travel?
Hey, I need to make a ready system for a multiplayer lobby, once everyone has connected to a match, how would I approach this, I am currently trying to utilize the get player array on game state, and then have a variable in player state, but I am having trouble replicating the value from client to other clients
or should I use events to send data to server?
Well I assume a player presses ready?
Why would Get Player State return None for a client but not for the server?
Blueprint Runtime Error: "Accessed None trying to read property PlayerState". Blueprint: PC_Campaign Function: Execute Ubergraph PC Campaign Graph: EventGraph Node: Set PlayerName
@thin stratus yes
I got it to work via, the following BTNpress in UMG>RunOnServer event that sets a bool ready in PlayerState. That event also calls an event in GameMode, which scrolls trough all player states and checks if the ready bools that are true equal the num of player states, and if that turns out to be true, then game mode casts to all pawns possessed by a controller, and runs an event on the owning client, which event casts to the UMG hud, starting a timer, and if the timer is finished, then spawns all players with the selected character n positions ( i have a character selection which has its own dummy pawn and hud)
So it works, but I think its kind of messy
There are some ways you could deal with it either use the build in online subsystem works with LAN and connection over IP directly to each other another way would be something like spatialos where you have dedicated servers you can join on but relys on what type of multiplayer game you wanna do another option would be to create your own online subssystem but I assume that isn't an option for you
But why wouldn't you use steam?
@dark sandal
well i have a huge problem. i dont want to publish onto steam
and if i use steam it gathers a bunch of other games that have nothing to do with my game
anyone try to use a FastArraySerializer array inside of a struct that is serialized with NetSerialize?
it wont serialize the array
and I think i'm doing something wrong since im not calling DeltaSerialize
i have solved the issue without using a fast array serializer
I have UtcNow replicating server -> client, this is an FDateTime. I wonder if theres a way I can have a local FDateTime that will not allow itself to be set by another other than the OnRep
Just to make it harder for hackers
Because I don't want to replicate it regularly
Actually I guess it doesn't matter
Its not like the client will ever do anything meaningful with it
- my server (gameMode) spawn power up
- power up is picked up on server (rpc) and start ticking (have some logic) on server
i want to update players UI for example power up duration, best way to do this? do you think that i can store picked up in player state
so i can get some var from power up and display on UI
@clear copper GameMode has NumTravellingPlayers, so you can easily find out how many are in transit
@grand kestrel you can't do anything to prevent applications like CheatEngine from directly modifying a value in a memory address
if you feel really strongly about it though, you can hash the variable, then before its assigned a new value check if the hash is still good
Yeah figured, I'll just not rely on it ever being accurate on clients (true for everything), I had tunnel vision at the time π
anyone? π
there is no best way, depends on the rest of the code
PlayerState works for this, if you want to head that way
so when game mode spawn actor he is owner, right?
not quite, owner will be null by default, unless you set it in FActorSpawnParameters
and if you do then whatever you set as the owner is the owner
i'm updating turret rotation like this
and this works
but when i set repNotify and update rotation of object, that doesnt work, why?
how can i optimize without calling rpc, just with rotation var
you have to send to the server
server is the only one who can replicate a variable
so locally set, it will never replicate
and never, ever replicate the variable back to owning client when you do this
SkipOwner
Turret Location, just with the given Context, looks like something entirely done on the Server
I can't see why the Rotation would come from a Client, if not Client Controlled
i don't see why a server RPC if its done server-side
Na, I mean that it shouldn't need one in the first place
If this is just a Turret that should share rotation with Clients, it would all be done on the Server in the first place
well im rotating object locally, than RPC server
yeah if its server only, but hey this could be on the client? who knows, two nodes don't really explain the whole situation
Yeah we would need more info of what @real yacht is even doing there
The nodes like this could funnily enough be bough situations
And just lacking knowledge
the object that contains that logic has to be owned by a local PlayerController
for it to work
yeah it might not have an owning connection like zlo said
Right, the RPC is then 100% needed
An OnRep alone won't do it
cause yo uare on the Client
yep
(to answer that initial question)
So you can totally set the Var to OnRep
And maybe add the condition to skip owner
And then set it inside the ServerRPC
Small note: If this is executed on Tick, please don't set the RPC to reliable
reliable disabled
yeah it doesnt matter if the rotation skips a few frames, reliable every tick will just eat your RPC bandwidth and not allow other RPC's through
a smart way would be to scope the replication, and simulate on other clients
between updates
and definitely SkipOwner for replication, or you will have some jitter there
but that is not something easy in Blueprints π
hey guys, just a very quick question
If two players in split screen join a match online...
What info does the server have to determine they belong to the same client?
Btw, if anyone has had the same issue with StartSession and SessionState. I got a response from Unreal Bug Submission that it might be by design: https://answers.unrealengine.com/questions/884379/startsession-doesnt-set-sessionstate-to-playinginp.html?childToView=886030#answer-886030
is it heavy if i have actor that is replicated
and that actor have some mesh, partice system, materials, etc..
Not particularly no
i have my game mode that spawning pickups, they are not replicated, so after that i'm spawning "cosmetics" pickups on clients
is this properly to do, or just set replicated on actor, and it will be spawned on clients also
I would just set up a replicated actor
okay, thnx
@winged badger yeah but how does that help me? Iβm trying to get the clients player name from their player state so I can display it
the last question was hardly related to that
with seamless travel, playerstates will persist through the level transition
It also kinda depends on when you are calling this
Which BeginPlay is that?
Random arse actor can have BeginPlay being called before the PlayerState is set
For all we know at least
depends what you do in GameMode @thin stratus
Either you poll the name (mΓ€h) or you let the PlayerState say "Hey I'm here, get the name."
Yeah SeamlessTravel is a thing for itself
in general, PS will be instantiated before the PlayerPawn
by default, clients will have a valid PlayerState on Pawns on BeginPlay
server will not
The image suggests
unless you deferr spawning the PlayerPawn, and set the PlayerState and/or Possess it before you FinishSpawning, on server BeginPlay will be called on PlayerPawn before it has a controller or pawn
He's using it where the PlayerState variable exists
So if this is in the Pawn
BeginPlay is wrong
Cause the Pawn is not possessed on BeginPlay
Without being possessed -> no PlayerState
OnPossessed in BPs
Or just the OnRepPlayerState in C++
Would be a better place
on clients, PS and Controller variables are received via replication, and when instantiating network Actor on clients, BeginPlay is postponed till after PostNetInit
Correct, but Spawning a replicating Pawn will cause BeginPlay to call
And you usually possess it afterwards
unless you deferr spawning
Which is not a BP thing
true
If you are in C++ you can just use the OnRep of the PlayerState
No need to deferr
It's already existing in pawns anyway
having said all that, Pawns have default NetPriority of 3, and PS has NetPriority 1
so unless you change that, odds of PS replicating over before PlayerPawn are zero
which means PlayerPawn won't have valid PS on client on BeginPlay
so, as far as i know, PS with NetPriority of 4+ will be available on clients on BeginPlay
Ah
Well shit lol
So having it on begin play of my player controller could be the issue
BeginPlay of PC could work, but might suffer from the same replication race condition problem as the pawn
Just do it other way round
In PlayerState
On BeginPlay
"GetOwner"
If valid
Cast to PC
And set the Name
its not technically a race condition
BlueprintImplementableEvent calls are asynchronous, and pretty slow
so sometimes they are slow enough for PS to replicate over
Yeh I think I have too many dependent things on begin play, because this has happened elsewhere. I might give them all a custom function and then call that function from GameMode after everything has been loaded?
so sometimes they are slow enough for PS to replicate over
If it's sometimes slower, then "Race Condition" fits quite well. :P
its not a network race condition
I guess we're talking about network BP events here
@chrome bay teleport a camera to Pawn via BlueprintImplementableEvent, then teleport the Pawn in c++
@winged badger is there a function that is called when everything has finished being created and possessed etc
see what happens
If I call a BP implementable event from C++ the event fires right away
I'm fairly sure it does, everythings running on the game thread
Well, put a breakpoint at the end of a longer taking BP function.
And one behind the event in C++
See which one executes first
Pretty sure the BP one does
You would think so, I mean unless breakpoints are done differently because of the VM
Yeah for sure
I mean I have a lot of code that's dependant on BP events running their code before C++ continues
i recently made an error in my revive... i first teleported the camera to Pawn via BPImplementable, spawned some ParticleEffects in c++, and then teleported the Pawn, also in c++
guess what was the result 90% of the time?
camera was locked on Pawns new position, after teleport
There might be something else going on there though. If I have a bool that's accessible in C++ but can be Set from BP, and from C++ I call a BP-implementable event that sets it to 'true', I would fully expect the bool to be true when I access it in C++ immediately afterwards
It has to be cause I'm using these Events to get stuff from my BP
Like a BP assigned MeshComponent
Yeah same here
mine had a void return
In the case of PC and PS. I'm more sure this is due to the PC being spawned and then PC spawning the PS.
In the time that the PS gets Spawned and Replicated, the PC is already replicated to the Client, calling BeginPlay.
I don't see why return type would change the way it's called either way, but yeah. Easy thing to test
its also the PS NetPriority being pretty low
Sure, but in Theory, if both would have the same priority, the PC got spawned first.
So you can't bet on the PS being available
That's what OnRep is for after all
tbh just approach any multiplayer code situation as if nothing is available ever
PC has to spawn first for DataChannel to work, iirc
(I use delegates quite often)
TICK POLL EVERYTHING
all joking aside, I have always done ticking/polling for UI
Far too much of a pain in the arse to do it otherwise
I'm not using bindings cus they're evil but, similar thing
Jesus Iβm lost now. Lol. I have a lot of reading to do
yeah going off topic now π
not to mention that a widget with 10-15 UMG function bindings can readily eat 1ms
Yeah I'm not a fan.. it's a good system from a usability standpoint but urgh
its good for fast prototype
yeah for sure
Well, until the few Name and ProgressBar bindings are taking more than the bad optimized meshes in our scene
I will keep it that way
I say all this, but I always lean towards premature optimization and never get anything done
runs away too
i don't, my prototype UI usually takes between 5-7ms
that's why I've been messing about with hovertanks for like 5 years
then it gets rewritten
oh, and disclaimer for the BPImplementable part before: only testing i've done was with Editor, never know when that matters with Unreal
anyone know how to replicate 'setSkeletalMesh' node?
i've set my mesh component as replicate and run the node in 'run on server reliable' event but it only gets set on server
never replicates back to client
doing 'multicast' sets it on server and owning client but not on other clients
you need to replicate a SkeletalMesh variable, with OnRep, then set its value on server, and then inside OnRep do the SetSkeletalMesh
@winged badger thanks appreciate the reply, i did that with OnRepNotify() but it only works for server and owning client
other clients still see the old skeletal mesh
any idea why?
Is this an engine bug..
- Create a replicated actor
- Add a skeletal mesh componentA, make it root
- Add a skeletal mesh componentB under A
- Hit play and get a stack overflow in AActor::IsNetRelevantFor() because of this line
else if ( RootComponent && RootComponent->GetAttachParent() && RootComponent->GetAttachParent()->GetOwner() && (Cast<USkeletalMeshComponent>(RootComponent->GetAttachParent()) || (RootComponent->GetAttachParent()->GetOwner() == Owner)) )
{
return RootComponent->GetAttachParent()->GetOwner()->IsNetRelevantFor(RealViewer, ViewTarget, SrcLocation);
}```
Which effectively does: ***A***->***B***->GetOwner() (<< this is the owner!)-> and so forth
It never considers that the attach parent could be within its own actor
Gonna see if later engine releases fix it
Nup.
That's weird. So the two skele-meshes are inside the actor, and one is the root?
Nothing seems off about that...
Hmm I did it in a minimal example and no issue
Gotta figure out what on earth is causing my stuff to trigger that
@chrome bay My theory is that when I SetRootComponent() its not reordering the components so its not checking the root component first
Need to find out where IsNetRelevantFor decides to test the child mesh first..
The problem is that RootComponent->GetAttachParent() is returning a component within the same actor
Whereas if it was actually testing the root component, that wouldn't happen
It would be null unless attached to a different actor
Any ideas why the Get User Widget Object would be null on clients that are not locally controlled? They receive a name fine, but trying to show it on a world space widget which is null.
@chrome bay Found it. Had to call DetachFromComponent() after setting it as root π
haha
In my game instance i have a event that adds the widget to the viewport and show mouse cursor, im using get player controller. And then it shows this error
That event is fired in the map bp when begin play
How about putting the Widget Creation into the PlayerController (:
Instead of putting in into 3 different classes
Where two of them have nothing even remotely to do with your UI
Hello, iam trying to create an app where the server player moves around and all the clients move like the server does
can i do this without having a pawn of each player on scene ? only the current player pawn ?
Hello there!
How do I ServerTravel on a dedicated server? I managed to make it work on a listen server but it doesn't work with dedicated servers.
Hey guys. I am fairly new to Multiplayer inside Unreal Engine and encountered a problem which took me a while to find the cause of it. When the player hits another player with a melee attack I do a trace. On the client everything works fine. However I figured that the server is only registering the hit event when it actually has the client performing the melee attack in the viewport. Any attacks from clients outside the servers "Viewport" are not registered. Can anyone help me with that?
π€¦ π€¦ π€¦ nvidia why does simulated latency with clumsy affect your shadowplay overlay π€
π₯
If you call an event that executes on client from an event that executes on the server is that code after the client event technically being run on the server? The server is telling the client to run that code. Im having like a brain aneurism trying to visualize this π€
Client sends server rpc -> server sends client rpc is pretty normal
The client could ask for some info and the server responds
is that code after the client event technically being run on the server? No its running on the client
Its not technically running on the server either
when people say "oh the client shouldnt ben in control of this"
If you told the client to do something from the server is it clear in that sense. Cause it wasnt ran directly from the client
The client can still override the behaviour, yes
Thats normal when you start
But heres the thing
Whatever the client decides to do with that information doesn't affect anyone else
Because the server isn't basing anything off that
The clients do what the server says (or they can hack it and not do it, all they're doing is getting the wrong result!), the server never does what the client says
The only thing the client should really be telling the server is the inputs they pressed
yeah i get this. thats the problem
i cant apply it in reality
i get the sabstract concept
abstract
Just takes getting used to, it wont be fast/easy
Takes a long time and a lot of frustration
so then as an example this is bad right?
Im letting the client increase its own movement speed at the end
because this was the only way i could get it working properly. Where movement speed was working on the server and the client
I can barely see that, its so low res
middle mouse click to browser
Ah
There is no graceful way for a beginner to do sprinting as it requires inserting your own replicated flags into the client-side prediction system
Meaning, its very advanced
so its not even possible to do 100% properly through blueprints
Definitely not
hey guys is gamelift supported for a droid and ios
@eager geyser i dont think so
so what are the possible scenarios of getting dedicated server hosting for android are?
as far as i know gamelift should work for you
what you are uploading to gamelift is only a binary and gamelift will create instances of it
but the gamelift sdk source code specifically used macro #IF WINDOWS
IFΓ64 And #IF LINUX. So that means it's only for Windows and linux
did anyone created android Multiplayer game with dedia Ted server hosting with gamelift or any other service
check out how to create a dedicated server from the editor , that means even if you are creating an android app your server can be an .exe
Sorry to push my problem again. I really hope someone here did experience something similar and can help me. I am totally lost by now.
Original Message:
Hey guys. I am fairly new to Multiplayer inside Unreal Engine and encountered a problem which took me a while to find the cause of it. When the player hits another player with a melee attack I do a trace. On the client everything works fine. However I figured that the server is only registering the hit event when it actually has the client performing the melee attack in the viewport. Any attacks from clients outside the servers "Viewport" are not registered. Can anyone help me with that?
if you are tracing from the skeleton
you need to ensure the server is updating the bones
otherwise server will be in a or t pose (model pose)
@meager spade I am currently testing exactly this. Glad you had the same idea. Do you know where I can set the tick option for animations? Is it Mesh->VisibilityBasedAnimTickOption ?
Is there any setting directly in the editor for this?
woah where? π¦
on the skeletal mesh
I must be blind π
found it ... omg
thank you so much
this made hit detection almost work perfect now
there are times when I hit the enemy (particle spawns at impact point) but the server doesnt retrieve the actor and therefore doesnt do the damaging stuff
but its a whole lot better now than before
Hey
uuh weird problem
so my game checks if a line trace hits a player when i left click
which is replicated by the server
it works fine
but damage is weird
lemme share images
as you see both server and client recognize it has done 1 damage
but when i switch to the other player he does more damage
and if i switch back to the main player he will do 3
and so on
Why would the server not detect pitch for this? For some reason the server is only updating the yaw. Any ideas?
@dark sandal I think you need to replicate your health variable
So I am running into some heavy rollback with physics handles, while the server (left) sees everything as it should be, on clients, whenever the physics handle component in the character is active, it seems the update rate just goes down tenfold
everything on the character side runs on the server, with values replicating back to the client when needed, its just that I cant seem to figure out what is causing the rollbacks
Hello guys,
I've created the lobby system using "Advanced Sessions ". And
" Lobby Player Controller" the contained player info "structure" variable , on "servertravel" player info variable not transferred new the player controller. what this is problem solution?
"Looby GameMode"-> On postlogin event All players info added to array and if all player ready state game starting game. All player created to showing loading screen widget and after servertravel -> loaded to TestMap.