#multiplayer
1 messages ยท Page 570 of 1
using that approach means your game runs slower with lower framerate, but its logic is consistent no matter what
yeah that's what I was going for
but i see why that doesnt work with networking
So, the server should be calculating everything right?
Then telling the client how to move
it depends on your game, what are you going for?
an fps arena shooter
an FPS shooter requires fast response times for the client
press W and the user should move immediately on the next tick on their screen
saying that the server should be calculating everything and telling the client how to move is vague, but partially true
the server (in most cases, probably yours as well) is the eventual authority and decides what actually happens
but so that the client doesnt have to wait like 0.1 seconds between pressing W and actually moving on their screen (which is about the time it takes for the client to send the 'move forward' input to the server, the server processes the request, and sends the eventual position back to the client), the client instead predicts the position the server will send back, and moves there immediately
and if that position is wrong then the server does something about it?
if the position predicted by the client is wrong, then the client corrects itself
its an intricate topic that I can't detail here and right now, theres a lot to be discussed
dont let that scare you though, its relatively easy to implement
you should google it and read up
I will, but can I ask something else that may be a familiar problem?
sure
Look at CharacterMovementComponent. It handles a ton prediction for fps movement.
I have it so the client and server are calculating velocity, but when a client actually moves it's very jittery, is this because both the client and server are setting velocity each frame and I need to set it up so that the server only sets it at certain times ?
I can't say
Alright
there are too many possible reasons that can result in jitters
Its something I can't find on google either lol
eventually almost every networking problem ends up as jitter on your screen
it can be a one line fix or a fundamental flaw in the system's design
it's weird because the animation that is based off the characters movement speed is also glitching out, as if the speed isn't staying consistent
if the animations are driven by parameters that are experiencing jitters, like position or velocity, then it's expected if the networking is bugged, not weird
fix the networking, and the animations should smooth out
Are you doing movement with simulate physics?
not ue4's actual simulate physics but's working as if it's simulating a physics equation
like the velocity function is essentially doing v = v_i + a*t
except with a bunch of rules
Hey guys! Does anyone know how to execute a servertravel with fade out / fade in ? The client instance does fade out, but then it flashes the scene before going back to full opaque and fading in again (I guess the pawn is becoming unposessed)
The character movement component saves a bunch of movement input snapshots with timecodes on the server and sends them out to clients so that they can recreate everything that happened 50ms/100ms ago. Use last input info to predict further movement.
While recreating that movement the client may receive another movement update interrupting this sequence, or adding more info to the sequence.
That's for updating remote players to clients.
For a client, the same movement input snapshots are collected and sent off to the server for correcting movement (assumption), but ultimately the client dictates what happens to the character locally and you hope its in sync with the server (and players are not cheating).
So should I be having the server calculate this every frame? I'm confused on how I'd let the client be in control while the server is doing its thing. With the way I have it set up it lets the client get its next velocity first then sends inputs to the server, but I think this might be causing the jitteriness. The server is setting the server's movementcomponent->velocity to what it gets each frame, should it not be doing this?
because if it doesn't, the character wont move
or maybe it does actually
nvm
https://docs.unrealengine.com/en-US/Gameplay/Networking/Overview/index.html
Simulated Proxy
The Actor is a remote proxy that is controlled entirely by an authoritative Actor on another machine. Most Actors in a network game, like pickups, projectiles, or interactive objects, will appear as Simulated Proxies on remote clients.
Autonomous Proxy
The Actor is a remote proxy that is capable of performing some functions locally, but receives corrections from an authoritative Actor. Autonomous Proxy is usually reserved for Actors under the direct control of a player, like Pawns.
Setting up networked games for multiplayer.
I've been testing this only as client. so now when i launch it as a listen server the server doesn't spawn the weapon.
Ah okay
that actually helps a lot
i'd say that it does @faint seal
that hand IK is wrapping around something there
even if you can't see it
Just the base pose from animBP
so are actors autonomous by default, or do you have to set it?
You have to set it in CPP
there is also nothing that would prevent listen server from running spawn logic there
I found it, i left a owner no see node in from a previous iteration.
But at the same time the client could still see it with the owner no see checked
i never use those, find them awkward
they are fine for an online tutorial
but i will always go for checking local control and SetActorHiddenInGame
@vagrant saddle i wouldn't go round changing actors to autonomous
Autonomous is special
I was messing around with having first person arms and third person mesh. Was a pain
CMC will love ticking them skeletons on server if you mess with roles
It seems to make sense with what I'm doing though
what are you doing?
networking custom movement
yes but what?
@faint seal in outliner you can choose which world you see (server/client..) via illuminati eye
so if you checked there, you'd see there is an instance of the weapon on the level
the character calculates its own velocity each frame
and would be corrected by the server if out of sync i suppose
and autonomous seems appropriate for that
Which worked for the actor/mesh's that i put on the character in editor. I couldn't find another way to do it with the guns i spawned at run time.
SushiToday at 8:24 PM
so are actors autonomous by default, or do you have to set it?
INV PYRToday at 8:25 PM
You have to set it in CPP
pawns, possessed by a player controller become autonomous
ah okay
They're not using a pawn
if you are not using pawn, why not?
pawn is for anything that can move or have input logic
so when a pawn is possessed by a player controller
it will convert the local pawn on the client, to autonomous
Oh my b, mixed you up with someone else
oh okay lol
to keep things synched
only the playing client should send input
server should then use that to calculate
client can move and server will also move, any reason you are not using the CMC?
Character
@faint seal I am taking the same approach and it is a frustrating setup
if i was to ever make an FPS, it would be True FPS
I am but I set up a custom way of calculating velocity because I wasn't able to use acceleration the way i wanted to in CMC
not a seperate arms/body
so like it's built on CMC which could also be an issue
@vagrant saddle you can pass in acceleration tho
@prisma crescent I gave and just moved the camera into the thirdperson mesh for the FirstPerson look
and it can calculate it all for you
I have to set certain rules for calculating velocity, I'm not really sure if what I'm doing is using the CMC or not, because I'm just directly setting the character's velocity
I can just show you what the functions are
RequestDirectMove
takes in a velocity
maybe thats for pathfollowing
tho i did some hacks ๐
Creating a custom movement mode would help
I was thinking about doing that but I liked that the way we were doing it kept it working with CMC so that I wouldn't have to handle jumping and everything
cause I read custom movement suppresses all other things
that is not actually true
you can still do the other stuff
you just have to handle it
whilst in your custom mode
So I could call Unreal's jump within it?
sure but you would need to handle that
been a while since i read through the CMC
and i tend not to remember much of it, its a beast
am I able to actually read it's cpp file somehow? I can't find it anywhere
in your ide?
yeah
open your custom CMC derived class
and ctrl click on UCharacterMovementComponent
will take you to its header file
and yeah it will be
C:\UE_4.24\Engine\Source\Runtime\Engine\Classes\GameFramework\CharacterMovementComponent.h
is the location to mine
but no cpp?
shortcut keys are time savers
I'm still confused on how I should be having the server handle this, cause currently I have it calling every frame like the client's movement calcs, and idk how else I'd do it
the client is moving but it's very jittery as if it keeps setting its velocity to 0
networking is silly
I'm mostly using VS because I have a student license from my college
ah this is free till feb 2021 ๐
i was beta testing it before the public beta, its come so far ๐
that's nice
Pretty clean, how is the intellisence equivalent @meager spade ?
is client-side prediction something you do only for autonomous proxies or can it be done for any simulated proxy? and who is in charge of client prediction if that's the case?
@meager spade Yeah, JetBrains' IDEs are awesome. Moving to VS for UE4 was depressing
Is Rider good enough to use as of now?
i say no, some disagree
I gave it a go, didnt like it, it still needs to address stuff before id use it.
that's pretty much my experience with it. though that screenshot above doesn't really show any perks to use rider over VS
and resharper, which also powers rider, is usually the thing that slows down VS so
so you made your decision that an IDE is awesome in about 15 minutes?
my condolences for having to be a java programmer
Indeed
Does anyone know what the recommended way to play root motion animations for CMC is in a multiplayer setting? Do you only play it on the Server side or both?
For the ability tasks in the Gameplay Ability System I think they play them on both sides
That being said they might have some additional code to make it work better
Is there an obvious reason why GetDefaultPawnClassForController isn't running in my gamemode?
Did you set the correct Controller in the GameMode?
Yes, although I don't see why that effect whether or not that function runs?
Shouldn't that function run everytime a controller requests a pawn from the GM?
Ah
I added the override specifier, turns out it's not being overriden
No idea why. My GM is a child of AGameMode
Dude that's really weird. That function should be overridable ๐คทโโ๏ธ
According to the docs it is not virtual
I could have sworn it used to be
I used some function awhile back to achieve the same result
What is a good way for the game mode to determine what pawn to serve to PCs without this function?
@lucid vault You need to override the _Implementation version
Since it's a BP native event
hi guys, i'm new into unreal engine and i'm trying to follow an youtube tutorial to setup a server with unreal engine using my computer to host it and let connect another pc to it, i followed this tutorial https://www.youtube.com/watch?v=QGrRV-11sx4&list=PLG5XT5TF5T6iSpoYsFolz_fVKWRmsobDv&index=2 now seems that i was able to compile,build and packaging everything whitout any error, i can launch the server and run the game, i open 127.0.0.1 and server receive my connection, but still unable to connect from a different computer.
Hello guys welcome to another tutorial. Today I will show you guys how to compile a dedicated server for your own game. This will allow you to host your own server, and have anyone join it from across the world. I demonstrate this by putting the packaged final game on a usb an...
there is any way to debug or "ping" the server from another pc to see if server is receiving the connection?
also i see that im connecting to 127.0.0.1:53480 while in documentation it say that port used are 7777
i've forwarded on my router that port should i forward also that one?
you wont be able to connect via another computer on a loopback address
try configuring your network adapter to something like 192.168.1.2 and the other to something else with the same prefix and subnet for direct LAN testing
thank you i wil try i also noticed that when i try to connect it give me thie error LogLoad: Took 0.080499 seconds to LoadMap(/Game/Maps/MAPNAME) [9:39] NotifyControlMessage: Client connecting with invalid version. LocalNetworkVersion: 334850937, RemoteNetworkVersion: 2077486219 @verbal gust
im using ue 4.25.3 and i build source code with 4.25 release
i imagine i need to rebuild with that branch right?
any particular reason why you are working with the source code instead of prebuilt binaries?
i have very little knowledge in networking i followed the tutorial i've linked
and he compile the code from github
what is the main difference between that solutions?
Is there any good reason as to why map variables cannot be replicated?
as in TMap, not level ๐
Just very inefficient to do so most likely
also issues when using objects as keys etc
Alright, that is a valid issue
So for a scorelist, a good alternative would be... datatable?
or two arrays perhaps?
Array of USTRUCT
Alright that should work, thanks
Two arrays won't help because they'll be out of sync
Also suggest using FFastArraySerializer if you really must replicate an array
Oh, they aren't sorted
Since if you change array size, that elements and all elements after it are also replicated again with default array rep
Actually I need to lookup the specifics again.. but it's not ideal
This is all in BP for now, but I'll keep that in mind when porting it to c++
(also data table is strictly an asset-time thing)
If it's player scores btw, just keep those in the player states
Yeah, I did, but I can't access all player states from a widget it seems
You can
GameState::PlayerArray
Contains all active player states in the current game
Ah! Thanks!
np's
@twin juniper Just asking but personally i wouldn't want to deal with source code when their non-source code version does the job. Unless your doing something very specific
ok thanks, do you have any link of tutorial or documentation on how to use prebuild binaries? i'm very new into unreal sorry for bothering
You can't build a dedicated server without engine source is why
this guy is really good at explaining things related to network: https://www.youtube.com/watch?v=16BvKb-OPOg&t=293s
๐ฎ Unreal Engine Replication Series - Part 1: What is Replication?
๐ Welcome to the Replication Series! This beginner tutorial series dives deep into how Unreal Engine handles Replication. Understand more than just the "how" and explore the "why" behind important concepts tha...
But then you probably don't need a dedicated server
yeah my idea is to try to setup a simple connection i don't care much about game itself, want to test out simple server setup if everything work smooth my idea is to migrate then all on a dedicate server maybe cloud , for now is enough to host on my local network
thank you i will take a look into that
i cant seem to be able to include the "OnlineSubsystemSteam.h" header even after adding what the documentation says: build.cs:
blueprint function library:
not sure if im missing something small
You may also need to add it to PrivateIncludePathModuleNames
ah cool, thank you that solved the issue
@gleaming niche So i double checked the router settings, and there was an option "add port application" and then i clicked it, is this the part where i have to add the port 7777?
Shouldn'thave to.
Virtual Joystick is only for playerindex 0 right? its not my replication problem?
Player 0 is always the localplayer, in a client. Player controller etc on client side only exists for self.
So why unreal chooses the latest client when running multiple PIEs?
Isnt all of them local in the theory in the dedicated server?
is there a way to send rpc's to specific/select clients only?
Client RPC
ah sorry, i was referring to multicasts
eh
you said "send rpc's to specific/select clients only" no multicast mentioned there..
and no not really
either the actor doing the multicast does not replicate to actors who are not supposed to recieve it, or you do the matching inside the Multicast RPC once it has been recieved by the clients
there is no way to specifically send a multicast to certain connections
mh right, i was afraid so. thanks for clearing it up
if it has to go to certain PC's
do a Client RPC
as its on the server anyway, server can grab the player controllers of who it needs to send to, and just do a client rpc
yeah that seems reasonable
@gleaming niche Rebooted my router and my pc, cant seem to connect
i was also wondering whether i could use the custom_condition to selectively replicate relevant information to clients thats relevant to them
from what i understand from reading into it, it might just work, but i didnt get to try it
Your pc, and the server are plugged into the same router arent they
No they arent
And you modified the router rhe server is on, like i said in the firdt place?
No i havent touched the 192.168.1.1 of the windows server machine
......
Google "how does networking work"
Or something
Youre trying to connect to a server on a different network via public ip, right?
Im accessing this machine through VPN and remote desktop
If you are, its the OTHER server that needs ports forwarded!
So that a public internet connection can go through ITS network
On a specific port
And reach the server
Modifying your own router
yeah i am trying to connect to the public ip of the server machine where my game is running right now
Is only for if you want OTHER PEOPLe to CONNECT TO YOU by YOUR public ip
If you didnt setup the server yourself
Then you need to ask the provider
To map ports for ypu
If you have a dedicated public ip
If you do not jave a dedicated ip on that procider
You cannot do this.
i mean you can use a dynamic IP with something like DynDNS or w/e
Trying to build a Client Authoritative MP game, with a lot of collisions (think, Rocket League). Any advice on how to actually go about sending client inputs to the server and simulating physics on it based on those inputs?
The problem is the public ip doesnt connect down through the nat to the server he is running.
It doesnt route.
He can connect over vpn (lan ip)
But not public
Because the public ip doesn't know how to reach his server machine lol
i dunno, i just set my firewall settings, on my server, and boom it works ๐คท
thats because the router doesn't expect an incoming package from the client so it ignores it
then again i know what im doing lol
Exactly
All multiplayer games connect via public IP right? games like csgo that have dedicated servers
Ive explained this 5 times
ofc how would they connect?
all dedicated servers will have an external public ip though
Indeed, but with the steam implementation in ue
You still need to open the querry port for ds.
Even when using sessions/lobbies
Ier 27015 +
damn
all you need to get through the NAT is dedi to send a packet to clients ip/port before the client can connect really
And hl2/source. Has just stuck.
and UE implementation for dedis doesn't do that?
I wanna go back to valve and forget everything.
Yeah
it matters only if the server is behind NAT
Or with a lobby
doesn't matter what kind of server
server should have a dedicated external IP though
So even if its a DS it can do steam sockets.
dedis tend to have a public IP, so they don't usually need it
where no punchthrough is needed
hmm
It uses the steam lobbies which were originally "matchframework"
btw @winged badger i found some more interesting fails in the nav system in UE4
In the original source engine implememtation
i am shocked
not as spectacular as the one we both saw lol
that entire system is held by ducttape and prayer
And then it was moved into steam itself in i think 2009. After i left valve.
And then made availavle to steam partners
@gleaming niche they put 2 defines for the same thing in 2 different places, and only one is configurable, the configurable one only works with default nav filter, any custom nav filters, uses the non configurable one...
You meant to tag zlo, but i dont mind
the fail here is, WHY is there two defines for the same thing..
oh i know about it
nah was just explaining the fail ๐
incase you didn't understand what i was talking about
was trying to take your mind away from it.. ๐
Lol
think the other person got scared off
and to be fair, you did start mixing ladies and lobbies ๐
Ladies can be mixed with anythinf.
yo guys, i need to get info about my players from an external sdk that is already implemented into unreal, what is the best place to call that sdk function to get that info before any player joins? beginPlay()?
def not
you shouldn't even allow BeginPlay to be called before that's already received
whats the scenario?
i was trying to find a list of functions in order but i cant find anything
i got my servers in playfab
don't care about that... whats player doing? connecting for the first time?
and they host session there and pass the list of player to their sdk
i want this before players even connect
there was a hook for that somewhere
its mostly used to check for and download updates
but can server for this purpose as well
You want to read on server?
might had been PreLogin
Or client?
Then somewhere in prelogin/login/postlogin
no
well its the first step
Prelogin calls when they ask to join
Login is called when they join
prelogin is like a permission
It sends the challenge packet
well i dont want that either then
because this needs to be called before any 1 is even asking to join
So how can it look then up?
if it needs to call before anyone joins, then once the server is hosted and the map is loaded, just run that function ๐คท
yes exactly but is there a place for that?
So server automatically knows someone is connecting, without the client telling them "i wanna vonnect"?
you mean the function to retrieve the info is in the SKD?
and that function doesn't return immediately
it should
only if all the data is on that server
at least from what i gathered fro mthe documentation
What sdk is this
playfab
So playfab knows a user is going yo connect before they try to?
u spin up a server on their end and when it spins they send a list of al lplayers to the sdk
yes
And it can predict the future, for unreal to preload?
because its matchamking
you make a ticket with a list of player and they spin a server for those players
Then shouldn't you be Ble to hook in the place where it.. notifies?
Ive never used playfab so. Im just guessinh herem
well it doesnt notify anywhere, you just call GetInitialPlayers()
its not like a callback
if a matchmaking Ticket spinned the server up
Ahhh
that data is available
So you wanna know after the server loads
So like OnMapLoadConplete
Or something
Well search that
i want to know if a function like that exists
if the playfab initializes early enough
That is called after map loads
And just make sure its not /fame/entry or whatever
i want to know if any of you know what the best place to call such a function is
I need to change this damn keyboard. My typos are attrocious
I just told you. If you can get past my typos lol
i don't know when does prefab get initialized
but map load shouldn't have anything to do with it
it should initialize before anything
u spin up a server on their end and when it spins they send a list of al lplayers to the sdk
@limber gyro how playfab can know the list of players while you it is spinning the server
@rich ridge because they spin it based on a matchmaking ticket
He just wants to know when to call it after the server has loafed and is rrady for players to connecg.
override its ShouldInitialize to check for dedicated server
Means players will have to wait 2-3 mins because server spinning will take take.
Onpostloadmap or whatevrr it is, seems like at least a starting point.
The same place iirc the default implementation of a session would be
@winged badger i dont need to check for a server i just need to know the correct place to call fucntions before every one connects
Whatever gamemode calls
im gonna check that @gleaming niche
InitGameState
is fine
in GameMode then
its called right after GM is instantiated
and there is no connecting before that
ok great
Begin play???
thats actualy sounds like the correct place
Yeah initgamestate probably males more sense for this.
Yeah screw this im changing back to the neural keyboatd beta
you should probably now allow BeginPlay (ReadyToStartMatch to return true) before all the players on your list have connected or timed out, too @limber gyro
Okay i think this is better. Less typos to be had, i hope!
can switch to 2 fingers typing technique ๐
im just doing it with a timer haha
and a player counter, so when we have 6 players in a match it starts
@limber gyro why counter???
and what happens if you had 6, one drops out before connecting?
But default samsung keyboard sucks. So i switched back to the beta keyboard that is similar to crapples ios keyboard. Lol
@rich ridge count the amount of players in the server so it can start
(In function)
@winged badger thats a good question
Yes we have
PlayerStates register with GameState on BeginPlay
i havent ironed out those details tbh, its my first time doing online multiplayer
if you're checking for number of registered PlayerStates in GS to start a match (call BeginPlay on World)
After PostLogin, players are added into playsState array
you have a chicken or the egg problem
I just have a warmup period that waits either for all expected people to join and be ready, or timeout and start a "practice " round, unless they never come.
But, its an fps so its ok.
PlayerStates register with GameState on BeginPlay
@winged badger player state is created right in the Login call of GameMode
Created yes. But it doesnt register until startplay
Ohh
Which calls beginplay
as PlayerArray is not replicated, every instance of every PS on every machine registers on BeginPlay
you do have AGameMode::GetNumPlayers and GetNumTravellingPlayers for this
@winged badger dude how do you know so much about unreal?
i do this for a living so i made it a point to read through the game framework code a couple of times
where do you work at?
Ironward
UE4 code base is so big mustve been a daunting task no?
i didn't read the entire engine
but i did get very familiar with the classes in GameFramework folder
you should definetly make a tutorial or 2 about that
function call order and stuff like that
theres nothing out there
Multiplayer can only be experienced ๐
all i remember was Zlo swearing and cursing at the way UE4 GameMode is
btw thanks for the info @gleaming niche
whilst he was making the custom GM
we made a system that is able to procedurally spawn 30k Actors and have them networked and ready for 8 player match in 12 or so seconds
every tiny detail in order mattered
and only once all clients have finished generating the level, does the game start
as well as lying to the engine where appropriate
intrigued to see what you're working on ๐
we even got accurate loading progress bars as a sideeffect ๐
12 seconds* Hardware dependant ๐
no shitty laptops were involved in 12 second benchmark
only raspberry pi
but during the Steam fest, average load times was around 22 seconds
which i think is quite acceptable
we can still shave a few seconds there
@winged badger how do you lie to the engine lol
oh we do a lot of lying
it had to think that all the procedurally spawned actors were loaded from the package for this to work
when it comes to networking
as in those actors existed on the level
not just spawned
so we don't dispatch any begin plays, we do some overrides to make them net name stable, only once everything is done, does BeginPlay get dispatched, and things start replicating
But yeah, GameMode, 20 function overrides and only 2 Super calls here
its bad ๐ฆ
If Elon Musk's neurolink could* upload this channel to my brain I could work at Rockstar
i had to "lie" to the engine sorta, to get steam to work with dedicated servers
pass empty stuff into the overrides so that it doesnt crash
the deeper you go the bigger the lies become
@peak sentinel Surely pigs can get this uploaded this channel to their brain and work at RockStar before u
that would be interesting
If that happens most of the people won't get pork to eat... By the way I don't eat pork
I have this question and couldn't find answer to this, this is not related to multiplayer but it's related to hosting server and cost.
My question is.
I m running my dedicated server on gamelift, and using some third party service which also happens to run on AWS.
So will I be charged for network urges between these 2 services
Amazon do states that within amazon cloud there are no charges , so I m confused the same is true between inter company products in aws
For example my gamelift and Epic Online services
not sure this is the right place to ask that kind of question
There are people here to happen to worked on mp games and have dealt with AWS, so must be knowing, that's y asked
hi all, im working on a multiplayer pong and it all seems to be working good, however sometimes, the client sees that s/he hits the ball but then the ball just pushes it away and pass through, because in the server, the paddle wasn't quite in the same position yet
is this an intrinsic problem that will result from the authoritative nature or the server, or is there any way to alleviate it?
the paddles movement is client-side predicted and works fine, but the ball is completely simulated by the server
is it possible/desirable to have the ball's state in the client "ahead" of on the server?
I'm having an issue accessing save games on local machines. I have an instance running as the host on one PC, and his selected character is green (pulling from his save game), then another instance running on a different PC with their selected character to be red, but when it enters the game, it pulls from the host's save game, and now both characters are green. I know this is probably an issue with replication or something, but I don't know what. Anyone have an idea?
Hey guys, anyone knows how does root motion works for multiplayer? I have some animations with root motion that move all over the place in the client but look nice in the server. They way im doing this is that I'm playin a montage in the player character via a NetMulticast Function.
I'm beginning to sense Zlo and const_cast work together... which is also why they seem to be the experts on everything ๐
Without those two in here I feel like we may be lost
haha I think you're right
is it possible/desirable to have the ball's state in the client "ahead" of on the server?
@livid holly Im not really sure but this doesn't seem right. The player being ahead of the server could lead to some heavy gameplay losses. How are you handling the impact between the ball and the paddle?
I spent the entire morning trying to make it work but there was always an issue
There always are, its all good. Are the paddles like different pawns? How do you handle collisions with the ball?
the paddles are pawns, im just using unreals physics
Don't forget Jambax
what I need to avoid is simply, if the autonomous client hits the ball, it should hit the ball
i just had an epihany though. Currently, when the ball enters the goal in the server, the score is made and the next ball comes
but maybe I can make that, if autonomous proxy paddle hits the ball, it warns the server, and even if the ball in the server enters, the server reconstructs?
so it's trusting the client a little bit
When the ball hits the paddle it should notify the server and he should figure out what to do. Trusting the Client is never a good Idea, since can be prone to cheating or network de-syncs.
What I would do is to notify the server once I found the collision so the server tells the ball to go the other way.
yeah, but one of the requirements is that "when the player client hits the ball, it hits"
thats what I just thought of @fossil zinc , seems easier than what I tried to do in the morning
gonna try to implement it, thanks
Np man, good luck.
hmmm but then I cant just replicate the balls movement right? Otherwise, if the server goals before the paddle hits, the ball is going to tp behind the paddle, and then tp back to its gameplay position
Well I think it depends on the way you're moving the ball. If you're using a Movement Component (Which would be ideal) you can add a force from the server the component would do the rest.
im just using a static mesh and simulating physicis
The physics engine should replicate too if you apply those in the server.
Haven't try it but the physics engine should be easier to replicate, since should be already implemented.
Physics can't replicate
Not unless you just expect the server to tell you the newest physics state a full ping time after you move
And of course UE4 physics are not deterministic
I mean im not replicating the entire physics, just the position / velocity using bReplicateMovement
That's not really a thing
bReplicateMovement will teleport your object randomly behind your current location because your local movement will always be ahead
No interpolation either
bReplicateMovement only works for replicating the initial location of an unmovable object, ironically
๐ค
For actual movement you need a full blown rollback/replay movement component like CMC, or your own thing
so instead I should replicate position and velocity and interpolate?
Yes, and then rollback to the old stored state matching that server state's time, replay stored moves, apply some inevitable correction
this in the client or in the server? In the client right?
Client
Server will need to interpolate too to account for framerate differences
Remote clients will also interpolate
Owning client is the hardest part
Ive done it for the players paddles, but it can be done because the autonomous client can store all the inputs
and then when the server sends back the state, it can rollback and reapply
but for a simulated proxy like the ball, there are no inputs
There are, it's the hits applying forces to it
When I call "LoadGameFromSlot" while in an online session, it always loads the saved game that exists on the server, even if the client is calling it. Is there any way to have the client get its own save game data from the local client?
[Question] Im using blueprints and sending an RPC to the client when they do damage to somethingg.. right now it's just an Int.. is an Int64 more bytes? regular blueprint Int's are only 32 right?
the damage amount can never go over 9999
so i think an int is my best bet.. unless its not?
For dedicated hosting on aws gamelift, are there any tutorials on getting a blueprint project into aws without buying a plugin? I have a vr project where I want to host and get multiplayer into
@strong vapor Int32 is an immutable value type that represents signed integers with values that range from negative 2,147,483,648 (which is represented by the Int32. MinValue constant) through positive 2,147,483,647 (which is represented by the Int32. MaxValue constant.
You will be able to go quite high, if you want something smaller you could go int16
there's no way to do int16 or int8 in blueprints though right?
i might bring it down to C++ later but right now im just tryin to get it togetehr
thank you for the answer!
Np. You can try short I believe? That might work and it's 16 bit
But yea without C++ I think you need to just stick to int32
so.. lets say i spawn an actor on the server.. but its netdormancy is set to dormant all
does it still exist on the client when i spawn it on the server?
does anything happen on clients when it spawns?
[Help] So i'm noticing that just because i spawn an actor with a replicated variable that's also set to expose on spawn.... in the client's construction script.. that variable is not set to what it was set to in the SpawnActor function
i basically just wanna make sure my arrow's charge power is on the client the moment it spawns
cause i wanna set it dormant and let it just do its own thing to save on data
instead of having it replicate movement
mmmm i guess i could hold off on activating the projectile movement component until the charge power comes in on a rep notify
or i could just multicast spawn the actor with the variable.. just seems sloppy
seems like a repped variable should be repped on the moment of construction if its exposed on spawn
[Solution] it might not be there in the construction script but its there on Begin Play.. i just activate the ProjectileMovementComp there.. woot
Hello Guys Are there anyway to Sync the Fractures sometimes its not same xD
Hello Guys Are there anyway to Sync the Fractures sometimes its not same xD
@odd iron I've never done anything like that but it seems hard to get the exact same behaviour in both machines, since aparently is a bit based on physics and thats a bit unpredictable. Again, I'm not sure so maybe someone with more experience can lend u a hand, but the idea is that you replicate instructions and things like this are reproduced in each machine.
Yes its hard to Replicated Physics Stuff also I have Grab System same issue the Synchronization between the clients is different little bit
what part of it needs to be exactly the same for your game to work?
maybe some of it can be faked.. and some could be turned to actors with replicated movement somehow
is it the actual tumbling down that needs to be the same? cause that seems like it would be really hard
and a lot of stuff to replicate
[Help] Im trying to use the network profiler.. and in my capture i think it's telling me there's some RPC
RPC's that are huge
but how can i find out more about which ones and what scripts and stuff
i can click on the actors tab and get a read on all the replicated properties
but what about those RPCs
ah shti found it
bottom right, rpc filter
Can I serialize a weak object pointer to a replicated component/actor into an FArchive, and send that across the network?
that doesn't seem like something that would work
it would if actor was loaded from the package
but if it wasn't all you can serialize into FArchive is the Actor's name, and there is no quarantee those match for dynamic actors
and FArchive doesn't know how to write in the NetGUID instead
@analog rover
i am puzzled why would you even try something like that
Eh, I'm doing stuff with GAS and they have to serialize everything in an FArchive before doing RPCs
Well, target data anyways
{
Ar << Object;
bOutSuccess = true;
return true;
}```
Object is a TWeakObjectPtr<UObject>
Surprisingly, this works fine
I haven't tested it with dynamically spawned UObjects, in this case it's just a component I placed in the world
And I don't know if there's some additional processing of the FArchive that converts the references properly in GAS specifically, but it seems to be firing correctly so far
isnt "SetControlRotation" replicated by default? why should I replicate this function?
Only ControllerRot is replicated variable there
and without function replication it only replicated to everyone unless the owner-client
hi guy, i need help on multiplayer display name
any 1 can give me a help how i display it
why is it that when my client throws the ball, the server still shows him holding it??! also when I send a click input (throws ball) it will force the client to drop the ball??!
im going crazy with this
@analog rover the NetSerialize functions are called with a special FArchive type that serializes objects with the Package Map.
So it can be done, you just need a wrapper struct (or of course you can just send them directly)
How do I set values in the player state from a widget? This don't seem to work
Widgets can't have RPCs
The PlayerState would need the RPC's, and the widget would simply call those functions
Widgets/UI has no network functionality. It's entirely local.
sure would be nice if the blueprint compiler warned you when you try to put an rpc in an object that doesn't support networking
Yeah.. seems like something that would be so simple to do too
Thanks guys, that fixed my issue! ๐
if someone was dedicated enough to do some unspeakable things, you could make widgets network
and im not sure there is a way for a BP compiler to tell if the object is supported for networking or not
Widgets encapsulate cosmetic things (which runs on the local machine). Cosmetic things (just the local representation on your machine) and real gameplay should be seperated.
My recommendation: recognize the structure of the engine, and build things that reinforce/compliment that idea.
It's not recommended for widgets to drive gameplay state. It's ideal for just presenting what is going on (as observer)
Does anyone have experience with VOIP? How does one set that up?
Net pktlag is not round trip ping, right?
I'm having trouble using the joinsession and hostsession blueprint nodes. Connecting to games on my own machine works fine but I can't manage to connect to any games not on my own computer. What could I be doing wrong?
hey guys any ideas on why my server and client deviate? #multiplayer message
@pallid ember can you show your BP's
@heady python https://blueprintue.com/blueprint/nw3gfd-o/
https://blueprintue.com/blueprint/_nddl58m/ <---I tried multicast, every replication option here
https://blueprintue.com/blueprint/i3g9icv5/ <--- when the ball detects an overlap, it will attach itself to the player
https://blueprintue.com/blueprint/pdtb9tek/ <-- tried all the replication options here as well
when client throws ball, it is not shown in server. also, the server by mouse click can cause the client to release the ball. strange behavior!
eww
why you using GetAllActorsOfClass
so how does the server know when you have thrown it?
your release just grabs the ball locally
and turns its physics on
how does the server know that?
and why are you not storing the held ball?
you KNOW you have the ball, why not just store a reference to it
what should I be using instead of GetallActorsOfClass to reference actors in another actor?
it fires the release event before adding impulse
what do you mean store the held ball or reference of it? the ball attaches itself to the player's socket
@meager spade all very good points. but the "release" blueprint is supposedto be replicated on teh server
@meager spade right after adding impulse
@meager spade I've tried that same result
then the server has to run the multicast
I tried that too
๐คท
but what you have there is wrong
Client can't call Multicasts
also you need to add impulse, etc on the server
there is more to do that what you are doing to make that ball fly on client
so I need to clone the add impulse for the server and the client?
either make a function that is Run on Server
and call that, which does all that logic
including a multicast
okay perhaps I need to wrap up the whole throw logic in a custom server event, and after calling that event , run the rest on the client
yes
@meager spade also you said get allactors of class is bad...what should I be using instead
storing a reference to the ball
when the ball overlaps a player, you have the ball right there
just store it as reference
okay but the overlap event is in the ball actor
it attaches itself to whoever it runs into
I assume you mean the actor variable in the player blueprint
oh I see what you mean now. I was confused because the ball was being attached to the socket. you meant the reference to it should be stored in the actor who has the ball so I don't call getallactorsofclass fucntion
So today I am working on my gamespark database and I have a question about best practice. My Idea for best practice would be. On server start up - Catch all database information to the server. (That way we can make changes on the server and prevent asking the database for that information all the time). From what I understand is that each call to the database creates an object. I can either catch that on the first time it is called or have it already cached on server start up. The benefit I see to catching when used would be that you would only catch player data of current active users for that week until maintenance. Were this would clear the catch and objects from the server.
is Epic Games Online Services allow us to be Listen Server in Android/iOs?
Anyone else can feel free, and encouraged, to help me with this issue, but @glossy quartz was helping me the first time. My question is lengthy, and I have to go to work soon, so I posted it on answerhub as well. In brief, while in an online session, how do I load a saved game from a client's computer and not the server.
https://answers.unrealengine.com/questions/985091/mp-loading-a-save-from-clients-computer.html
I have a switch authority node... if i only call it on the client, nothing happens. If both client and server are connected, both call it.
But why doesnt client on its own calls it ?
I just ran mine as client and it printed out the message it should for being a client.
oh yeah it prints the right messages. But i have a function that only gets called when Server and Client call it, but never the client alone
well because the pawn is replicated so you will get only what the server does? So the pawn would have to be the server to work?
argh fml
its an OnBegin which binds the UI events
this is all so confusing for me ๐ฆ
well it should get better
see you make a custom event
then you set it to execute on either client or server through the custom events properties
then you can run that function you want from the custom event you set to run on client
the point is, the object should never be replicted ... its an UI Helper which just handles the UI things
The player controller sets up your hud correct?
yes and no
i have 2 seperate systems that each bring their own little hub
so i have a helper as a child actor that sets up the UI
the child component is not set to replicate and still the stuff of it gets called on the server ๐ฆ
well yea so what im trying to say is that if you make a custom event and then set it to run on client it will run just like it was on the server so that is were you should create your widget so that you dont have to change it on the server to set the settings.
yeah sure. I did understand what you said
And this is how i do all my stuff so far with the communication
but here, the object shouldnt be replicated and still gets replicated
I am not sure but I think its because the pawn is being replicated so everything attached to it is also.
hrm thats quite possible
but i also saw that my other component gets replicated i tought wasnt
so ... there is that
i think im so close to understanding what im doing wrong with my system but i am also so close to giving up. Learning a new Engine and Network stuff at the same time maybe was a bit much for one person alone
This code leads to no print. Can anyone tell me why ?
what actor is this? who is spawning it?
this is a childactor on my main character pawn
if the client spawns the actor the client 'has authority' and there is no remote as far as I know
the server must spawn actors that you want to replicate
the server should spawn them ... i think.
you seem to be correct
that changes everything
my brain is melting so hard ... i wonder how people manage to keep up with all that all day long
it's a bit hard at first but once you understand the concepts and the framework behind it gets easier to detect this kind of small issues
yeah trying to build a casting system right now ... where the server checks if the cooldown is ready and the resources are around and then informs the client that everything is okay so the client starts casting and then informs the Widget to show the cast bar
it shouldnt be such a hard system but damn am i having a hard time with it right now
working on it for 3 days now
atleast i got a big overhead removed with your help @jade patrol thanks for that!
glad i could help
now i just need to figure out why my event on the server gets called but the client never gets it
then i should be able to cast my first spell (big moment^^)
if you receive the event on server you can call then another event for client only
yeah that was the plan
so my server, at the end of the check has a EventDispatcher that gets replicated "ServerCastOk" this dispatcher gets triggered but only on the server
if i knew why, my problem would be solved
i guess event dispatchers just dont work over network as i imagined they should ?
no i dont think they replicate like that
oof ... joe i would recommend the document of exi about networking ... that thing answers your question
i would answer it but i forgot the correct answer
okay ... great ... my client now gets informed about the event of the server
but my ObjectReference is null ๐ฆ
so i guess i cant send references between server and client ? but this has to work ...
@subtle peak game state is replicated, it contains the array PlayerArray of players state, so everybody has that
you cannot share references ๐ you must replicate the data
how do i replicate data if its a simple data class ? ๐ฑ
you need to store the reference locally and update the data,for ex, player controller hold ui widget and you want to update ui widget of player x, you just say you want to update ui from player x ... not sure how clear i was, but the reference should exists locally
so to say it more simple. My server does all the stuff, then says the client "Hey dude, we need a Data class of this type, i generated mine with these presets, make yours yourself, you need it later" ?
kind of yeah
my brain is melting out of my ears right now ๐ but ... as exhausting and frustrating as it is ... it kinda makes fun
but what is the class?
@jade patrol What do I use to get the owning player pawn inside the Player State then? I guess I can't use "get player character 0"?
just a simple description of a spell. Cooldown, resource costs, casting time
so it should be the same for client and server anyways ... but later on i want to generate this data out of a database on the server and send it to the client
fml i can ?
hm wait
give me 2
okay ... @jade patrol so i have a class that has the struct in it
i guess thats the only way to gurantee i can have multiple spells ?
so when i say the variable on the class is getting replicated, does the whole object holding that ref gets replicated? that would be sickl
oh wait i could just send the class reference and not the object reference
since the class should have all that is needed for the client ๐ค
@subtle peak i think there is GetPawn function there that gets the controlled pawn of that player state
@glacial burrow so, if the object is replicated and the variable of the object is set to replicate it should be fine i think, but if the struct contains references it wont replicate those, references are only locally
okay i think this is the big problem in my thinking
i worked for 3 years professionally in another engine on exclusive single player games. So network understanding is a bit difficult. But ... thinking about it, its totally clear that i cant send references between client and server ...
i got figured it out by sending only the class ref and not the object of the class. The client never needs to know what the server is doing with the object, like counting the cooldown ... its enjough when the client gets a value with "count down 15 seconds" and does so and gets an update from the server all 5 seconds about the cooldown so they dont get out of sync
i think in your case is a bit overhead to sync the seconds on cd. Usually you do that on client and on server at same time. So Client:Player cast spell, start cd -Server: VerifyCd (no: do nothing) (yes: cast spell, start cd)
oh yeah thats also a good idea to handle it
the syncing thing more was a safety net i would build "later" if i run into problems
BUT: Good news! My Castbar on the client now shows the little icon of the fireball. This means that the whole communication chain works!
gj
Thank you so much andrei for just giving me the few "hints" to think about my problem! โค๏ธ
How would one obtain servers(dedicated) IP on postlogin/join?
uhm ... when exactly do you want the dedicated ip tsauken ?
onpostlogin
oh, for that i have no idea, sorry ๐ฆ
usually you have a service for that that returns registered dedicated servers that are running in your area
i dont need that for server browser
if you look at online subsystems they usually implement servers and lobbies
they dont have that feature
im using steamadvancedsession
and that plugin doesnt have anything IP related, atleast nothing that is exposed
i just need to retrieve the IP that the client is playing at
steam should have the sessions of dedicated servers ...
i can get the session sure, but that doesnt help
oh i see, you want the ip ...
yup, i need to use the same IP for something else (connecting to VOIP server)
maybe when you register the session you also add the ip manually there?
as a param
and then when you get the sessions you read the param
just an idea, sure there is a better way
but thats the same issue, how do i retrieve the IP so it could be added as a param
GetIpAddress node?
does that even exist?
yeah i see in docs as well, but dont see that in the editor
only example i found on the net
but cant really do that with PC, might try adding that with actor comp and see if it works
https://github.com/alexhajdu/WhatsMyPublicIP-ue4-plugin this is what i found
i tried that too, its pretty outdated
couldnt manage to compile it, too many errors
the only solution I know (which is bad) is to read an http request that gives you your public ip ๐
If i have a pawn which belongs to a player and send an Event onto it which is replicated to owner. Why is the server calling it too ? ๐ฆ
this is my last big problem for today to solve ๐
who is making the call to the event? the server? the client? both? is the event replicated?
you probably have a replicated event that calls that pawn event
yeah ... :/
ok so I think I am going with catch player database to the server when a user request an item from the database. That way the only cached objects created on the server will be the objects of active players for that week because the server will reset during maintenance each week. Now on structuring the cache system I am not sure about. I would think if I set up the cache system in alphabetical arrays I can use Item names to search the correct arrays within the cache system. The reason behind separating these into alphabetical arrays is so that arrays are small and the server will not need to search the whole cache each time it needs to check if a player has an item. It will be able to check the cache array that is based on the first letter of the item.
this should save MAU count for database costs correct?
I have aquestion that's been bothering me for a while now
is this equivalent to 240 ping?
is this what's happening here?
yes
you can measure it to verify - just send an rpc back and forth and print the start/receive time
sweet, then the 'average' preset that essentially provides a variance between 240 and 120 ping is really not the average case lol, usually server pings are about 60 ms
yeah
idk, a lot of online servers I play on, the pings are about 20-75 ms
the vast majority of indie games will not have regional servers - for player hosted games over the internet you can consider 120 the low average
i usually refrain from joining 100+ ping servers because those are unplayable
hmm, yeah
im just pleased is all
when taking up the challenge of networking programming I treated the internet as the shittiest platform I could imagine it as
but its really not the case, its actually very performant in the average case
and that really helps my sanity
Wait, the outgoing + incoming latency in network emulation is equal to half the ping?
ping usually refers to a round trip time, so from the client to the server, and then from the server to the client
Gotcha
That's actually good for me because I was worried that the "bad" preset was a much lower ping then I would see in practice
you cant really tell whats the true client->server time or vice versa, but a good guestimate is just half the ping
yeah, they should really change those presets' names lmao
@chrome bay Aren't you TheJamsh from the UE forums?
shhh, hes incognito
how do i add a widget to a specific player viewport and not all
for local multiplayer? ie. split screen?
I just had the weirdest bug where in my PIE, the property was replicating fine from the server local player (listen server) to the client's simulated proxy... but in the build (or even in the launch game standalone), it wasn't
I was using GetOwnerRole() == ROLE_SimulatedProxy and it just wasnt working
and all I did was changing to using the IsLocallyControlled() flag and now it works
๐ค
Umm I have a problem when I change the skin of one character it changes the whole lobby, what do I have to do to fix it
I am trying to understand FFastArraySerilizer and found this in the comments```-You MUST call MarkItemDirty on the FExampleArray when you change an item in the array. You pass in a reference to the item you dirtied.
-
See FFastArraySerializer::MarkItemDirty(). -
-You MUST call MarkArrayDirty on the FExampleArray if you remove something from the array.```It says what we need to do when modifying or removing an item but it doesn't say what to do if you add an item.
So my question is when we add an item to our FastArraySerilizer what function call do we need to call? MarkItemDirty() or MarkArrayDirty()?
you mark array dirty after add/remove
and item dirty after change
@magic quest its not really a networking problem, you changed the material on mesh asset instead of instance of the mesh
@livid holly PlayerState has a ping variable, for displaying it on screen for players its good enough
tx
when I play 2 instances of the game in launch games, sometimes the client drops for apparently no reason, OnNetworkFailure returns the error "connection to host lost"...
anyone has any ideas what might cause this instability? it's not any anti-cheat server validation
using netprofiler, I dont see any big traffic... outgoing bandwith 1.4 kbps is that too high?
(avg)
read the logs, both server and client
hmm once the client enters the map I get a lot of LogNet: VeryVerbose: GetFunctionCallspace indicating the RPCs... and then suddenly for no reason there is a
LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
i was adding 2% pkt loss, maybe that has something to do with it? I didnt know packet loss could randomly disconnect a client
and at the same time server logs?
Does anyone know a good way to maintain order for items in FastArraySerelizer?
put an index in the item
i rarely use fastarrays to replicate data without an object pointer, and when i do i rarely care about the order, index in the item handles the few cases where i do
Hi, I'm trying to replicate firing a projectile from the default first person character and I've used:
UFUNCTION(Server, Reliable, WithValidation)
void OnFire();```
to make it work on the server, the problem is that the sound and animations no longer show up because all of it runs on the server. what should I change to fix this?
stupid question. does a dedicated server has its own controller?
because i am being convinced that it does, but i dont think so
didn't know you could pass both Server and Client, thank you
so call an RPC function inside the client function or bind 2 functions to the action?
your Fire function executes local logic that you need + calls a server RPC
so I call an other RPC function that calculates position rotation etc and spawns the actor and then play the sound inside the client function?
is any 1 have experience in set multiplayer display name ?
can teach me
Can you use the same FFastArraySerializerItem across multiple FFastArraySerializers?
In my project, players join as spectator. They get a widget, which submits a text. When that happens, I RPC to server inside player state to set a replicated "name" variable. Then I RPC to server inside player controller to spawn the default pawn for them. On BeginPlay for that pawn, it gets the player state and updates a textcomponent over their head to display the name that they had in their player state.
But inside the pawn, when I cast to the player state, I get a failed cast unless i add a delay after BeginPlay.
And 0.2s isn't enough, it has to be like 1s. So I'm wondering... isn't PlayerState created as a player joins the game? As in, when they join as spectator?
Here it seems like spawning the pawn is when the playerstate is spawned too
I wish that there was a "Everything is ready" event that you could use and know that there would be no failed casts due to things not being ready yet
@zinc garden PlayerState has a much lower NetPriority compared to a Pawn
so it tends to replicate later
your pointer to it inside the Pawn replicated just fine, its just that the PS Actor itself didn't replicate yet
@timid moss yes you can
i done save data to player state, and get data from player state,
my question is do we need to pass the player state to server?
when i trigger server to update all player data when have new user join
@winged badger Oh okay thanks.
you can increase PS priority over 3, but keep in mind its not foolproof
it will break if there is packet loss, sooner or later
Yeah, I changed it to update the text OnRep of the name variable instead
Hi has anyone tried/looke into the newly available network prediction plugins?
it has extras for maps and example classes
seems to be a good complement to the overly complicated GAS system
@winged badger sorry but think you could answer another thing for me? When I fire the submit event from my clients widget, it gets the player controller, and rpcs to server to spawn the character. If I print string this, it seems it fires twice. Even if I have 3 clients. Any idea why?
no i dont know whats connected to what, or if this is pie
or something else also prints
It's just a straight line client widget > text submit event > client playercontroller > printstring
But I guess if it doubles up that early, it shouldn't be anything to do with network
as it happens before I even call server on the PC
and yes, it's PIE
put a breakpoint instead of printsrting
Ah true, I need to get in the habit of that
Hmm, it doesn't accurately show what all the clients get either. Get Game Mode ought to return null for a client right? if I mouse-over it, I do get a value even when viewing from a clients perspective
The breakpoint only fires once too... so weird.
thats expected
in this tutorial, the guy just calls the server function to move forward
i did the same here with SetControlRotation
why its not working for me?
Hello guys! Iโm looking for some consolation tbh lol
My friend and I had an idea for a fun simple multiplayer game and I knew about Gamelift and figured, โhey itโd be easy!โ
Iโve looked into Gamelift and I realized it looks crazy complicated. I was looking at Flopperamโs tutorial series
Iโm wondering, if I do manage to get Gamelift working properly, is designing a user interface for a player lobby gonna be easy-ish (programming wise)? Is it easy to implement replication?
Iโm worried it could turn into an unmanageable can of worms
Hey guys! I'm dynamically spawning a bunch of replicated dynamic Static mesh Components on the server. And when I go to delete them, using the following code:
{
TArray<USceneComponent*> ChildStaticMeshes;
BuildingProgress->GetChildrenComponents(true, ChildStaticMeshes);
if (ChildStaticMeshes.Num() > 0)
{
for (int32 i = ChildStaticMeshes.Num() - 1; i > 0; i--)
{
ChildStaticMeshes[i]->DestroyComponent();
}
}
}```
I end up getting the following warnings on the dedicated server:
LogNetPackageMap: Warning: UPackageMapClient::InternalLoadObject: Received reference to pending kill object from client: PathName: NODE_AddStaticMeshComponent-4_3, ObjOuter:
And the dynamic mesh is not cleared on the client.
This code runs on the client, so I'm not sure what the warning means.
Can someone help me understand what I could do?
void AFloatingActor::GetLifetimeReplicatedProps(TArray <FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
//Replicate CubeActor
DOREPLIFETIME(AFloatingActor, VisualMesh);
}
public:
// Sets default values for this actor's properties
AFloatingActor();
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
what am i missing the object spawns but doesn't replicate to other clients
The reason I ask is because I have a question regarding the highlighted text. I'm trying to figure out how to do that
What strategies have any of you used for a multiplayer only game at launch (small user base etc)? This is 4-8 players and wonโt have dedicated servers either, so bots isnโt really a viable solution. This will be PC, Steam only.
Well obviously never attempt a MP only title without a publisher's backing
And keep the player count at 3 max
Look at Disintegration, made by 20 experienced devs, published by Private Division, sold a few tens of thousand copies, and just announced they'll remove the MP mode because they have no one playing
That's 10x the average Steam launch
@bitter oriole do you adsive the same thing* for mobile too?
of course you need support for every MP title, but should you never attempt it on mobile too?
Mobile is probably much worse because a lot more games have 0 users at all, but I'm not familiar with mobile so take that with a grain of salt
understood thanks
do the packet simulation settings added do DefaultEngine.ini work in shipping builds?
I need to do something to have the "Run dedicated software" option available?. Is not showing in my current project
I'm trying to connect with a buddy to try out my game. I've started a listen server (using commandline-argument MyMap?listen), but he's not able to connect using my public IP (again using that as a commandline-argument).
I've opened up port 7777 which some posts claimed to be the default port
Am I missing something else? Can't find much official documentation regarding this...
I could connect to my own server using my local ip, and he could do the same
@zinc garden read the server logs
when it opens a map, there will be "listening on port XXXX" line there
is it standard to use the AOnlineBeaconHost / AOnlineBeaconClient classes for dedicated servers, where i guess the server would spawn the AOnlineBeaconHost and connect people trough that as a login. or are these just for player hosting? really hard to find any documentation on how to start making server code btw.. does anyone know any good tutorial / documentation that lists the classes commonly used etc..?
LogNet: GameNetDriver IpNetDriver_2147482568 IpNetDriver listening on port 7777
But I do get a yellow warning
[2020.09.20-19.44.49:346][ 0]LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
anyone know how can I get top down template working in multiplayer?
if i set my players inventory data on the server then how can the client save its inventory locally