#multiplayer
1 messages Β· Page 615 of 1
Simple asset like traps and stuff
I'm not asking the complexity, I'm asking which kind of asset, are they textures, meshes, Blueprints
Does anyone know a good solution to assign Audio to a specific gun in multiplayer with replication? I Managed to do it, But it's probably the dirtiest blueprint I've ever made
Your base gun class should have a "play firing effects" method fired on all clients and it could simply play a sound cue property that every gun overrides
Hi Guys
How can i make the Advanced Session Public? ..
I have An Advanced Session Creating on PC and i can join it through Android but Local how can i make it public ?
What's the OSS used
i'm using Playfab Service im registering the Session but its need the Server or the host IP and i can't get the IP of the host
Playfab Services @bitter oriole
Alright, not familiar with that
the Secret Key was exist in photo xD
Hello guys, advice please.
Would you go with a data table or a data assets for inventory items database in a multiplayer environment?
Thanks
Oh? I was just feeling like datatables would be easier for an external database but they're not easy to work with in cpp. I'm trying to choose the lesser of two evil
datatables are trivial to work with from c++
with external data, probably not so much
A lot of times I've had to reference blueprint assets using ConstructorHelper and I hate to do so.
Like trying to set the default data table in a struct.
i use singleton
if (GEngine && GEngine->GameSingleton)
{
UMySingleton* Singleton = Cast<UMySingleton>(GEngine->GameSingleton);
MyDatatable = Singleton->MyDatatable;
}```
can go into a struct constructor
and it will work
I've actually not had much trouble at all with using datatables through CPP
Smooth experience
Wow. Didn't know this. Thanks.
I'm just finding that out today.
you just make a UObject derived c++ class, derive a BP from it to assign references
and assign it (BP class) as GameSingletonClass in your project settings
Kinda like how data assets work?
The singleton approach is flying over my head a bit Zlo, could you explain why you'd use it?
its a singleton engine will instantiate for you
very early in its startup process
so for anything except the CDOs its safe to access it from constructors
I'll give it a try.
can TakeDamage be called on clients? I need to make projectile to produce effects based on TakeDamage result (different actor types), i.e projectile hits body part => calculate and apply damage based on body part armour
if body part still ok => add decal, play blood splats
if body part destroyed => play splats, detach body part and other stuff
it was previously triggered by multicasts from server, but body part data was not replicated properly when rpc is received on client
or is there a better way of doing it?
TakeDamage should only be called on server. Calling RPC or OnRep function when damage is applied is usually the way to do this stuff, but there will be latency as the client sends the shot to the server, then the server sends the RPC back.
From this you can improve by predicting the hit on the client and adding fx/decals etc, but the server may reject the hit so you may need to rollback.
also the issue if character has a "barrier" bubble, rocket projectile calculates chance to pierce barrier in it may or may not hit actor and possibly explode inside it. so one takedamage event (projectile hit character's barrier) may produce more damage events. where should it be? in projectile onhit or character takedamage? @silent valley
I've not implemented projectile weapons yet, but I expect the projectile OnHit is what ultimately calls TakeDamage and this would also be the place to decide if it needs to spawn other projectiles, etc.
but you need to make sure this is done on server, and prediction in this case will be quite difficult
Is it bad practice to have functions inside functions?
no
That's music to my ears
I guess you'd need to be careful not to end up in an infinite loop right?
how is this a #multiplayer question ? XD
and yes, recursion is a thing and you need to be careful with it
apologies, I spend most of my time lurking in here
what is the difference between having higher or lower tickrate?
Tickrate is the framerate of the server
Except servers don't render frames so we call it tickrate
Higher tick rate = needs better hardware, but lowers the lag for all players, improves consistency, physics, etc
You should buy servers based on the tickrate you want to reach
It's a performance metric, not a setting
Depends on your game and how much is going on
Cant know till you test
yea
i set my tickrate to 60 and my game was lagging
assuming my hardware couldn't handle 60 ticks
How did you do that
Your clients view was laggy or the server itself was? I'm assuming you're running both on the same machine in PIE
in baseengine.ini
It'll be fucky, you gotta build the dedicated server to even see what it can do.
really?
i was trying really hard to optimize
yea i see
IF you're doing your testing in PIE you're flying blind anyway, at least put the project on another computer and launch it as a server
that'll be closer to the real dedicated server perf
thatll at least get you closer
There's a few settings you can tweak:
MaxNetTickRate=60
NetServerMaxTickRate=60
LanServerMaxTickRate=60
NetClientTicksPerSecond=60
bClampListenServerTickRates=true
MaxClientRate=10000
MaxInternetClientRate=10000
ReplicationDriverClassName=/Script/HTCore.HT_ReplicationGraph```
oo
Quite a few more but those are the main ones I use
Can find most them in NetDriver.h usually
thanks!
I actually had to clamp because in test maps in editor, it would try to run at like 200 frames and saturate really quickly
Although that in itself was probably something caused by me
Hi, anyone use playfab ? I don't understand how the OnlineSubsystems and PlayFab work together, or if they shouldn't
yeah I know it's completely separate but
I don't understand the stuff with sessions, online subsystems
I want to make a cross platform game
not really
I mean kinda
U cant connect to their servers directly through IP
as it has to go through their stuff
yeah it's through the API right ?
It's not really any different to how Steam or any other OSS handles it
Playfab is just a different service
You could probably quite easily write an OSS for Playfab. You can use more than one OSS at once as of a few builds ago.
wdym write an oss, there's an official plugin on the markeplace
There's an SDK but I doubt they bothered to do it in OSS format
wdym oss format
OSS is just a platform-agnostic interface for whatever online service you're using
The idea being that game-code doesn't have to care what online service you use - and all of that logic can be identical no matter what
Engine comes with implementations for Steam, Xbox, PS etc
You don't have to do it that way, but it's much more convenient than trying to integrate platform API calls directly into game code (IMO)
but PlayFab is cross platform too so..
It is, but lets say you want to just use Steam later - you can just change OSS without having to rewrite half your game
And you can use all the existing session / achievement etc. code the engine comes with and use it in a backend-agnostic way
so you're saying OSS + PlayFab functions
That's just how I'd do it anyway, but you don't have to
I just don't understand how the two work yet
The OSS (online subsystem) is an engine-level interface between your gamecode and your backend service API
It's designed to be totally platform-agnostic, so it doesn't matter if the game goes on Steam or goes on Playfab or Xbox or whatever, the idea is that the game portion of code can be the same.
so in c++ it's like I implement some oss interfaces and put api calls to playfab for example inside
yeah exactly
ok thx
same way as the other ones are done like the Steam one
alright
All API's have different features and different implementations, but that's the general idea
cool thanks
It could be that the PlayFab SDK plugin does it that way (haven't looked at it) - but I've seen more than enough questionable online stuff on Marketplace at this point.
yeah but it's not some random dude it's MS
The original GameSparks implementation was pretty shocking, to put it lightly
I tried this but it didnt work unfortunately, how can i get pre login via bp or must i use c++?
Steam π
whats great about it not being an OSS and the reason why playfab didnt
Cross-Platform development is no joke
as that they rely on other platforms for logins sometimes
like if u want to login with steam
or facebook
or apple
You could still do that via the OSS if you had to
or android device id im pretty sure
It's just more about exposing the API the the game in a way where the game doesn't have to care what the backend service is
It's more of a code-design thing really
My advice tbh, just make the game for now - worry about the platform later
Chances of it being big enough to matter about being cross-platform are slim anyway.
no I need to host the server and know how difficult all that stuff is
That's what I'm saying though, you can host a server anywhere at anytime, you don't want to add a dependency on some third-party before you even have a game running.
especially if you don't think about it at the start imo
true
Just after having some experience on this, it pays dividends to keep your game code separate from any third-party stuff you rely on.
Because otherwise the minute that third-party becomes a barrier, you're screwed
The more easily you can hot-swap stuff, or just plain cut it out, the better
MP development is hard enough without other companies getting in your way too π
GameSparks used to be very popular here with folks with cross-platform ambitions until Amazon bought them out and suddenly jacked prices through the roof.
right thanks for the advice
Suddenly everybody with a GameSparks implementation had to rewrite half their game
But yeah just generally, the game is the hard bit, backend can always come later π
but what if you want to release fast to iterate
I agree with the 3rd party-agnostic argument but I think backend should be taken into account early
well the backend you can change at anytime, unless for some reason your dependent on a feature it provides
cross-platform dev really is no joke though
Well it's not just the online side of it, it's the game itself too
can't I just build & package for other platforms
change some optimization settings before
idk I never tried
no π
Just take a simple example - getting a UI to work both with KB & Mouse and a Controller
you won't really find out until you do it
But just be prepared for XYZ works on Platform A but Z doesn't work on Platform B etc.
yeah
As an indie doing multiplayer, the biggest two challenges are making the game, and getting people to care about it
The latter of which is wayyyyyyyyyy harder than it sounds
it seems to me many indies are too ambitious or not ambitious enough
most are unrealistically ambitious
If you can't realistically sell like 100,000 copies, just use listen servers. I would never even think about trying to build out a back end for a first game
Stranger has the go-to figues, but you have to be in the top 1% of games on Steam to even have 1,000 players, ever - something depressing like that.
Also most games on Steam look like hot garbage too so that definitely doesn't help. Not that there aren't any objectively really good games that didn't sell, but there aren't a whole lot of really bad ones that did
Players will forgive you if you launch a decent game that isn't cross-platform, they won't care about a terrible game that is cross-platform π
Stranger ?
I wanna see those stats
@bitter oriole π Another resident of #multiplayer who discourages people getting too big with ideas early on π
So I don't have actual figures, but our game was a global #1 seller on steam for a couple of days when we launched. All it really showed me is how low the bar is to reach that spot.
Trends come and go ofc, but the figures aren't impressive at all
Feel like we got off topic but anyway, I hope this wasn't too overwhelmingly negative π
thats the best feeling prob
how many are you in your team ?
when u put in a ton of effort and it ACTUALLY DOES WELL
At the time there was 6 of us I think, but we have/had Publisher support too (and still do)
maybe if indies teamed up more often the games would be better
and people appreciate the work
k
But we had a decent following before launch thanks to Kickstarter and the like, so that helped. Building a community around a game before you launch is critical nowadays
For Indie, at least
I think my main problem is art
Everyone has a different route tbh
Just play to your strengths and don't go too crazy
Keep your goals in check
etc etc..
Yes and no. You need a clear vision, dedication the borders on obsession, and the ability to shut down scope creep to actually get something done. You won't get that with a room full of people building a game by committee.
Hey guys, is it possible to have two controllers controlling the same pawn?
like mods and such
Not by possession but indirectly, yes
Got any examples I could look into?
I'm trying to get two players to control the same pawn (one controls movement, the other controls rotation)
I don't have any examples but you can very easily have multiple controllers have a reference to an actor, and just send it things like aim direction or control variables etc.
Local prediction might get dicey
what about owners? won't that be a problem too?
Not right away. If you don't want any specific controller to have a higher priority, have neither one possess the actor and just have both of them be sending it commands.
have each controller possess a proxy pawn, have that proxy object route the input to the "real" object
Yeah exactly.
Assuming we're talking multiplayer
yep, multiplayer
so how would that look like?
two helms, each one is a pawn?
controlling the same actor?
So spawn a non-visible pawn of some kind, could just use the APawn class
Then bind whatever inputs you want
Then just use their input functions to send the input to the "real" object
Or send via RPC or whatever for MP
Wouldn't even have to go through a pawn really, could just route any network calls via the controller
Can't promise the results will be good π
ohno
Yeah input still one of the things I haven't exactly wrap my head around completely. for weird situation like this I usually just consume the input in the controller and have the controller past whatever data over to wherever it needs to go
Why wouldn't they be?
Don't worry about it, just try to make it work. This is definitely not Unreal engine 101 level material, but you can make it work. My first week messing with the engine I did something similar, made a mirror image ability that made a copy of your character that mirrored your actions
I mean, if I'm sending controller input and run the movement code on server, why would that be any different than regular movement?
Won't know until I try though
this is all assuming you aren't using a character pawn btw
what do you mean? My 'main' player is a ACharacter and the helms would be APawn
You can do this with a character pond, I've controlled multiple character pawns at once just by RPC
kk I've never tried, can just picture it being not so great
@vocal cargo all right spell it out exactly. what exactly exists in the scene, do players only ever possess half of this character or are there other characters?
Right now there are multiple Characters (Regular humanoid players) and multiple spaceships (Pawns)
Do the players possess spaceships or are they only AI driven?
I want to have two helms to control the ship: one controls movement, the other one controls rotation
So I walk up to the helm, possess it was presumed play some sort of sit-down animation, so now they are driving the helm instead of driving the character, just like Grand theft Auto when you get in the car
they do need to be possessed by an AIController after we unpossess I think
to keep the speed variables
yep yep
No they don't need to be. The variable should exist on the pawn
Okay then this is easy. In a two-person setup, you would have five things at play. The two characters, the two helms, and the ship.
So when you possess the helm, all of your input is now going to the hell. you implement whichever input actions you want.
What the helm needs to do is continuously send some sort of data to the ship. The aiming helm will send a rotation or an aim direction vector, and the driving home will send the flight data.
So when you are sitting at the aiming helm, the aiming helm is continuously getting your control rotation and passing it to the ship actor.
And when you are sitting at the flight help, the flight home is continuously getting your wasd inputs and sending them to the ship actor as thrust and turning or whatever
I think this will work pretty well
wouldn't be so sure if it was something more fast paced because of the input lag
but since it's a slow moving ship, I don't see why it wouldn't work
Yeah it'll work great. yes you're going to get input lag because you can't predict the actions of something that is shared between the many people that are controlling it. But that's fine, how fast does a spaceship respond
it's not even direct input for movement/rotation
it should just increase the speed of the movement or rotation
I've implemented the exact same system in the context of a sailing ship. what you will want to do is make a base class for all of your stations, and that class would implement the logic regarding popping in and out of the station. Make sure that works before proceeding.
Then you subclass that bass class into various things like weapon stations or navigation stations etc, and in those stations you implement the input handling
The Base class should also get a reference to the ship it's attached to and save that so sub classes could just directly talk to the ship
The stations can have their own cameras etc. As well
isn't that base class just the PlayerController?
that can handle possessing/unpossessing helm/player
could even have an enum or bool specifying the time of helm it is
so we send different data depending on that value
You can do The possession and unpossession in the controller, sure.
But I would make a base helm the handles setting a reference to the ship actor.
The player controller would have to hold a reference to your old body so it knows what to possess when you want to get out of the helm
The player controller doesn't even need to know that the ship even exists. that's how you end up with spaghetti, with everything having references to everything else
Set which reference?
to the ship actor
i did same think (this is my). Cast to gamemode which is set in project and level. but it fail (for client) every time
and this is in course in same blueprint (playercontroller) but it works for client and server
what can i do wrong
@hollow oasis game mode only exists on the server.
i know, but dont understand why this works on second screenshot
there are two copies of your player controller, the one on the server and the one on the client. It is only succeeding in the one on the server.
If the current game mode is not BP _ game mode, then it'll always fail. Which is probably the case if the top one always fails on both
Wait a second, how many game mode classes do you have?
its in course where i have 1 Base gamemode and 1 for "round" base game and "tdm" base game
round and tdm is child of base gamemode
in first ss i have one gamemode
and right now i know what i did wrong π
What exactly does Force Net Update do?
I have looked at it and the documentation
and I thought it meant that the server will change its values to match the clients
but obviously thats not it
Does anyone know?
It probably just forces a net update. So something is only updating very slowly, you can force it to update. like if a value only replicates five times a second but you want it to replicate instantly when you change it, you would call Force net update.
ah
You cannot make the server change its properties to match a client's, that's not how replication works. Replication is exclusively Server -> Client.
If you want to update something on the server, you need to RPC from the client and update it manually on the server.
Still need help π¦
i have this
but when i use Game mode variable it doesnt work
i am doing it on server i think π
i do the cast in playercontroller
then use it here
same blueprint
You're doing it on both the server and the client. However, that variable setting is kind of a waste. Getting GameMode and casting it to the right one is cheap, don't bother making upkeep by making a new pointer for it.
Just get the game mode and cast it in that server event.
Alrihgt -- I need a BASIC "for dummies" tutorial on how to make Text Render correctly display a character's name above their pawn's head in a multiplayer environment for everyone else to see. Caveat is that the data comes from a widget editable text box. Has anyone come across any such thing?
Heck, if anyone knows an amazon book that covers this, ill buy it. I will throw money at this BUT I need to learn it, not just use someone else's work.
@woven sinew @chrome bay invoked me so here it goes - 90% of all Steam games have less than 15 online players right now, 95% have less than 75 players online right now, 99% have less than 1,000 online players right now.
So consider your player count for a typical session, the % of time spent waiting for a match vs actually playing it, and your target sales - you can see if it makes sense or not.
Download Project: https://bit.ly/3h9Dpg4
Join the fun: https://discord.gg/32qgNwm
this guy explains very well
if u understand basic replication you should be able to understand
Thank you Vision. I think this is twice you may have helped me.
I understand it at a basic level but i'm missing the bigger picture.
This is exactly what i want. and exactly the issues. lol
I wonder if my two days of stress is due to using the TextRender component instead of adding a widget to the character (which i did not know was a thing) lol
I guess you meant authority check. Gamemode exists only on the server
yea I told you about it
it looks cooler
yeah i know
@open wadi you got to figure out where the problem lies. Instead of trying to do it all at once, make sure each piece works.
Yes, you did. I won't deny it.
@open wadi
-
make sure you can get the text from input widget to the playerstate ON THE SERVER
-
Make sure you can pull the text from the playerstate into the display. This is local, never touches the server.
So to start, I'd have 2 clients printing the names in the PlayerStates on tick and confirm that I can change them and it all works out.
I'm pretty sure player name is already a playerstate variable so don't make your own if so.
For step 1 you'll need a run on server event somewhere. Either in the Playerstate or Player controller or Pawn.
I have one on my Character, named Set Name, Executes on Server custom event at moment
I'd put it on the PC or PS but anyway, does it work? Does the change make it to the PS and replicate out correctly?
Are you trying to have the name live on the pawn or on the player state?
The desired intent is to have the variable live on the player state and pass it back and forth to the game instance when i need to change levels.
The tutorial that Vision has provided with me is good. I think it is going to answer what i was missing.
Im very appreciative of the help you both are trying to provide. You both deserve medals for even touching this!
I have sounds playing during my walking animations (they are used on a blendspace)
The server can hear the footsteps normaly
but the client's have 2 of each footstep playing, How can I go about fixing this?
Do child actors replicate? all the options for replication are checked and its not replicating
Is the actor class set to replicate, is it created on server ?
In my experience with child actor components the child actor 'component' needs to be set to replicate for it to directly work but usually I just have a multicast set child actor since for some reason the server setting it to a replicated actor still dosnt work for me at least
Thank you. This tutorial was very helpful. @dark edge thank you for your help and patience as well.
is behavior tree replicated?
or in other words, the Behavior tree task blueprint is replicated?
or should do RPC inside bt_tasks?
so should i make custom events here that run on server and multicast?
to make this event replicated
Hey guys I am trying to rotate an object on my tank and its laggy as fuck in multiplayer as the client i need some help please
well there is no smoothing
updates do not happen every frame, so in between updates, you need to smooth
how do i smooth?? thanks man
use interpolation
but its only lagy during multiplayer
ofc it is..
ok great! thanks man
updates do not happen every frame, so in between updates, you need to smooth
it will be fine on single player
check out the free Smooth Sync plugin
it might be what you need
LOL i am using that haha its great!
but
its only working on the main movement of the tank
not the components of the tank
like the turret and cannon
but the main tank body moves great with smooth sync
yeah we use Rotating movement component
for rotating things
but rotation is all done locally, we never replicate, but that is design/system choice
is there a blueprint function for smoothing on a component?
that smooth sync has
like that i can put inside the movement float axis value
One last question and I'll stop pestering the channel for the next 24 hours, i promise.
Currently, I have a dedicated server. Client starts up in its own level, where you enter an IP, name a character, etc.
Once you connect, you join the server map level.
That all works fine.
MY question is, can I duplicate this set up at all through play in the editor without packaging each time to start a dedicated server?
can someone please help me on how to make a smooth rotation of an object that rotates with the mouse?
its a separate component that i want to rotate inside the class
i posed a picture of it
up above
make the rotation client authorative and rinterp for the simulated proxies
if your pawn is owned by a controller
you would only run your input code in the locally controlled pawn
where as you'd replicate to all clients except your own client the rotation delta
that you can interpolate using rinterp
you can also perform server validation in case you detect an ilegal movement in the client so you can roll it back
is there a way to set a max player count in C++?
I believe that that's a session intrinsic, isnt it?
does event begin play replicated event? or it only run on server
its run on all.
is PostLogin guaranteed to run after PostInitializeComponents?
I'm trying to figure out if I should be registering an array to playerstates or if I should be fine using GameState->PlayerState[NumberOfPlayers]
knowing that NumberOfPlayers gets stored for each PlayerState in PostLogin then incremented
PostInitializeComponents for what Actor exactly? PostLogin can be called at any arbitrary time.
PostLogin is well after the PlayerState is added to the GameStates Players array.
So you should be fine.
@fossil spoke PostInitializeComponents of the player state I think is where it gets added to the game state
Can it be out of order though that's my question
For instance player 1 starts to log in, has a player state but didn't call on login yet and then a player 2 joins and logs in therefore getting the index 0 even though the player state of player 2 is at index 1
PostInitializeComponents on the PlayerState will be called before PostLogin for that Player on the Server.
My question is, can these two be called by another player in between the two themselves
PIC for p1, then PIC for p2 then PostLogin for p2 then PL for p1
Iirc now that I think if it if there is level streaming or data to be downloaded then post login is only called afterwards
So I assume it's a yes
I thought the player state was only created right before post login is called
Which means what I assumed is false and I need to create a new array that would respect the post login order (to keep the index valid)
@peak sentinel yeah actually it does hit the smooth function still after simulatemovement(), will check it out more with the jitters I saw last time. It wasn't even a lot of movement, like 1-2 cm Z discrepency just in opposing directions up and down after the smooth which was very discernable
if a value doesnt need to be replicated
is it ok to do the calculations for that value on another thread on the server
if say its a float
or a vector
Is it possible to choose specifically who I want to replicate to?
I can't use Multicast as not everyone needs to know this information.
u can do a server rpc
and go through each player
in a for each loop
and if it matches certain things
Oh So that's the only way?
then send them it maybe]
I was hoping I could have the AI cycle through all the players
And then send the result to the server
u realize that unreal has a sound thing for this right?
From there the server would tell the clients what to do
like distance radius for sounds
And it replicates?
I had no idea
I thought base movement was the only thing that auto replicated
it doesnt auto replicate
but u can play sound at location
and then the distance radius should kick in
I'm confused, So where does the replication come in
The goal is to not have to cast to every zombie
u dont need too
just play the sound
might need multicast or it might need a server rpc
dont really do sounds
and when I do we use Wwise
so the audio guy does it
O
but still
I think you just gave me an idea
play sound at location should work
I get what your saying and it would work. I am worried though that if there are too many zombies playing sound from the server, it could cause the server to lag
which is why I want to tell the server/host, to tell the client to run the sound itself
Audio doesnβt play on the server. Also AI only simulates on the server
What is the audio youβre trying to play?
Zombie groans
Is it music or is this like the sounds of the zombie attacking?
zombie attacking and groaning
the solution I have now is to get all actors who are nearby
cast to them, and then rpc cast the sound
So typically you would not use networking at all for this, if the zombie is already replicating and playing animations, you would add your audio cues in the animation sequence
And let the client decide when to play the audio. So if you have a zombie attack animation, you would put your audio ques in there
I actually thought of doing that from the start, but I didn't know AI's ran on the server
But common sense should have told me it only ran on server
not like it's gonna build it's own pc and run on a client
AI thread only runs on dedicated server in multiplayer settings
right... hahaha
That really should have been common sense for me
Thank you
@twilit stump I actually just realized, groans don't have an animation. It just groans on a random timer
wait it worked...
Thatβs fine, put the groan on an audio component on your zombie
wtf
I'm so pissed
3 hours of my time for something I could have done in 30 seconds
If youβre worried about audio overlap, look into audio concurrency to control how instances playing will overlap
That was a concern down the road, I can control that in the audio cue's right?
Nope, in the configuration of the audio asset
Don't worry, I spent like 4 hours totally rewriting things yesterday trying to fix an issue that was resolved by turning off an inconsequential editor feature. Literally a checkbox.
π
Happens to all of us
I got a random out of blue question? Do customs events usually get delayed when they are mulicasting across all clients from the server? Cozz I got a true and false statement that Varies from 0.1 to 1.5 seconds delay between the cast. The server updates instantly but the client will take just a second or 2. Is that normal?
depends on ur script
there is microsecond latency between the server and the client
Is there a way to make them more important to make it go faster. Give it higher priority?
Is there any reason why this only works for the server and not the clients?
Zombies Alive, and Round integers aren't updating to the other widgets it finds
This is Happening in GameMode, and I know GameMode only runs on server
I tried using a rep notifier but no luck
Move that logic to GameState.
i Have my weapon (sword) blueprint. i attached it to component in my player blueprint
on sword i have box collision
how can i make it to ignore player that have this sword?
and i want to do it in multiplayer
Give a collision channel to your player mesh and set the sword to ignore this channel.
tysm
What is the best way to detect if a player has collided with another player from the opposite team?
I have two arrays on my GameState which stores each playercontroller on each team. I also have a string variable on my playerstate which stores which team that player is on
but it will also ignor other player
i want only to ignor player that is using that sword
@meager spade Sorry for ping, just wanted to ask while on the topic: would you in general lean towards sublevels and streaming them in rather than seamless traveling from map to map in the case of players playing many small maps using shared assets?
The load times even with the rebuilding navmesh seem to be WAY faster in general
With seamless travel there's at least a 3 / 4 second delay for everyone to reconnect
Just curious if there's any downsides to streaming other than the navmesh having to rebuild
Especially with multiplayer, though it seems the server automatically streams in the correct level on the client which is amazing
No need to keep random streams in sync or replicate level names to the client
Good morning.
I have the nameplates of characters logging into a dedicated server properly displaying their name of their character over their heads upon login.
Characters can also correctly see the names of characters that log in after them.
However, they do not see the names of any characters that were already logged on to the client.
Anyone have advice on what I'm overlooking? I'm very close now on figuring this all out. Thanks again to everyone for all the help so far.
Use your HUD's BeginPlay() function to iterate over all existing characters and create nameplates for them too
Thank you.
Good morning. I'm back to reading about projectile replication. What a subject it is! So many different techniques to choose from.
I have a couple questions for those that have time to answer. For my game, which is a fixed-camera, shared-camera, 4-player co-op SHMUP in which I expect to have up to 100 slow projectiles on screen at a time:
- Should I use the dummy-on-client, collisions-on-server method?
- Would spawning particles instead of actors save much bandwidth/memory?
- Are overlaps really so inaccurate/costly that I should only detect collisions with traces?
Cheers.
@waxen socket You def dont wanna spawn individual actors. They will have to be instanced or else the GPU wont be happy. Using particles would work, otherwise instanced static meshes
And yeah, I would use line traces personally.
Thanks, Daniel. I see so many examples in tutorials and guides that just spawn actors for grenades, projectiles, and more but I guess that's not best practice.
Jambax. My king. It's good to hear from you.
If you are you might want to consider a pooling system, but that can get complicated when multiplayer is involved...
I won't have thousands. Just a hundred or fewer.
Yeah that's not a problem then
I would consider making a pooling system so you reuse them instead of spawning new ones constantly, especially if they are spawned in quick succession
I've been reading this forum actually, and wondering if you had any luck implementing pooling.
Always depends though, there are many ways of handling projectiles
Oh that's pretty old now, I do things differently
Seriously. I see different advice everywhere.
Oh... I've been spending the week implementing that. Keeping in mind, that my projectiles are always relevant to everyone since the camera is fixed.
If all the projectiles are just the same thing (i.e, bullets) and they don't have any complex behaviour, then you might not want the full overhead of an actor
They're glowy blaster shots with three different forms depending on how long the player charges before releasing fire.
And then they shrink as they travel.
Yeah, there's no single answer for projectiles really
π I know. It's been one of the most confusing topics.
I guess my main point of indecision is whether I should spawn a projectile and replicate it, or if I should spawn a dummy on the client.
And then, if I'm only applying damage on the server, I'm worried that the enemy's death will be too delayed on the client to feel responsive.
What I ended up doing for things to feel responsive is broke up the impact effect into 2: a preliminary 'probably hit' effect that's predicted, which is followed by the server's confirmation
The preliminary hit can be a puff of dust or the character slightly twitching, where the confirmation effect can be actual blood splatter or whatnot
That's my current approach too. I have the enemy flash red when it's been overlapped on the client but only explode if it's been reduced to zero health on the server.
Did you test how responsive things feel? I found that with that approach, even a 200 ms delay feels quite good
Why not just start hacking at it and see how far any of the two approaches gets you?
Can always tweak it/try a new approach
No, I've only imagined how it could go wrong, I haven't tested.
I've been there, get out of that boat and test test test
Thanks, guys.
Jambax, is there anywhere you've written a more recent description of your projectile replication technique?
I don't think so. I'm using client prediction in both cases atm, whether actor projectiles or "data" ones... but the methods are different for each. Actors are pretty difficult to predict and sync-up client side
Sorry, what do you mean by "client prediction"?
For actor-based ones, I have two pools - one pool that is local-only for the owning client, and another pool that is replicated
The client fires and uses one of their local projectiles until they receive one a new from the server, then they try to sync them up
But how you handle that is game specific and pretty complicated
How do you map a recently received server projectile to a client predicted dummy? Do you use some tagging system?
That's the eternal question π
An ID is one way you can do it, which works if you are sending an RPC for every shot you fire
But I imagine you've got it working with your beloved burst counters.
Burst counter is a separate thing, that's just for handling fire FX
Oh, sorry.
But yeah assigning a synchronized handle to each shot is one way of doing it
I also use that same handle for any RNG-seeding
I've made life extra hard for myself by trying to move away from sending reliable RPC's for every shot and trying to just sync the whole weapon state, in which case a handle doesn't work
You know, this would make a great article on jambax.co.uk...
Yeah it would π
Long write up...
And aside from HLL's implementation it's not that proven yet
Still have to trial the hovertank stuff in the real world
HLL's ballistics is pretty solid now though
But costly
What makes it costly?
Potentially two reliable RPC's for every shot
That's cool. I'm happy you've been able to see and get so far. π
π
I do take comfort in that my game is 4-player coop. I don't have to worry about cheating, too many projectiles, or relevancy.
Seconded, would love to see
And I don't even have projectiles, but it'd be very interesting
And what do you guys think of the school of thought that says overlaps are inaccurate and costly and projectiles should rely on traces instead?
I don't know about costly, but I don't see a reason for it to use overlaps (depending on the game design of course)
A sweep of a sphere or a single trace should be more robust imo
I assume that by overlaps you mean check for overlaps every tick?
Even for slow-moving projectiles?
Personally I'd still default to traces
and reserve overlaps for entering zones, or other non-blocking interactions
But it really depends on your projectile and what you want to do with it
I see. Well, that would be a big refactor of my code, but I do see that being suggested here and there.
Don't optimise before you know it's a problem
Test & profile it first
Especially if it's a big change like that
Okay, thanks guys. It's such a complicated subject. π
Part of the fun π
hey guys, i just ran into some random disconect issues
does any one have tips on how to debug that?
Nothing in your log?
well its first time i am tackling this
Packaged game?
i see a connection timed out right before a logout if called
yes its a packaged game
I'd check the log, to see if there's any more you can gather from it
Oh π¦
i did add the network error callback now
You checked both server and client?
so in the next test i will probably have better logs
i only have acesss to the server logs for now unfortunately
the logs are with my friends
It's always the same player, too?
nop
diferent random players
I'd personally try to get the logs from the folks who are disconnecting first, to see if that brings you any closer
Tricky to diagnose otherwise
But perhaps people with more experience can give you an educated guess
check your net serializers, if they don't map fully without returning false that can lead to disconnects afair
does anyone know why 'get current players' and 'get max players' nodes dont seem to work for me? they top out at 1 person, so if my session has 4 people in, it still just says 1
guys for some reason child actors arnt replicating i have checked everybox for replication im at a fucking loss....when i select client in the editor it shows the mesh that doesnt replicate on EOS
everything else in the game is replicating but if its a child actor it doesnt replicate on EOS
@wise zephyr ChildActorComponents really aren't that great. You can get the same functionality by just attaching a spawned actor to the actor that would have the component and setting it's Owner variable. Then you even have one less scene component to update on movements, and your actor with the other actor attached can have a direct pointer instead of GetChildActorComponent->GetChildActor->CastToCorrectType->Finally have access.
i like it though when i drag a class out into the editor it brings the child actor with it
is there a way to do that
like put it in the construction script or something
i mean it makes no sense that its not replicating
btw this is blueprint right now
I dunno. Don't use the component. I'm not even sure if the component itself would need to replicate if it's a default component in that class. Probably just the two actor classes. The one with the component, and the one being spawned by the component.
i mean i guess i could make a dummy child actor then when the game starts spawn the actor with the child actor transform
Maybe the component would need to replicate. I'm not sure how the component would handle only spawning that actor on the server though.
Are you just not seeing it on clients? Or what's the problem with it.
yeah not seeing it on the client when i use EOS but if i choose client in the simulate multiplayer i can see it
makes no sense
u know like the drop down under the play button where u simulate 2 players...i choose client and i can see it but when i test on EOS the client cant see it
I'm not sure that choosing client makes it a multiplayer game though?
I have to double check. I'm used to using Listenserver.
ah i thought when u choose client it just test them as clients
EVERY FUCKING CHECKBOX IS CHECKED AND IT WONT FUCKING REPLICATE!!!! WHAT THE FUCKKKKK
it doesn't matter which OSS you are using, replication works the same
@wise zephyr just don't use child actor components, they are bad news
no i want to use them
this is unacceptable
ok so
think about this
i got a turret...and i want them in two separate pieces i want the stand and the top part...i want them separate for my reasons that i will not get into
when i drag the actor into the world it brings the child actor with it
also i am using blueprint btw not c++ not yet
i have a ton of Actors that spawn additional Actors
would never use a ChildActorComponent to do it
even if it wasn't full of bugs
as it doesn't really allow me to inject data and dependencies into "child actors" elegantly
go back and confirm that the parent actor replicates, that the child actor component replicates, and that the actor class that the child actor component is spawning also replicates
its all checked man haha
i wonder if its the smooth sync plugin that i downloaded that fucked with it
How do people get around the problem of having to build everytime you have to setup a dedicated server for your game?
when i get back to my computer im going to disable smooth sync see if that fucked with the replication of the child actors for some reason...i have no fucking clue
in short, i want my changes to be reflected in my server
thats a good question syrup
@ancient scarab just fire up the engine as server
so install ue4 on server?
Do you have a physical server or cloud one?
You can test it with just a laptop. It's doable on AWS but you will have to actually build the editor or at least the engine on it
You don't need to actually run on your actual server hardware
Just run the server and game on your machine
You can do it on another machine, I do it all the time on my laptop. Just like this, I have a batch file to do it. It would be something similar under Linux.
@Starkmax This is what works for me.
"C:\Program Files\Epic Games\UE_4.20\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\ShotInTheDark.uproject" TestMap -server -log -nosteam
That's old but you get it, just fires up the project headless
No need to build anything
I pulled it off once on my cloud Server but it took like 12 hours to compile the engine on my $5 digitalocean box LMAO
But basically, however you do it, it's just like you're developing on that machine.
If you have a Linux desktop handy to build the editor with would be a lot easier.
Sometimes it helps more to just work around things the engine doesn't like, by taking a path that it does properly support. Child actors is one of those times.
You can still spawn and attach afterwards, as mentioned
i fixed it dean setting the child actor's class on a custom event that runs on the server fixed my issue
this is fucking hilarious
so its not working with this other class that i have a child actor in lmfao
ok i got one of the child actors to replicate
so
only the last set child actor class works for some reason
the other children do not replicate
child actors*
ok now the just the first one replicated
now none of them
WHAT THE FUCK
THERE IS ALWAYS A FUCKING PROBLEM LMFAO I HATE CODING
@wise zephyr ditch child actors, before you loose your sanity even more. and please calm down with the caps and language π
kaos i need the child actors the way i have this class set up
if i dont use child actors its going to be bs
so set class to child actors worked to show the child actor on the client
for one class that had a child actor
now that same fucking code
doesnt work for this class
it just makes 0 sense!
hahaha
so
i swaped out the set child actor class
to another actor and it worked
so there is a problem somewhere with the correct child actor class
Thanks. This is a big problem because we are a group of about 6-7 people and local server would not work, so we need a dedicated server :(. Up until now we were using Steam's test server but we decided to move away from Steam subsystem so now it's almost impossible to test without a dedicated server, which comes with having to upload a build everytime we make changes
Then do what I said. Instead of the dedicated server launching a built and cooked project, it launches just like if you were firing up a server locally
@ancient scarab
You'll have to build the actual editor on Linux afaik. I'm no genius about the particulars of this approach but I know it works.
Do you have a local Linux box for building the engine?
Or can you put Windows server on your AWS?
you can put Windows server
Then you can just do that. I'm not sure if it'd be the smartest way to do it but it would be possible
I was planning to go with Linux though because it's less expensive but I could be wrong
Yeah! thanks
It's definitely a lot better supported for dedicated servers.
Even when six or seven people a local server would work just fine. just put the project and engine on your laptop, fire up the headless server, and make sure the ports are forwarded.
ok so i made a copy of the class i needed and it works now...i referenced the copy
fucking buged!
Or on whatever extra computer you have hanging around. I was using an old busted ass i3 with two gigs of RAM and it worked just fine.
I need my ISP to give me a dedicated public IP for it tho right?
It depends on what you're doing, but not necessarily.
ah I see, didn't know that actually 
that sounds like a much better option than setting up the engine on a dedicated server
I would just take a spare computer, slap Ubuntu on it, have it build the binaries that are needed to fire up the game project, and upload all of that to your cloud server.
I might have misunderstood the convo, but surely crosscompiling is fine too? Not necessary to build on Linux
I did a linux dedicated server build on windows the other day
Then uploaded to my cloud instance
Worked fine
I know for sure you can cross compile to build a project, I'm not 100% sure if you can do it to build the engine that can launch an unbuilt project.
Oh π€
mine starts with 172.19
I'm sure it's possible but from how clueless me you both are on this, I wouldn't bet on pulling it off.
ipconfig
Yeah that's not how you get your public ip
If you don't know the difference between a public and private IP, I 100% cannot recommend tackling dedicated servers at this time lol
Hey I don't know anything about networking either, that's why I'm not touching dedicated servers with a 10-ft pole
How are you supposed to learn something if you donβt use it though? π
I think it's more that listen servers would offer a softer learning curve
So you don't have to worry about managing your own server instances
And also needing dedicated servers implies a game design that will rely on a rather large population. That sounds like a recipe for too large of a scope
running a server on my local machine, opening port 7777 and just let people connect using my public IP would not work?
Dedicated servers are not necessarily only for big scale if you ask me. Why canβt I use them as small studio to provide a couple of official servers along with other solutions like for example community hosted servers? I understand it doesnβt fit for everyone, but there are definitely cases smaller games can benefit from them as well.
You haven't tried that yet? It will take you 30 seconds to try
should work with forwarded ports and the null online subsystem
if you use the steam OSS, then you might also need to forward the steam query port
almost all my ports even default ones are "stealth"
think I would rather just build the engine on my AWS server, sounds much more convenient than local
I don't know what that means, I hope you didn't setup a DMZ on a home network
you can also do that, not sure how it's more convenient
ppl can still test when im unavailable
and i already have public ip and port opened on it
so basic router configuration stuff then
I've not heard of this happening, do some ISPs share public IPs between multiple customers or something?
i dont know how recent it was but i do remember being told to contact my ISP if i needed a dedicated public IP
though to me that sounds more like having a static IP more than having your own public IP
but that sucks
I suppose if you went the listen server route you could use steam or EOS p2p, since that relays everything to get around NAT
can you not Cast to your GameState from your Character Blueprint Construction Script?
is EOS P2P good for long term? we moved away from Steam because we were unsure about future options
well it's one service that offers p2p, which I believe does work on relay servers
so it's paid?
I'm not sure why you'd move away from steam since you can still use its online subsystem for platform-native features
Actually, it's in my Event Graph on the Event BeginPlay
if we decide to publish, we'd need to pay for a steam app + host a dedicated server, right?
yes. or if you rely on listen servers either through direct IP or p2p then you can also get away with that
Steam + P2P is possible?
if your game is steam and only ever will be steam, then you can use its p2p features that are provided as part of the steam online subsystem
is it completely independent of servers? dont even need their test spacewar server?
using steam networking and choosing between listen or dedicated servers are completely unrelated. You can use steam networking with either.
"spacewar" is just an example of using steam features
and an appid that developers can use before they have their own
you don't need to use any code related to spacewar
ah.. so steam subsystem is the better option seems like..
I'm not sure if you fully understand what an online subsystem is
as well as listen/dedicated
yeah im still new to this. thanks for all the help
How can you trigger something on your GameMode from a character Blueprint EventHit?
I don't like how much code I'm putting onto my character bp
Then take it out.
What's the use case, what are you trying to implement?
I'm not even interested in the use case, you can get the game mode from any BP actor
so the thing being asked is a very trivial thing
in C++ GetWorld()->GetAuthGameMode() will get your the game mode
could someone tell me what this error means Warning LogNet UNetDriver::ProcessRemoteFunction: No owning connection for actor MobSpawner_9. Function Server_SpawnMobs will not be processed.
or rather why is this error even there?
whatever client is calling Server_SpawnMobs doesn't have net ownership
i simply grabbed the actor and placed it into the world in the editor
didn't spawn it from the gamemode, is that why?
Is it correct that loading a single streaming level via Load Stream Level is replicated automatically but loading instances via Load Level Instance or Create Instance must be manually loaded on the client also?
well I don't know what is calling Server_SpawnMobs, if the client is calling it anywhere then it's going to cause problems unless they own the actor
you can add a breakpoint to whatever produces that message if you want a better idea on what might be calling it
I'm trying to have a player switch teams if they get 'captured' by another player
That's easy. From event hit, check if the hitting actor was a player character, then check if it is from the other team, and if it is, call a function on game mode that will switch its team. You can just get game mode and cast it to your specific game mode class. This will only work on the server side
Thankyou man, I'm going to give that a bash. I've already done the logic of determining whether a player is being captured or not
Quick question, how do you know that red player is capturing blue player and not the blue player capturing red player?
does this guy have me on mute or something?
well I have two checks going on.. One which throws up a positive if a player bumps into a hunter, then another if a player has bumped into a prey
going for yes then
sorry, was that to me sswires?
yes because I was discussing this with you like 15 minutes ago
sorry man, I had to attend to my baby who had woken.. not great at multi tasking so I think I missed your reply.. Thanks for the response
@gritty lodge just get the game mode, cast it to your specific game mode class, and call the function
@gritty lodge you can't call them from the client. You got a call on the server side.
if it's running on the server, you can get the game mode
Oh I see, of course
In your case, the pawn should tell the game mode itself. How would the player controller know that the pawn died?
Okay sounds good, thanks!
is there any way to get a return value from an RPC (client calling something on the server) ?
Can you create an OnRep for a replicated engine variable without modifying engine?
UPROPERTY(Replicated, BlueprintReadOnly, Category=PlayerState)
uint8 bIsSpectator:1;
Wanted an OnRep for this
possibly with new macros
yeah I was hoping so
mirroring it wouldn't be too horrible
have the spectator controller push a new boolean for it into PS
and just replicate that
I'll probably just change the engine if there is no macro
yeah not at all. Was just hoping to learn something new π
its possible the new macro will tolerate adding OnRep and it will get called
i haven't modified network code much since they added those
but i think they are for when OnRep gets called
not for if
Right, that makes sense
how would you implement a rule of the game that could be changed depending on the game is played?
atm I'm putting all of them in GameMode but it sucks to not be able to preview the rules while not being the authority
are multicasts broken in 4.26? working fine in 4.25, then i upgrade to 4.26 and they stopped working. Just runs on server, not clients
no? and I don't think the engine would ship with a major part of the replication system not working
definitely not working in my project, tried a bunch of multicasts everywhere, but only the server has it. Yeah its crazy dunno whats going on
even repnotifys run on server only
so this is in blueprint then, which I usually don't do, but I would make sure your actor is actually replicating
ive been doing multiplayer for years thats why im confused. Never had this issues before :/ ill revert back to 4.25
Steam multiplayer is giving me a hell of a time. I packaged my game and sent it to a friend. When they log in they click a host button and it server travels them to the new level where they wait on others to join. The other player (me) has a server list that can clearly see the name of the player and the name of their created server (through steam OSS). When I select the server press join, to travel to their server, it says it succeeds, but nothing happens. The client eventually times out in the logs, but I don't quite understand why it's failing. I am at a bit of an impasse without getting this to work. Any help would be greatly appreciated! https://pastebin.com/70DdQzpU
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
For more information, I'm using the default app ID 480 and the list has other servers not related to my game, but they are filtered out so only mine shows.
Has anyone run into a problem with late join where a value replicated in blueprints just doesn't replicate on join? It's strange I have a bunch of characters spawn on server start, and when the client joins some of them have all their replicated values and others don't, the only difference between them is the data table entry that initializes them. I'm really confused.
relevancy?
not sure how, the character spawns, just doesn't have the correct state for one specific variable π¦
I have a C++ character subclass and then I subclass that with a blueprint. The data table row is read in C++ and initializes the character. The variable in question is on the blueprint, it listens for a callback from one of my components and then sets the value. I added some print strings and see that it is set correctly on the server. On the client, when I connect there is one of the characters that it works fine, I have a client only print in begin play that displays the correct value. For the characters that are failing, the value output here is not correct. The only differences between the characters is their entry in the data table. Originally they had different names and such but I even tried setting each entry to be exactly the same and it was still busted. If I do something in game that causes the value to change on the server while connected, it replicates as expected, it's only this initial state that seems to be broken.
callback from one of your components...
that is not a component on the character i take it?
what replicates the rowname?
it is, but only the server cares about the callback and then it sets the variable which is set to replicate.
the rowname is replicated in C++ by a variable
yes, the C++ character class replicates the data table row. the callback is not replicated
it is setup to call on the server in one place and then on the clients I check state and call in in postrepnotifies
but the client ignores that callback
you do have at least one rep notify fire for postrepnotify to happen
my setter code in BP is doing swtichauthority and setting the bp variable that is supposed to replicate
or did you mean PostNetReceive?
no, postrepnotifies
any replicated member that is set on server in the frame the actor is spawned
gets sent in the same package as the instructions to spawn the actor
what is postnetreceive for? is that a new function?
it's several frames after the character i s spawned on the server that the client joins, the server state is stable at that time
all of those will get set to server values and their rep notifies will fire before Actor calls BeginPlay on clients
if the net driver gets a hold of the actor before you set that variable
you really need to add a replication callback for it
note that there is no guarantee whatsoever that net driver will replicate the Actor in the frame its spawned
hmmm, interesting. I'm just surprised it worked at all then π
it might be a second later, depending on how many Actors there are to replicate
I guess I can change the var to repnotify to and print to see if it ever changes, the thing using it is checking it every frame so I should have seen a change eventually if it arrived
ideally, you'd get the Rowname set immediately
the rowname stuff shouldn't actually have any bearing on the problem though, that's why it is so baffling to me
i generally don't like the idea of Actors calling BeginPlay before they have all the data they need to setup
is there a way to control that? I just always thought UE just did it when it wanted
deferred spawn on server
calling FinishSpawning only after you set the data
client's won't call BeginPlay before they handle their initial replication + callbacks
yeah that's what I thought. Which is why the one that works has the correct value in my beginplay print
well, I will keep poking at it and see if I can determine what part of it is causing it to behave strangely and write back if I discover what happened. Thanks for listening π
why is there a delay before the Rowname is set?
i can't think of a good reason for that
there isn't, the spawner does the deferred spawn and sets the rowname and then calls finish
oh in my component I do some initialization in beginplay, maybe I need to move that somewhere earlier
Is overriding OnRep functions as virtual void YourFunctionName_Implementation() override; safe?
When a client walks a certain distance away from an actor, the actor permanently disappears for that client. Actors are never disappearing on the server. My network settings for these actors are unedited. Any reason this would happen?
What is the net cull distance squared of the actor?
If it's the default of 22,500,000, that means the the actor will be culled when the client gets 150 meters from the actor.
oh okay. Ill try raising it. thanks @fathom grotto
π
You shouldn't need the _Implementation, OnRep Functions just need UFUNCTION() decorator and after that you can make them virtual and override them like any ol C++ function
What do you guys think is the best way to sort a leaderboard? Should i use bubble sort?
Thanks π
Is it possible to use steamnetdriver and ipnetdriver at the same time?
I'm thinking of a setup where we would have dedicated servers for our ranked/main gamemode and connecting to that would happen with ipnetdrivers. And then we would have user hosted casual lobbies using steamnetdriver
Or would it just be wisest to store the lobbies to some external database and use that database to transfer the lobby/connection info to other clients?
Hello! I have an issue where after seamless travel, the server side (listen server) doesn't recognize GetPlayerController(GetWorld(), 0)) as the local player controller. Does anyone have any idea why this would be?
isn't it GetWorld()->GetFirstPlayerController() ?
They seem to return the same thing, so didn't fix my issue unfortunately
In short, I want the floating health bars above each player's head to be re-initialized post seamless travel. It works for the client, and I can see that the init function is called on the server, but the player controller isn't considered local
im in a bit of a confusing bind, i have a tick event running where if locally controlled it sets the flashlight to rotate towards the mouse, and it works fine
but i want the character to look in the direction of the mouse and its replicated through all of the clients but nothing happens on server
first part
then goes to these events
this is where the animations are changed
so in all clients, theyll all see each other and even the server change facing depending on if their mouse is on left or right of them
but the server wont change at all or even see the clients change
figured out my own shit, nvm lol
hi hi still can't make the advanced session public without using Steam subsystem π¦
i want the players of mobile also can see the session if i add steam subsystem it will register in steam just PC players can see it
Which other OSS have you been trying ?
Out of the box there's only NULL (LAN) and Steam
OSS depend on a service that a company is running with their own server
So there aren't 50 of them
If you want a cross-platform, cross-store service, EOS does that
Maybe Playfab does too, no idea about that
Sounds like right now you need to fix your Playfab setup
oh so if i set the Defaultplatformservice empty it wont show on other devices ??
Well yeah, that's the LAN-only NULL OSS
Means you have no online services except LAN matchmaking
Can't find or create sessions other than LAN, no achievements, friends etc
well i added Playfab there i hope its work
and also i have this code
on Android its crashing the game when finding a session
i can see nothing heavy or wrong why its crashing
Keep it simple, just print the number of sessions found to log
Get the sessions to work and do your UI later
quick question, if i wanted to set up a dodge mechanic, how would i add velocity for a short time in the direction they are going
then slow down greatly
add impulse?
well its a 2d character in a 3d world
so like paper mario
but id like for him to dodge in a direction if he hits space while moving
I see a "Replicated Sublevel Instances" plugin on the marketplace for $120 but I'm wondering if there's a need for it compared to just replicating an int32 and choosing the same sequence of random sublevels to load on the client?
Am I missing a downside to this approach or something that the plugin would handle?
Isn't there a way to go from one thing to another in a timer kinda thing? Like a spleen or a tween or something? Where it'd go from one thing to another in a specific amount of time?
Yeah idk what it's called to pull up the node.
Ah so it's more convenience if you don't want to sync a seed etc.
Thanks!
I was thinking there might be some linking problem from the server to client
As I had that problem when spawning HISMs
They had to be named exactly the same etc.
Do you know if this kind of issue exists with sublevels too?
What was the node called? Idr.
Oh no it's like spleen or tween or. Something
Hm. Idk if that's it. I'll try to find it.
Is there much of a difference between Create Instance better than Load Level Instance in terms of performance if loading in a sublevel at runtime on clients / server?
The main difference I can see is that Load Level Instance can load in any sublevel but Create Instance can only load sublevels contained in the persistent level
how to replicate entire behavior tree
You normally wouldn't
Usually the AI's brain only runs on the server and clients just see the results of its actions
so what is the solution, becuase in my client side the behavior logic run different
It shouldn't run at all on the client
i want to run behavior tree for client
Whatβs your use case for it having to be client side? Because to my knowledge that opens up a ton of exploits. What if for example a modified client would say that all AI that client controls canβt attack that client? Your clients should pass information to the server, the server should validate that and then change AI behavior if needed. Clients should not be able to directly influence AI, as in controlling them.
@wheat magnet Behaviour trees have 0 replication. They only run locally. If you want to run a BT on client, then have that client create an AI Controller, and run a BT. but you can not replicate BT's, BT Tasks, etc. I think your main issue is you have a design fault.
got it, so is there any way to communicate from Ai controller to BT task
no
BTTask > AI Controller, not AIController -> BTTask
task can ask or get anything from AI Controller it needs
thanks, so it mean bt task only run in behavior tree, i can't able to cast to bt task from any other blueprint
nope
Still can't wrap my head around why the server side (listen server) doesn't recognize its player controller as local after seamless travel. Any ideas?
Nvm, I'm an idiot
Hello, I have a question. Does anyone know if there are any multiplayer games that have melee combat with a mixture of physics against AI? I was wondering if it's even possible to make such a game, I was not able to find any games that really have this and seem to work good as well.
With "a mixture of physics" I mean something like: Hit an enemy -> The enemy gets knocked back a bit and plays an animation of getting hit.
that is normally animations, with some kinda knockback root motion
But what about things like prediction? I would imagine that being a mess with and without. What if an AI gets hit by 2 players at the same time or what if 1 player hits it while close to it. It seems really complicated, hence why I was asking if there were any real games that did it π
Or if it's even possible at all.