#multiplayer

1 messages · Page 579 of 1

acoustic marten
#

More like writing the whole game + network (logic wise) in a standalone program then tack on unreal simply for rendering

thin stratus
#

Isn't that basically what I wrote?

#

Oh

#

You even want to throw the Game Code itself out of the window?

acoustic marten
#

ye

thin stratus
#

I highly doubt

#

At that point you could just not use UE4 :D

acoustic marten
#

So it could simply use a headless client

thin stratus
#

I know there are people who replaced the Server stuff with something else

acoustic marten
#

but unreal got some fancy rendering/particle stuff I would like to leverage

thin stratus
#

And let UE4 only be the client that connects to that new server

#

But despite that, no idea

acoustic marten
#

I c

soft girder
#

main reason i picked ue4 was networking out the box

thin stratus
#

Yeah but there are some setups where UE4 isn't doing well

#

Specially large server setups for MMOs and what not

#

Where it makes more sense to just have some proper Server setup and then translate between what UE4 uses and what the Server uses.

soft girder
#

oh god i bet that is hell. ive never tried anything more than 8 players

acoustic marten
#

For me the concern is player count/performance as well as making something where I feel unreal might not be the absolutely best option. I.e. turn based.

thin stratus
#

Ah, UE4 can do 100 Players if you utilizes their Replication Graph, but even that is not straight forward.

acoustic marten
#

but I might just be to unexperienced and talk out of my ass :)

thin stratus
#

But I'm more talking about a lot more

soft girder
#

thousands

thin stratus
#

Yop

soft girder
#

:}

thin stratus
#

Turn Based is not really what I would say UE4 is good or bad at

#

You can write whatever code you need to support that

#

But there are some other things where UE4 isn't the best option in terms of server architecture I would guess

#

Like proper seamless transition between Servers

#

Like if you want to do something like WoW's servers with instances etc.

acoustic marten
#

Oh

thin stratus
#

UE4 is more build upon the traditional Unreal Tournament Dedicated Servers

acoustic marten
#

Gotcha, also please dont talk about UT, makes me so sad haha

thin stratus
#

Or whatever Borderlands qualifies as if you talk about Listen Servers

#

But everything beyond (despite Battle Royal) is usually more fighting than anything I would assume

#

I would never try to make something bigger in UE4 without having some proper server architecture in the back.

acoustic marten
#

I am mostly mucking about trying to find interesting use cases for stuff at this point, but its good to know whats possible.

thin stratus
#

A lot of stuff is possible if you throw away the standard build in stuff at the point it becomes unperformant

soft girder
#

(i just installed ut99 469 patch with dx11 and high res textures yesterday. really brought back memories)

thin stratus
#

Like the CharacterMovementComponent

#

It's "okayish" for what it is, but large scale you need to handle movement replication differently

acoustic marten
#

Okay

thin stratus
#

Because you can't use that CMC for 1k players or so

#

But yeah, i can't talk much about it as I never tackled it

twin juniper
#

@thin stratus @soft girder Thanks buddy I will implement it🙏

soft girder
#

your very welcome

#

gotta be specific and know what your inputs are referring to

acoustic marten
#

My experience is rather limited too, the only time I dealt with something this scale was in a MMO where we did as I said earlier, the game client ran completely standalone and then we used unity for rendering simply and it was performant even in over 100vs100 battles so it seems like a nice solution.

#

Plus testing is a lot easier if it is a headless client

soft girder
#

@thin stratus i have a question. At the end of destroy and posses i have the set nodes. will setting to nothing make the value null? does this work if i wanna clear a value

thin stratus
#

It's something I would never tackle without having a bunch of programmers at my hand just for that

acoustic marten
#

Well I left the industry and only code for fun these days so not likely to have that kind of resources

thin stratus
#

I'm not the person to tell you what you should and shouldn't do.

#

But I personally would not waste my time on this.

acoustic marten
#

I appreciate the feedback

thin stratus
#

But rather look at something managable and achievable

#

We can do so much in UE4 for Local COuch Coop or Listen Server based

#

And a lot can be achieved by one person if the scope is kept small

acoustic marten
#

Yeah I guess I should explore it more

thin stratus
#

If you just want to check for fun, then sure. Just keep in mind how unlikely it is to get something that huge going without a big team

#

@soft girder Setting a Reference variable to nothing sets it to null, yes

acoustic marten
#

Anyway gotta run, thanks for the talk @thin stratus :)

thin stratus
#

It's equal to do this:
ASomeActor* pointer;
pointer = nullptr;

soft girder
#

just wanted to make sure it was the same as c++

thin stratus
#

Yeah it is. These "Reference" variables are not references anyway

#

They are pointers

soft girder
#

ive always wondered. kind of just done it because it worked

#

so are we replicating pointers?

#

when we pass them into an rpc

thin stratus
#

You are replicating net-ids

soft girder
#

because addresses are not the same

thin stratus
#

Which are used on the Client and Server to look up the matching actor instance

soft girder
#

ok

thin stratus
#

Yeah, memory addresses are not the same

soft girder
#

ive read your compendium. very good stuff. it helped me and gf alot

#

thank you for taking the time to make it

thin stratus
#

Glad it helps (:

vale ermine
#

So I got my S3 set up so that unreal can upload and download .sav files from the S3 server. Everything seems to be working as intended. Is there any pitfalls I may run into using this instead of using lambda and dynamodb?

#

I will need to upload and download just as much as I would be accessing dynamodb for the same information.

#

I am splitting the .sav files up for each user. So one user would have a save file for every item in the game, save file for friends list, save files for every player stat lv hp location ect..

#

that way when downloading and uploading the .sav files they are as small as possible and I would not need to upload or download sav files that have information that was not or did not need changed.

rich ridge
#

@vale ermine there is a problem, and really concerning problem.

vale ermine
#

what is that?

rich ridge
#

Your client can mutate the data which are r trying to save

vale ermine
#

the server will be making the changes to the sav files not the client

rich ridge
#

Meaning dedicated server

vale ermine
#

yes

rich ridge
#

Then I don't see any problem..
The only problem now is network charges

#

If client wants small bit of information then you need to download whole file

#

May incur more charge on network bandwidth

vale ermine
#

that what i am saying is i will split all information into separate sav files for every player

#

that way it would be as small as possible but yea thank you I will watch the cost

rich ridge
#

Why aren't you considering EOS?

vale ermine
#

The reason I am not considering EOS is because I develop for android and the person that made the EOS plugin had to hack the crap out of it to get it working

twin juniper
#

@thin stratus @soft girder need help

rich ridge
#

I think you aren't aware that epic has started pushing their own implementation of EOS in master branch

soft girder
#

yo

twin juniper
#

@soft girder it isn't working

vale ermine
#

it needs to be more refined. I am not happy with its current state.

soft girder
#

:}

twin juniper
#

I have implemented on actor

soft girder
#

ok show the blueprint

rich ridge
#

@vale ermine true but it has got bare bones and it working..

#

I ported it to Android

twin juniper
#

@soft girder can u dm me

soft girder
#

ya

vale ermine
#

I will look into it. I went from lambda to EOS to S3

twin juniper
#

@soft girder I am unable to text u

vale ermine
#

i am now happy with s3 but i will take a look at eso again when i have time

#

thank you for the input

rich ridge
#

Welcome

ruby rock
#

Hello - tearing my hair out with this one. Have a listen server with 1 extra client that I am attempting to allow a user to select a character type and then load into the level.

I have a map/GM with a simple button widget allowing the user selecting the character type. If the server selects a character it calls CreateSession and the Open Level. Feels straight forward, but when I click from the server, it looks like it creates 2 sessions, opens the level and loads a character into each.

thin stratus
#

You are kinda listing multiple problems.

#

Here are some rules that apply to some of the keywords you wrote, maybe that helps.

  1. OpenLevel is a HardTravel and should only be used (in Blueprints) to move between Singleplayer Levels, for the Initial ?listen hosting of a Server or to go back to the MainMenu (+- some other stuff).
  2. Once a Server has opened a Level with OpenLevel and ?listen, they have to use ServerTravel <mapname> to move to the next map. This can be done via the ExecuteConsoleCommand node in Blueprints.
  3. Only the Server can use ServerTravel.
  4. Clients, if using Sessions, join to a Server via JoinSession Node. Otherwise they join via open <ipaddress> also utilizing the ExecuteConsoleCommand node (not sure you can use the OpenLevel node with an IP).
  5. Once connected to a Server, Clients would only use OpenLevel to disconnect from it and return back to the MainMenu.
#

@ruby rock

#

Feels straight forward, but when I click from the server, it looks like it creates 2 sessions, opens the level and loads a character into each.
Should that say "but when I click from the client..." ? Because you already wrote that the Server works fine? Not sure what you are actually describing here

#

Also I don't see you passing over any data for even knowing what Character to spawn. For a Server you can use the Options but Clients for example don't even support that in Blueprints.

marble gazelle
#

Hey, does UE has some methode called on the client for an actor that tells the server it was replicated to a client? (Since it seems RPCs I call, before the client has the actor, just vanish ...)

ruby rock
#

@thin stratus - thanks for the detailed reply.

Sorry it's getting late 🙂

I'm starting a listen server and a client. But I'm just clicking on the Server - so from your above, OpenLevel seems to be a valid function to use. However, when I do this, both the Listen Server and the Client seem to create sessions (both open windows with the map, and the playercharacter loaded in).

re:Characters - yeah, I dropped that from the example as I didn't want to add more complexity to it. The above image has the same issue.

thin stratus
#

@marble gazelle Not sure. Usually you set variables that need to replicate with the Actor directly when spawning them on the SpawnActor node (or deferred via c++)

marble gazelle
#

well in this case I call RPCs for add some data read from the players profile

thin stratus
#

@ruby rock Are you sure you aren't already starting the game connected to each other?

#

@marble gazelle Why do you need an RPC for that?

#

You can pass in the Data directly when spawning the Actor

#

And the Client would have access to it on BeginPlay of that Actor

marble gazelle
#

Because it only needs to be done once

#

actually I can't

thin stratus
#

Yeah that's still only done once

marble gazelle
#

its part of a component part of the player controller

#

And the component itself requests the data

ruby rock
#

game connected to each other
Sorry how do you mean?

thin stratus
#

Where are you testing this, in the Editor?

ruby rock
#

Yes

thin stratus
#

What are your play-settings set to?

ruby rock
thin stratus
#

NetMode "Play As ListenServer" will auto connect them

#

If your Server presses on the Button to host, it will kick the Client

#

That's why you think it opens a map on both

#

Set it to "Play Offline"

ruby rock
#

Well there you go - I never knew that. That fixed it!

#

@thin stratus 👍

vale ermine
#

I understand that the namespace for AWS S3 is shared among all AWS accounts. The issue I see here is that I want to create a separate bucket for each player. Do you guys not recommend that? The logical thing to do is make one bucket that I would make so that the name space is mine and I will never run into an issue with a used namespace. I don't like having everything in one bucket for all users.

thin stratus
#

That sounds kinda like a question you should ask on their forums. :<

marble gazelle
#

if someone is interested, I had to delay my calls until AActor::OnSerializeNewActor was called

vale ermine
#

ok then you answered it for me

thin stratus
#

@marble gazelle With an actual "Delay" node?

vale ermine
#

just make a bucket

thin stratus
#

:D you could just write "yes" or "no"

#

If the answer is "yes" then you'll get to hear something from me anyway

marble gazelle
#

@thin stratus ehm no? But actually also yes.
So my issue is that on my def env I don't use our "OnlineDataprovider" since I'd need to setup our full stack which I dont want. Ths I added "OfflineDataprovider" that emediately give me a response with the data. But this is bad, since My calls, initializing my components, request the player data. Well this comes in sync, so not in the next frame and thus I call an RPC on the component, that gets lost, because the channel doesn't seem to be ready for this actor. Well shortly after, most likely in the same frame, the call to OnSerializeNewActor comes -> starting replication for the player controller, so a good time to request the data. But since this request in my dev env is still sync, I can't call it in the same frame, so I needed to add a Delegate which is called the next frame. (You are not allowed to call RPCs while you are replicating :P)

thin stratus
#

Okay. We had a lot of peeps that said "Oh it's not valid yet? Let me add a 2 second delay. Cool it works."

#

And yeah, that wouldn't be good. Delaying a frame should be fine if you can ensure that the Client receives the data properly.
I assume it even gets bundled into the same package.

marble gazelle
#

It won't get bundled into the same package, since during OnSerializeNewActor you are sending a package

#

I just can't find good documentation on the Unreal Replication, like what happens when

thin stratus
#

Usually the answer to that is "There is none, you have to look into the Source Code and breakpoint your way through it."

marble gazelle
#

(For example in on of our inhouse engines we get notified on the server, when a new actor that is replicated got discovored on client side, so you can send some init data, and you know the client has the actor)

#

that's what I do 😛

thin stratus
#

I could assume UE4 has that too, but you'd need to follow the packages along and see if they ever call some sort of handshake function

marble gazelle
#

my current assumption is its OnSerializeNewActor

thin stratus
#

It's one of those things you will never look into unless you need it

marble gazelle
#

ah I can validate that, sec need to add the method to an actor that is not only replicated to the owener

thin stratus
#
/**
 * SerializeNewActor has just been called on the actor before network replication (server side)
 * @param OutBunch Bunch containing serialized contents of actor prior to replication
 */
virtual void OnSerializeNewActor(class FOutBunch& OutBunch) {};
#

Comment sounds like it's differently timed, but then again, not the most informative comment either.

marble gazelle
#

(I'm bit confused, why you posted it, since I actuall have read the code)

#

but it's exactly it, each time a new connection gets the actor, its called

thin stratus
#

General discussion info. In case someone else has their eyes on the conversation

marble gazelle
#

😄 fair enough

#

so tested with 2 clients 1 server. For the player actor this got called 4 times, for the controllers 2 time.

thin stratus
#

Did you try with some high pings and package loss simulation? Just curious

marble gazelle
#

OnActorChannelOpen seems to be the equivalent on the client btw

#

? does it matter, its called on the server when it starts replication for an actor

thin stratus
#

Right. I mistunderstood what exactly you wanted then. I thought you are interested in a callback for when the Actor is also fully available on the client.

marble gazelle
#

ah no^^ I just want to know its good to send RPCs now

thin stratus
#

Fair enough

marble gazelle
#

Soooo thx my rubber duck 😄 🦆

thin stratus
#

No worries. I learned a bit more again too.

marble gazelle
#

😉

glacial burrow
#

i have a projectile that gets spawned on the server, currently traveling by applying force on the X axis (it rotates towards the direction it should move) but it looks horrible on the client side (authorian server). Is there another (better) way to handle projectiles in this situation ?

#

or should i just remove the force on the client side and hope the server sends the correct values ?

thin stratus
#

We usually end up using the ProjectileMovementComponent

#

Using Force is ,iirc, using Physics and Physics + Multiplayer is not really want you want here.

glacial burrow
#

yeah i figured that out ... it was build to "work and fix later" later is now ^^

thin stratus
#

The ProjectileMovementComponent should also have a way to specify a "VisualComponent", so the Mesh, because if corrections and lags come in place, it would teleport the collision but interpolate the Mesh, so it remains smooth in visuals (unless the correction os too big).

#

However not sure that's accessible in Blueprints.

glacial burrow
#

also, did you ever teach at the HSHL ? I get the feeling i had someone teaching me sharing the same name as you and introducing me to UE4 like 3 or 4 years ago

thin stratus
#

Nope, I only taught general IT as a Student in Wuppertal.

glacial burrow
#

i guess one day i will run into the deadend and have to use C++ to continue this project ^^

#

this wouldve been a fun coincidence since i only remember his name being cedric ^^

thin stratus
#

:P

#
/**
 * Assigns the component that will be used for network interpolation/smoothing. It is expected that this is a component attached somewhere below the UpdatedComponent.
 * When network updates use MoveInterpolationTarget() to move the UpdatedComponent, the interpolated component's relative offset will be maintained and smoothed over
 * the course of future component ticks. The current relative location and rotation of the component is saved as the target offset for future interpolation.
 * @see MoveInterpolationTarget(), bInterpMovement, bInterpRotation
 */
UFUNCTION(BlueprintCallable, Category="Game|Components|ProjectileMovement|Interpolation")
virtual void SetInterpolatedComponent(USceneComponent* Component);
#

Seems to be exposed

#

The "UpdateComponent" that the comment is taking about is the RootComponent usually, so make sure the Root is the Collision of your Projectile.

#

And then call SetInterpolatedComponent with your Mesh somewhere on BeginPlay or so in your Projectile.

glacial burrow
#

so far i just switched to the projectilemovementcomponent and it looks a lot smoother already

thin stratus
#

Make sure you attach all visuals to the Mesh then

#

Because otherwise they will not be smoothed

#

Such as Trail VFX

glacial burrow
#

currently its a beautiful white ball 🙂

thin stratus
#

Same goes for Characters in case you have them

#

All components with visuals that should be smoothed should be a child of the Mesh

#

They don't really tell you that

#

CharacterMovementComponent smooths mesh location but teleports the root (+ all child components of the root but the mesh)

glacial burrow
#

oh i just started super naive and just did what somewhat worked out ... its mostly just to understand RPCs and how things should be handled from a client <-> server perspective

#

but thats a super helpful advice, im certain it was soemwhere in your document too (atleast i would guess that) when i read it a month ago, maybe i forgot about it because i started with too little knowledge

#

need to figure out how to change the root component again

#

i am not 100% sure this is the correct approach to your suggestion ?

thin stratus
#

What is the parent class of your actor?

#

The (Inherited) suggests that the Parent added the SceneRoot

#

So you need to change it in there

glacial burrow
#

uhm right yeah, im stupid.

#

Thats a spawnable Actor without anything attatched to it, im using it for basic spawnable behaviour of my objects and as casting target

#

so this component needs to have the collider ? :/

thin stratus
#

It's a SceneComponent at the moment

#

It should probably be the Collision one

#

I don't see a big reason to have a parent class for all spawnable stuff

#

I would just make an Actor child BP_Projectile_Base for my Projectiles.

#

Way too limiting otherwise.

glacial burrow
#

yeah with my new found knowledge my approach seems wrong

#

but glad to talk about it to figure out my mistakes and fix them 🙂

#

but i get the feeling i should soon start learning C++ if i ever want to work with UE4 in the industry

devout yacht
#

when running as a listen server does the editor have view of the data serverside?

glacial burrow
#

as far as i understand the editor should show the client 0, so the listen server. But during the debug you can probably set which side of the data you want to see

winged badger
#

@devout yacht the illuminati eye bottom right on the outliner lets you choose which world you're viewing

devout yacht
#

@winged badger @glacial burrow Thanks thats exactly what I was looking for

glacial burrow
#

@winged badger something i didnt knew before, thanks !

quick flint
#

how expensive are client RPC's

#

in terms of performance

#

like is it ok to run a client rpc on tick

#

i want to update a "node" (imagine overwatch capture the point) and i want it to update 3 UMG widgets, the team in control, contesting team, and progress towards capture

kindred widget
#

You're likely better off relying on replicated variables over direct RPCs.

bitter oriole
#

Server-to-client comms should be replicated variables most of the time

quick flint
#

but

#

how expensive would it be to set a replicated variable

#

on tick

#

and its another actor

kindred widget
#

In which terms? CPU or bandwidth?

bitter oriole
#

Setting a replicated variable on tick is free

#

The bandwidth for a replicated variable is not large either

quick flint
#

well im a bit confused though

#

doesn't the server replicate that value to clients?

bitter oriole
#

Yes

quick flint
#

or does unreal have a built in check, to ensure to not update unless the value is changed

bitter oriole
#

But replication is not going to happen at the tick frequency

#

It's goign to happen at a lower rate depending on bandwidht

quick flint
#

like, does the value still get replicated though? what if we constantly set it to 0

#

if its constantly being set to 0

bitter oriole
#

Obviously it doesn't get replicated if it doesn't change.

quick flint
#

will the network code realize "oh wait, the value is still 0"

#

and not waste any bandwidth?

#

i dont know the underlying concepts that are going on here under the hood

bitter oriole
#

If you set a value from 0 to 0, nothing happens at all

quick flint
#

ok

#

so

#

i was thinking then

#

could i perhaps do this in an OnRep function then?

#

OnRep() => Update player UI

bitter oriole
#

Sure

quick flint
#

question though is

#

where should i put the onrep function and variables

#

on the node actor?

#

thats where i was thinking

#

but im not sure if another actor, can alter a players UI

#

like can a server spawned actor, alter MY UI?

kindred widget
#

As far as something like that similar to Overwatch, you'd likely replicate three variables. Two uint8s for the amount of players that the server thinks are capping for each team and a float for capture percentage, maybe even three uint8s if you want to compress the capture percent down. Either way, it'd be 3-6 bytes per replication. If you run your server at 20fps, that's only up to 120 bytes per second.

quick flint
#

do OnRep functions on other players, get called for us?

#

How much do Enums cost?

#

I suppose they are integers

kindred widget
#

Probably 1 byte, they're uint8s usually.

#

If you want to use OnRep, your actor would need access to that client's widget that gets updated. I usually store all of my widgets in the HUD class, which makes it very easy for clients to get their own since you just have to get the local controller and call GetHud on it. Alternatively, your widget could have a reference to the capture actor and update itself on tick or so.

thin stratus
#

I would try to make this all EventBased if possible and not use Tick or Bindings

quick flint
#

If you want to use OnRep, your actor would need access to that client's widget that gets updated. I usually store all of my widgets in the HUD class, which makes it very easy for clients to get their own since you just have to get the local controller and call GetHud on it. Alternatively, your widget could have a reference to the capture actor and update itself on tick or so.
@kindred widget I suppose the question here is this: What calls OnRep functions? Who calls it I mean?

kindred widget
#

Depends on how smooth you want the UI to look. If it's only replicating every 10-20 frames, you could smooth that out a little bit with some predictive work based on the last count of how many players were on point the last time it replicated.

quick flint
#

Is OnRep called on all clients that are within the network relevancy range?

thin stratus
#

Thye are tied to the Replicated Variable

#

Yeah basically

#

OnReps in BPs are only "OnPropertyChanged" calls

#

But that's more or less the same

#

@kindred widget Well let's say for everything that is not needing any smooth update. But you can still use Tick to interpolate between old and new value

#

It actually seems to be quite the thing to use Global Slate Invalidation

#

Which marks bindings useless

#

But I haven't set that up yet. Someone else in our company had to fight that beast

kindred widget
#

Haven't heard if that? Is that the invalidation box thing that some recent talk had points on?

thin stratus
#

I think so yeah

kindred widget
#

By tick, I also literally meant tick function. I avoid actual binding functions like they're a plague.

thin stratus
#

Iirc it's mainly to save lots of ms

#

I think it caches the slate data using the box and the call to invalidate will basically refresh that data

#

Which sounds, overall, like a pretty effecient setup

#

guess that's more #umg talk though

quick flint
#

wait so im a bit confused

#

here's aquestion

#

if I call GetPlayerController(0)

#

on the client

#

does that return my local PC?

thin stratus
#

Yes

#

The one of that specific client

quick flint
#

So inside of my OnRep functions, could I just call GetPlayerController(0)->GetHUD()->UpdateUI()

thin stratus
#

Yes

quick flint
#

ok cool

#

I think I will do that then.

rose egret
#

u can also use GetWorld()->GetFirstPlayerController()

quick flint
#

yea that's probably better than including GameplayStatics.

#

yeah I checked the code between both of those, the kismet get player controller function loops through everything, while the GetWorld()->GetFirstPlayerController() function just gets the first player controller from the player controller iterator, and returns

#

much less runtime

#

kismet loops through everything and does an if check for the id lol

kindred widget
#

Them ease of use blueprint functions though.

thin stratus
#

GameplayStatics uses the Iterator too

#

And you will only have one Controller unless you play local couch coop

#

Sooo

quick flint
#

yea but there's a few other variables that are defined in that function scope

thin stratus
#

If THAT'S the thing that will kill your performance then you def have other problems :P

quick flint
#
class APlayerController* UGameplayStatics::GetPlayerController(const UObject* WorldContextObject, int32 PlayerIndex ) 
{
    if (UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull))
    {
        uint32 Index = 0;
        for (FConstPlayerControllerIterator Iterator = World->GetPlayerControllerIterator(); Iterator; ++Iterator)
        {
            APlayerController* PlayerController = Iterator->Get();
            if (Index == PlayerIndex)
            {
                return PlayerController;
            }
            Index++;
        }
    }
    return nullptr;
}
APlayerController* UWorld::GetFirstPlayerController() const
{
    APlayerController* PlayerController = NULL;
    if( GetPlayerControllerIterator() )
    {
        PlayerController = GetPlayerControllerIterator()->Get();
    }
    return PlayerController;
}```
#

yeah I mean sure, but it's still a lot less code lol

#

actually it might be about the same

#

im not sure what GetWorldFromContextObject does

#

perhaps GetWorld() is bbasically the same thing

thin stratus
#

Literally calls GetWorld() on it

quick flint
#

yea

kindred widget
#

To be fair, that short loop isn't going to blip a performance radar unless you're planning on calculating the binary manually with a calculator.

thin stratus
#

Maybe I want to do that.

kindred widget
#

Haha, more power to you.

quick flint
#

lol

#

I just want to make sure I do stuff right the first time, so I don't have to go back later and fix stuff.

empty axle
#

without a lot of experience that rarely happens

kindred widget
#

Invent a time machine. Do everything the wrong way, fix it all, send it back in time with time machine.

bitter oriole
#

Yeah, you can't write anything right the first time, even with 10 years of experience

#

This is game development, you'll remove half the features you create when they're not fun or don't fit the game

#

Optimize when you're nearly done, focus on having a great game first

peak sentinel
#

On package/launch version it doenst open PrototypeMap as i wrote to Open Level, it opens default gamemode map

#

but in PIE it opens correct map

#

Any ideas?

kindred widget
#

You may need to add the map to the packaging.

peak sentinel
#

Yeah just figured out now.. Thanks

fierce oriole
#

Is there a more efficient way to update a world actor (Sun) from the GameState beside casting from a looping event or on tick (from actor to gamestate)? Im using vars on the Gamestate to drive a Day Cycle, Weather, etc so that they can be modified at runtime. but is there a better way?

lucid vault
#

Anyone know how I can get access to a users Steam Avatar (C++) ? My goal is to save it in the player state. I haven't been able to find any resources online as it relates to C++

thin stratus
#

Pretty sure you can find code references online about this

#

It's not a thing you can do in BPs

lucid vault
#

I only see documentation on the advanced steam sessions

thin stratus
#

If you google for UE4 Steam avatar you'll find enough stuff

lucid vault
#

Second page of google has let me know that I need to somehow use the Steam API as it's not supported in the subsystem. I'l have a look at that api and see what i can find

peak sentinel
#

In this video for the Steam Multiplayer series, we’ll get the player’s Steam name and Avatar image and use it throughout the project. This is more of an overview instead of a tutorial. This video replaces the previous one that was almost 30 minutes long and condenses it. The p...

▶ Play video
lucid vault
#

Thanks. I'l give that a watch. It's unfortunate that there isn't good written documentation easily available

peak sentinel
#

yeah a common problem of unreal 😅

there isn't good written documentation easily available

vale ermine
#

Anyone know where the save game file saves to on the AWS dedicated server? Do all instances use this location? Game\Saved\SaveGames\savefilelocation.sav Would it be like this?

fierce oriole
#

@peak sentinel I was actually looking for that video yesterday lol thx

vale ermine
#

does each instance have its own Game\Saved\SaveGames\ location?

peak sentinel
#

Good to know, glad I helped üzi 🙂

full ember
#

Someone has experience with setting up Photon for multiplayer, including voice chat?

Photon's youtube channel has only Unity tutorials…

warped apex
#

How can we create a inGame Web browser in a multiplayer game which can be seen by other clients too... like a meeting. One of them is the host and browsing the web and others can just watch the screen ?? Can anyone help ?

thin stratus
#

Not really sure that's possible with native code

#

The WebBrowser Widget is already quite limited.

#

You could maybe try to check if it has callbacks for when a website is opened and then use normal replication to get the URL to the other players, but that sounds like all you can do

warped apex
#

I have done that. It works. But it’s not secure then.

#

If one person login into his gmail account, due to the replication of the URL, all other clients are actually getting logged in into his account. It’s not just sharing the view of his web browser, it actually opening each and every URL on every client

peak sentinel
#

thats a very interesting thing and i wonder the solution for that

#

but just for an idea, there was a component which displays screen of a website, maybe you can use that instead of using webbrowser widget

tranquil yoke
#

I am working on the same thing.

My Browser is present on server, so whatever happened to that browser, is replicated to all clients. Though widgets cant be replicated so for that i have done like this

Each user is doing this on local web browser, and also rpc to server then multicast to client, which does the same thing on there own web browser, which creates the effect of the same

#

Only thing I did not do , is to do the cursor, that would have been very costly. just the clicks and the text.

warped apex
#

thats a very interesting thing and i wonder the solution for that
@peak sentinel , where’s that component ? I have no idea ??

lost inlet
#

this isn't going to ready made for you

#

you'll have to experiment with the widget component and the web browser control

warped apex
#

I am working on the same thing.

My Browser is present on server, so whatever happened to that browser, is replicated to all clients. Though widgets cant be replicated so for that i have done like this

Each user is doing this on local web browser, and also rpc to server then multicast to client, which does the same thing on there own web browser, which creates the effect of the same
@tranquil yoke what about scrolling ??? Scrolling also doesn’t get replicated. And RPCs is not a good solution for this - I have experienced it till now. It has security breach

lost inlet
#

but the CEF version in UE4 is a couple of years old, renders at a low framerate and won't be synchronised between clients

tranquil yoke
#

Guys, how would i package, Server and client code for blueprints, i want something which i dont want on server,because it meant for client only.

lost inlet
#

that's a bit more difficult with BP, i manage to make a client only code module

warped apex
#

Guys, how would i package, Server and client code for blueprints, i want something which i dont want on server,because it meant for client only.
@tranquil yoke For maps, you can use, “cook only map list”

lost inlet
#

cooking in UE4 is based on what's referenced by your maps list

warped apex
#

Guys, how would i package, Server and client code for blueprints, i want something which i dont want on server,because it meant for client only.
@tranquil yoke and for the code, Just add the “ is dedicated server > Branch “ and put your code after that accordingly

#

but the CEF version in UE4 is a couple of years old, renders at a low framerate and won't be synchronised between clients
@lost inlet what’s that ?

lost inlet
#

this is an easily googleable thing. chromium embedded framework

tranquil yoke
#

@warped apex Scrolling , clicks and Keyboard , these all are inputs. you just need to pass them to each client and replicate the same behaviour on all other clients

#

What if i want some code, inside blueprint , only to work for client not server , is Dedicated server node is enough

lost inlet
#

well yes but the BP will still be packaged

warped apex
#

@warped apex Scrolling , clicks and Keyboard , these all are inputs. you just need to pass them to each client and replicate the same behaviour on all other clients
@tranquil yoke Replicating every URL, all the inputs... like this... gonna choke the server like hell.... 🤔 It’s too much packet data in a very short period of time... It’s manageable somehow if there are only 2-4 people in the game... But just suppose what if there are 100 at the same time ??

bitter oriole
#

No, it's pretty fine

lost inlet
#

how is it? that's pretty minimal in terms of network traffic

#

as opposed to say, movement

bitter oriole
#

Most games have a lot more data than that

tranquil yoke
#

yes, i dont think, event based inputs will choke network

warped apex
#

What if i want some code, inside blueprint , only to work for client not server , is Dedicated server node is enough
@tranquil yoke yes. It is. I have done it. But yeah, code will be written in the server package too, but will not work.

tranquil yoke
#

@warped apex Problem is the thing i am using, is not getting packged for linux.

#

as it gets packaged, it requires referencing

lost inlet
#

wait so is this a problem of something NOT getting packaged?

tranquil yoke
#

yes for linux

#

for windows it does

lost inlet
#

and the windows server target too?

warped apex
#

@warped apex Scrolling , clicks and Keyboard , these all are inputs. you just need to pass them to each client and replicate the same behaviour on all other clients
@tranquil yoke , Anyways, that’s not the actual problem which I fear. The main problem is , this is not right way to do it. Because it’s actually opening every URL on all the clients. It’s not just sharing the screen or like that.

lost inlet
#

you can use the nuclear option DirectoriesToAlwaysCook

#

but i'm not sure i have enough context here to know why it wouldn't be packaged

tranquil yoke
#

its because of the library issue with linux i guess

thick jungle
#

I feel like I'm bumping into some idiotic little wall that I can't see o.o

I've got a server set up that I can connect to and that I can walk around on. But then, when I shut down the client and I boot it up again and connect.. I don't get a pawn!
Shut down the server, reboot, connect, pawn. Connect again, no pawn.. Is there any particular reason why I might not be getting a pawn on the 2nd+ connect??

tranquil yoke
#

@warped apex what cons do you see with this ?

warped apex
#

@warped apex what cons do you see with this ?
@tranquil yoke simple - It’s not safe to login into any kind of account. like google account or anything. Because it does on other clients too.

tranquil yoke
#

yeah, that is not good.

warped apex
#

and due to this, other clients get the cache of your logged accounts and web history etc in their PCs.

#

I feel like I'm bumping into some idiotic little wall that I can't see o.o

I've got a server set up that I can connect to and that I can walk around on. But then, when I shut down the client and I boot it up again and connect.. I don't get a pawn!
Shut down the server, reboot, connect, pawn. Connect again, no pawn.. Is there any particular reason why I might not be getting a pawn on the 2nd+ connect??
@thick jungle what kind of server are you using ??

thick jungle
#

you mean the configuration I use to build the Server.exe in UE4? Development Server

warped apex
#

I mean , you made the dedicated server using the regular Unreal type ?

#

when you connect with your client to the server, what error do you get on second trial ? Is it like something - “ No running process found “ - something like that ???

thick jungle
#

[2020.10.17-20.24.34:281][386]LogScript: Warning: Accessed None trying to read property CallFunc_K2_GetPawn_ReturnValue_1
CharacterFundamentComponent_Blueprint_C /Game/Maps/RealmInPotentia.RealmInPotentia:PersistentLevel.RIP_PlayerController_C_2147482141.CharacterFundamentComponent_Blueprint
Function /Game/RealmInPotentia/Development/Components/PlayerComponents/CharacterFundamentComponent_Blueprint.CharacterFundamentComponent_Blueprint_C:ExecuteUbergraph_CharacterFundamentComponent_Blueprint:0460
[2020.10.17-20.24.34:282][386]LogScript: Warning: Script call stack:
Function /Game/RealmInPotentia/Development/Components/PlayerComponents/CharacterFundamentComponent_Blueprint.CharacterFundamentComponent_Blueprint_C:ExecuteUbergraph_CharacterFundamentComponent_Blueprint

#

I actually get a "Accessed none trying to read GetPawn ReturnValue". That's server-side. Client-side seems to be acting like a spectator camera

warped apex
#

Can’t figure out with this log only.

#

If your client doesn’t connect the server on the 2nd trial, just open the console on the client and write “ open 127.0.0.1 “ It will try it again. It’s buggy on Local network. Sometimes, it just doesn’t connect seamlessly

#

Sometimes, it connects the server but doesn’t load further, in that case, you need to click in the CMD window of the server, and hit the ENTER 😅 to load the code and it make it work

thick jungle
#

lemme write my situation in bullet points, might be easier:

  • server running on remote IP address
  • dev PC connects with first client, player logs in successfully with a pawn and can walk around (but without animations)
  • dev PC disconnects
  • dev PC connects with a new fresh client, player logs in successfully but gets a None value returned for his "Get Controlled Pawn" function (error is server side)
  • dev PC sees a spectator camera while having a non-spectator player controller
warped apex
#

umm.... can’t help without seeing the code. Where did you use the get controlled pawn and how did you use it , etc.

thick jungle
#

... I mean... the server just doesn't spawn a pawn for a new player?

warped apex
#

You have the Default Pawn and Controller assigned in the GameMode settings of the map which you are hosting in the dedicated server ??

thick jungle
#

the Event BeginPlay etc aren't triggered either on the pawn

#

yeah, they're set to my own

warped apex
#

... I mean... the server just doesn't spawn a pawn for a new player?
@thick jungle but it did when the PC connected it for the first time. You said it.

thick jungle
#

yeah, but it also does that for single-player for example

#

that's not technically a "new" player

warped apex
#

Are you trying to use “ Get Player Controller” or “ Get player Pawn” etc. nodes with index : 0 , at any place ???

#

in the Event Begin Play or anywhere ?

#

of the Level Blueprint or any other Actor BP ?

thick jungle
#

yeah, couple spots

#

but that should always return the local player on multiplayer

warped apex
#

but that should always return the local player on multiplayer
@thick jungle I also read the same but in reality, it did not. - I don’t know why... on getting the controller of index 0, gives us actually the controller of zero index among all the players...

thick jungle
#

so you're thinking it's crashing on a bit of my code in the controller or gamemode or gamestate or so, and as a result not spawning the pawn in?

#

@thick jungle I also read the same but in reality, it did not. - I don’t know why... on getting the controller of index 0, gives us actually the controller of zero index among all the players...
@warped apex so what on earth are we supposed to do instead??

warped apex
#

so you're thinking it's crashing on a bit of my code in the controller or gamemode or gamestate or so, and as a result not spawning the pawn in?
@thick jungle may be, but I can’t say surely without looking at the code. Because you said, you set the default pawn in the settings, so it must spawn it regardless of anything. Not in only one case, if you spawn the pawn or change the pawn - something like that with the Blueprint.

thick jungle
#

it should spawn that class of pawn, WHEN the server says "go ahead and spawn a pawn". I'm thinking my server for some reason doesn't think that that controller needs a pawn or so.. :/

#

but you've never had anything similar to this happen then? :/ any UE4 server just always spawned a second pawn in on a second connect??

warped apex
#

but you've never had anything similar to this happen then? :/ any UE4 server just always spawned a second pawn in on a second connect??
@thick jungle yes. It always spawned for me. No problem at all.

swift kelp
#
    MeshComponent = Cast<UStaticMeshComponent>(GetComponentByClass(UStaticMeshComponent::StaticClass()));
    NullCheckRetNone(MeshComponent);
    MeshComponent->bIgnoreInstanceForTextureStreaming = true;
    MeshComponent->SetIsReplicated(true);

Should that work in the BeginPlay or not?
It is not working in the begin pay and the NullCheck fails in the constructor
any ideas?

#

If set in the begin play, and change the scale of the object in a Server_DoSomething it doesn't change the scale

#

so they are now supposed to replicate, but when I Flop1->SetActorScale3D(CardScale) the scale does not get replicated

warped apex
#

Things do not get replicated on themselves. 🙂

#

You have to make custom events, - RPCs.

#

On the client, fire a “Replicated on Server” event, from there, fire a “Multicast” event and then set the scale in the blueprint.

swift kelp
#

testing

#

Thanks, appears to be working

tranquil yoke
#

Does collision going to replicate all by itself

vale ermine
#

anyone know how save game object works on dedicated server hosted on AWS? I want to know how I could manage the save files on the server. So there is dedicated pricing and spot pricing. The dedicated is what I want that way I know the save files are on my dedicated server but that is not what I am trying to understand. What I am trying to understand is that if I choose spot pricing that would spin instances up on servers that are not dedicated correct? So this would mean my save folder would not exist on those spot priced server?

unkempt tiger
#

Hey, I'm wondering if a server's outgoing RPC buffer saturation is affected by the server's incoming RPC buffer saturation

#

If clients are sending in large packets, will it mean a higher probability for outgoing unreliable RPCs to drop?

#

I want clients to, upon successfully shooting a target on their predicted screen, to send a nice buffed packet with a bunch of information, it could be a whole bunch of vectors even... but I'm really concerned about it because the server is already sending a lot of data to the clients and it's hard avoiding saturation as is...

#

I'm really hoping to get an answer like 'no, it's fine, clients can send large packets to the server and that wont affect outgoing saturation'

lost inlet
#

well if you want a save game file to persist, you would have to implement something to save them somewhere, maybe to S3

#

or implement some RESTful service that persists the data some other way

vale ermine
#

i have them saving to s3 and retrieving them from s3. So what your saying is when the instance spins up. I would then pull the save files for the players on that instance from s3. That would be the best route I guess. So are those saves gone when the instance spins down?

lost inlet
#

if it's an on-demand instance i would assume that data is gone when the server is gone

#

i would probably not use save game objects though

vale ermine
#

ok thank you that is what i was trying to understand

#

I am using lambda and dynamo db but looking into all options

#

and the save object lets me use my current system

#

so I don't know if I will switch over just trying to get to a testing point

lost inlet
#

for persistent data for a player, i would likely save those in a database and use a web service to retrieve that data when necessary

vale ermine
#

I am using multiplayer plugin for the login and lamda and dynamodb then using their s3 plugin to test the save files option . what do you mean by web service? a middle man for ue4 and the database?

lost inlet
#

yes, i would not directly have the AWS SDK on a game server

vale ermine
#

I see

lost inlet
#

though for us, we have a public dedicated server so it's not like we'd like to give people our access keys

#

but even then, it's a nice separation of concerns

vale ermine
#

it is and I see the issue there

#

I am in no rush and want to try all options so I will do the Restful way and see if I can write the middle ware

warped field
#

does anybody want to help me with my crappy Among Us 3D? I'm stuck trying to replicate events

meager spade
toxic schooner
#

I have a topdown game and only want to replicate X and Y movement values. How would I change the character movement class to have the server update only X and Y values every tick? and would this even make a difference in server load?

full ember
#

Hey guys.
Does someone have experience with using Photon for multiplayer voice chat?
Help needed for beginner setup 🙏

meager spade
#

multiple*

swift kelp
#

@meager spade removed

rich ridge
#

I am using multiplayer plugin for the login and lamda and dynamodb then using their s3 plugin to test the save files option.
@vale ermine Can you tell me which plugin you are using for lambda and dynamodb?

vale ermine
#

multiplayer with blueprints

rich ridge
#

any link?

#

got it

vale ermine
#

kk

#

From their tutorial I have learned how to write my own lamda functions and manipulate my dynamodb

rich ridge
#

its a good plugin, but I can't afford to spend this much on plugin, I m saving money for game launch.

vale ermine
#

yea our studio got lucky with the loan

rich ridge
#

Epic making assets free every month, instead it should make useful plugins free.

vale ermine
#

it would have taken me a few months to expose all that to bp

rich ridge
#

true.

full ember
#

@rich ridge how's it going? yesterday you recommended I should check VIVOX for unreal multiplayer voice chat.
I did that, but I'm also checking Photon, since I have a guy who knows Photon for Unity. Do you know if Photon works also unreal?

rich ridge
#

@full ember I have checked photon in past.. it has overwhelming support for unity not unreal.

#

So I skipped that

#

As far as I know photon will give you the platform, you will be responsible for modifying that platform for your needs and then host it..

#

But in case of vivox you don't need to worry about hosting

#

Vivox is already been integrated into the engine

#

Just setup the keys and you can start your POC.

full ember
#

OK

#

May I DM you?

vale ermine
#

isnt it great when 2 plugins use the same libraries. Was fun merging one plugin into the other to avoid duplicate modules. Never done that before.

full ember
#

@rich ridge DM?

rich ridge
#

Yes

worthy knot
#

Where can i change UE4's net update frequency?

sharp crest
#

Hello, I've recently decided to make a multiplayer game, and what I want to do is a ball with physics. I'm wondering how I can replicate the ball physics in a smooth way.

twin juniper
#

hey everyone I wish to setup a single start button for my multiplayer game

#

so wish to make a matchmaking

#

so can anyone help me with this

twin juniper
#

I am personally waiting for Network Prediction to release before touching physics

worthy knot
#

@twin juniper lmao ikr

#

and when will that come? 4.26?

#

or UE6

#

Anyway where can i change UE4 net update frequency

#

i googled but it doesnt show where i can change it

bitter oriole
#

@sharp crest Right now, this is quite really hard to do, and there really isn't a built-in tool for that. The only way in UE4 to have multiplayer physics is to have the host do physics and replicate the results, like the smootsync plugins etc do, but that will work quite badly if players need to be able to touch the ball.

ruby rock
#

@worthy knot this?

twin juniper
#

hey can anyone help me to setup a online multiplayer lobby

urban palm
twin juniper
#

I have set up from 2 different buttons

#

and it is working fine

#

but need to set up from same button

quasi kite
#

A bit confused, how do people replicate equipment meshes?
I have a USkeletalMeshComponent for each equipment socket (Like the right hand), and I at the moment set the USkeletalMesh directly from an UObject equipment BP.
I've tried to make the whole thing replicate, while failing at it, but it also seem like people in here don't make the component itself replicate, but rather the skeletal mesh somehow

#

Oh sht nevermind me, think I found a possible solution further up

royal rampart
#

hey guys, would someone know how to execute a server consolecommand in the gamemode?

#

this isnt getting executed properly

bitter oriole
#

PlayerController->ConsoleCommand("...");

royal rampart
#

yeah that works for players, had to execute console command before in clients

#

but this is for the server

bitter oriole
#

It's not a player thing

#

Call it on server and it'll work

#

Though there are methods dedicated to ServerTravel directly so console commands aren't useful

royal rampart
#

so call it for a random playercontroller?

#

on the server?

bitter oriole
#

GetWorld()->ServerTravel is what you want though

royal rampart
#

ooo okay 🙂

#

I thought I had to do it through commands cause this is how it worked in blueprints xD

thin stratus
#

BP do it with commands, yeah

royal rampart
#

it works 🙂 thanks guys xx

worthy knot
#

@ruby rock Yeah but isnt it like even that value slider is limited to a number?

royal rampart
#

GetWorld()->ServerTravel is what you want though
@bitter oriole the server map changes now and spawns in the correct pawn but I cant control the pawn

#

is it because it doesnt get automatically possessed?

bitter oriole
#

No idea, depends on your game

empty axle
#

Is it possible to send huge arrays over network with ue4?
Normally when you try to replicate huge array it will complain that:
Attempted to send bunch exceeding max allowed size. BunchSize=212300, MaximumSize=65536
Can this be overcome by using FastArraySerializer?

vale ermine
#

so would Amazon API Gateway be good to use as middle ware for my client and server?

bitter oriole
#

Why not use the built in multiplayer

vale ermine
#

I am at a loss to what I am even doing sigh

#

I need login and user database for their items that's all I want. But I am realizing there are all these keys I have to keep secure and its not making any sense to me. If the key is being called by the server I do not understand how the client would have access to it. I don't see the point of middleware besides hiding those keys but that is where my understanding ends

bitter oriole
#

You need a central database server with a server software that your dedi servers connect to in order to signal changes to players

#

Players can connect to the central server, read only

#

Or they can get their data through the dedis

#

Only dedis should be able to change data

vale ermine
#

I would like to get the data through the dedis

bitter oriole
#

You need no middleware here

#

Just your own server software for the database of course

#

Non UE

#

And a HTTP channel between dedis and that server

#

Using json or something

#

Probably can use Python or something for the database server

#

(This stuff is obviously not for a small team)

vale ermine
#

What options are for a small team. See the only thing I see possible for me right now is to use lambda and dynamodb. Clients would have access to lambda but not dynamodb.

bitter oriole
#

The entire idea is not for small teams

#

Keeping the database server safe from hackers is a full time job already

#

Not to mention DDOS prevention

#

Not to mention the money

#

But hey I gave you some leads to follow anyway so feel free to try

vale ermine
#

so do I write the ddos prevention into my middleware?

#

thank you

bitter oriole
#

Stop using that word

#

You dont know what it means

#

And you can't "write ddos prevention"

vale ermine
#

I am going to stop trying to talk about and figure out things I know nothing about thank you

rich ridge
#

@vale ermine instead of building from scratch you can fork Nakama.

vale ermine
#

I am open to anything right now

rich ridge
#

Please check nakam then

vale ermine
#

thank you

rich ridge
#
#

It has UE4 plugin

#

And good part is it uses grpc not century old http

vale ermine
#

lol another source build wahoo. I am getting close to making my 2t m.2 haha

rich ridge
#

Digital ocean already has app so hosting is hassle free.

vale ermine
#

I mean that is all I am asking for is a direction that works

rich ridge
#

Wait.. if you don't wanna customize it, you can directly use their binary and host it

vale ermine
#

That is very cool so I would be able to transition to my own servers eventually.

rich ridge
#

Yes with Nakama you have this flexibility

vale ermine
#

Well I have one year to do all this so wish me luck but I think you guys helped me get on the right track and I thank you for that

rich ridge
#

Why one year?

jolly siren
#

Is Role guaranteed to have been replicated by BeginPlay 100% of the time? Or should I be using PostNetInit ?

rich ridge
#

I have been doing this check in BeginPlay and never experienced any unsual behaviour

jolly siren
#

yeah I would expect for it to take quite a lot of players/testing to experience it. But I'm just checking if anyone knows if it is 100%

#

My assumption is I should be using PostNetInit and not BeginPlay

#

I guess I can just write a test case

rich ridge
#

As per my understanding when an actor is created by server , server automatically sets the role.

vale ermine
#

@rich ridge one year because that is when I am breaking partnership with LLC and starting my own that I have 100% control over. I don't like only having 50%

rich ridge
#

Ohh nice

#

You are greedy😝

vale ermine
#

Like right now because I am 50% I have no control over the project that is being worked. So now you have the other 50% working on their stuff that is a single player and will not go anywhere and I am trying to build my future. I would not say greed but a lack of direction on one of our parts 😛

rich ridge
#

Hmm

sweet robin
#

How do you properly handle a virtual RPC? Say I have a Server RPC called AddAmmo() in the parent class, with some AddAmmo_Implementation() in the cpp. If I make a child class, I'm guessing you override AddAmmo_Implementation() then call Super::AddAmmo_Implementation()? Or do you just call Super::AddAmmo()?

chrome bay
#

You call _Implementation

#

Calling Super::AddAmmo() will put you in an infinite loop

sweet robin
#

Okay cool, that's what I thought. Thanks.

worthy knot
#

@chrome bay ever used the smooth sync plugin?

twin juniper
#

I have made this code for joining sessions and it working but with 2 different buttons and I wish to use both buttons together like join a session create one and then join

#

any help

#

on this

#

one

#

fins session faillure also now working

#

not

#

working

vale ermine
#

So I am trying to form a game plan. From what we talked about here is my conclusion. I use a multiplayer plugin and spoke to the developer. The way lambda and dynamodb is set up, clients only have access to cognito but not dynamodb. Ok from my point of view that is good and what I want. cognito is set up with the correct user groups that have the correct authentication to make lambda a viable solution. The other option is to use an api gateway to communicate from client to gateway to server and reverse and my assumption is that the gateway would be a replacement for lambda.

vale ermine
#

I must be missing something here and need the web api no matter what route I go.

#

so lambda would be server-less architecture. I would use HTTP requests via Amazon API Gateway to run the lambda code and return what I need through the gateway

bitter oriole
#

This isn't really UE4 stuff so I don't think most people here are familiar with that

vale ermine
#

but im trying to get ue4 to work with it crys

bitter oriole
#

Yeah, but you should still try to find people who know what "cognito" or "dynamodb" are

#

Because I sure don't think many people here do 😛

vale ermine
#

im learning its fun but i got you 😛

gray scroll
#

any idea why?

#

both times from server

#

if the map is invalid

signal lance
#

Is Role guaranteed to have been replicated by BeginPlay 100% of the time? Or should I be using PostNetInit ?
@jolly siren

I might be wrong but I'm pretty sure for replicated actors all replicated properties are sent in the initial bunch that creates the actor so I think begin play should be fine
(I might be wrong tho)

foggy wave
#

howHow do i get player index or controller id for each client so i can set it to an integer variable

meager spade
#

@jolly siren a replicated actor will always have the correct role by BeginPlay

lucid vault
#

After Server Traveling every client from the lobby, how can I wait for all players to connect before beginning match in new level?

#

In theory, I could store the amount of players in the lobby in the game state, then use OnPostLogin to count every player that has joined the new level. I'm just not sure how that works if a player disconnects their game while traveling, for instance. Then the required player count would be 1 more than it should be

#

I guess I can check NumTravellingPlayers in ReadyToStart

lucid vault
#

NumTravellingPlayers is always zero for me 🤔

unkempt tiger
#

Is there a way to force two actors to replicate their replicated properties at once, in one packet?

#

For example, a player and a weapon - having replicated properties of both the player state and the weapon state replicate together is kind of crucial if one should be able to freely manipulate the other

vale ermine
#

I got a jingle ... You put your user groups in, you take their authorities out, you put the lambda functions in and you invoke them all about, you do the hokey pokey and through the gateway is their route, that's what its all about!

unkempt tiger
#

Uhhmm

#

Is that in reply to my question? :3

vale ermine
#

no but I will do my best to answer your question but I don't know about the one packet thing. There is replication graph you can look into.

unkempt tiger
#

Oh the replication graph's purpose is different I'm afraid

swift kelp
#

can any of you help me understand this picture

#

why is the main viewport showing the 05c (5 of clubs) as the hole card when really that is another client's hole card

#

this is problematic because if they are using a 2d-scene-capture, they will all see the 5 of clubs

#

instead of their actual hole cards

vale ermine
#

well i was running into this the other day. you are pulling this from player controller 0?

swift kelp
#

there it is using a 2d scene capture where they all are viewing the same card.
no, I am using this by...

#
for (FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)


        AThePlayerState& PlayerState = *Iterator->Get()->GetPlayerState<AThePlayerState>();
        if(!&PlayerState)
            continue;
        count++;
        FHoleCards HoleCards;

--- code ---
        PlayerState.GetTableQueue().Enqueue(HoleCards);
}
#

so each player state gets their own hole cards

#

the code above is an object form the game-mode

#

prior to this game-mode object, I do use

    if(!HasAuthority())
        return;
warped field
#

Hey guys, does anyone know how can I force all my players in a level to go to another? Let's say there are 4 player in the lobby, and one has the Start game button, when pressed, it only works for that one. Any clues?

swift kelp
#

@warped field you need ClientTravel/ServerTravel

warped field
#

🤔

swift kelp
#

    if(GetLocalRole() != ROLE_AutonomousProxy)
        return;
    if(!IsLocallyControlled())
        return;

I added though, but the actor is still getting sent to other players and not staying local when I use GetWorld()->SpawnActor
I need it to stay only on the client

#

@red siren
GetWorld()->ServerTravel

ruby rock
#

I see a number of example MP systems using either a Default Pawn or using a SpawnActor+Possess to bring characters into game.

When using the Default Pawn method standing up HUD widgets and client side functionality seems pretty bullet proof. Using the SpawnActor+Possess method, this seems to rely upon magic "delays" (assume it waiting for things like replication to finish) - is there a definite event or property for when the client side widgets can be built and used?

wicked brook
#

OK i got a problem that seems simple in theory but for some reason i cant get over it. If i do this, it works.

#

so server shows 0 for the velocity. But if i save it and try to pass it through rpc it still shows 0. What am i missing?

thorn cairn
#

Does anyone here have experience with implementing stun turn into unreal?

#

PM please if so

swift kelp
#

as in I still get an empty string when I print them out from the clients

#

in the game-mode I did

    for (FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
    {
        AThePlayerState* PlayerState = Iterator->Get()->GetPlayerState<AThePlayerState>();
        PlayerState->CardPath = "a card path";
    }

and when I print the CardPath out on the player's/client's end, it is still a blank string, any ideas on how to fix this?

#
    for(auto PlayerState : GetGameState<ATheGameState>()->PlayerArray)
    {
        auto ThePlayerState = Cast<AThePlayerState>(PlayerState);
        NullCheck(ThePlayerState, void());
        ThePlayerState->CardPath = "a card path";
    }

that also failed to modify a data-member of the player state

#

I forgot about GetLifetimeReplicatedProps
I think that is why I am not getting any changes

peak sentinel
#

it was returning my Steam friends name before but its now only returning my Steam name

#

anyway fixed like this. someone in forums said playerstate changes i playername auto when steam connected

#

its a lie or i misunderstood him dont know which one lol 😄

twin juniper
#

Good time of day. Need match start icon notification on the desktop like in Dota2

twin juniper
#

hey anyone here who have information and have make online mobile multiplayer game (no dedicated server because of lack of credit card)

#

please help and I need guidance to do it

bitter oriole
#

Well you can try listen server instead. One phone will be the server.

#

Of course if that phones goes into a tunnel or loses wifi, then everyone drops from the game

#

And the phone needs enough uplink for all connected players

#

And enough CPU to run your game logic for every player

unique kelp
#

What exactly causes these GUIDs to get sent? is this unique identifiers for each replicated property sent the first time they are replicated? Why are they so huge?

stable kindle
#

Hi guys so i've been struggling with a custom implementation of the character movement component. Does anybody have any suggestions for what i could possibly do with the saved moves when the client switches pawns ? or is the best way to keep the client as close to the server as possible and then just let the server correct the client side when it switches out.

near bison
#

I'm trying to get player names to replicate correctly.
Everything works fine but with one catch:
a client who joins the lobby at a later time isn't aware of the names of all the other (already joined) clients

Any tips?

unique kelp
#

Sounds like you are doing a multicast to communicate those names

near bison
#

I am

unique kelp
#

Use a replicated property

#

a multicast only fires for the currently connected clients

near bison
#

I am using name in the playerstate, which is a replicated property

#

Should I set a variable called "name" which is a replicated property in the HeadText actor blueprint?

bitter oriole
#

You should simply set the player name in he player state, on the server

#

Mark it as replicated

#

No other work required

#

Assuming you are not using the built-in player name

unique kelp
#

Have the widget read the name from the playerstate, not set in the "SetName" implementation on clients

bitter oriole
#

The reason late joiners can't see the name is that you didn't use replicated variables, as you should have, but a client/multicast RPC, which is not usable for persistent information

#

server-to-client RPCs should be used for events

#

The nature of a RPC is that a late joiner won't get it

near bison
#

got you

#

This is my HeadText actor
so you're saying I jsut change this to the playerstate name right?

bitter oriole
#

Just do this on tick

#

Using playerstate->playername

#

Or use a replication event for playerstate->playername to do this

#

Doing it on beginplay clearly won't work

#

(no guarantee that the name has even finished replicating before Beginplay)

near bison
#

any thoughts?

stable kindle
#

Just do this on tick
@bitter oriole could an OnRepWork as well ?

#

my bad just saw that you said that

near bison
#

@stable kindle @bitter oriole any thoughts?

stable kindle
#

@near bison you'll have to store the player id and their name in an array and replicate that and check against the playerid

near bison
#

what, why????

stable kindle
#

so that you can actually tell which client is has which name

#

or is this a replicated name on the player state ?

near bison
#

this is replicated name

stable kindle
#

is there a replicated event that fires

#

onrep i mean

near bison
#

as stranger said, I don't need a replicated event

stable kindle
#

are you doing this on tick ?

near bison
#

yes, just to test right now

#

but why is tick not working too??

stable kindle
#

the only thing i can think of is that it's not replicated

near bison
#

you can see player name is replicated

stable kindle
#

is it initialized correctly ?

#

what is the expected output

near bison
#

ok im gonna print out the player name on tick now

#

see? 1 client (the server) has Jack, the other has dorsey

#

what in the world is wrong

#

is it something to do with the TextRender component not replicating properly?

bitter oriole
#

Widgets don't and shouldn't replicate

#

You should check which player state is used on the client

#

For debugging purposes, you should simply log the name of every player state, to ensure you have the valid information replicated

#

If you don't, then you just didn't set thevalue on server

near bison
#

I'm checking now, 1 by 1

bitter oriole
#

A good way to do this is logging in player controller if locally controlled

#

You can they add the network role to the debug string

#

Like "player ROLE_AUthority, player 1 = jack, Player 2 = Dorsey" ; "player ROLE_AutonomouProxu, player 1 = jack, Player 2 = Dorsey"

#

When doing multiplayer code you need to invst in debug tools

near bison
#

Looks like that's the problem. Client has the same name for all player states. Server has same name for all player states

bitter oriole
#

You will spend 5x more time than a singleplayer game to do any feature, so you should be sure you can test, diagnose and fix

near bison
#

Wait, but how can player state details be inconsistent? Isn't the playerstate networked

#

In this case, how are 2 different clients seeing 2 different GameStates (with names in playerstate being set differently)?

bitter oriole
#

GameState, or PlayerState ?

#

Is the value replicated ?

near bison
#

Right now, I'm looping through the player array in gamestate, and printing the values of the names in each playerstate (on every client)

#

Each client is seeing something different

#

Is the value replicated ?
@bitter oriole Yes

bitter oriole
#

Then this only makes sense if the client has set his own value to PlayerState locally

#

Which obviously you shouldn't do

floral tulip
#

short question, is the advanced session plugin good to make test via friendsplay over the internet or should i directly dive into EOS?, i come slowly into the phase where i should start test with steam etc

near bison
#

^ this is in my playerstate event graph

#

Now all clients are seeing Jack, lol

bitter oriole
#

@near bison Why would game instance be involved in multiplayer ??

near bison
#

does it matter? I'm getting my local game instance variable and then using it to set a replicated value
it's a one time thing

bitter oriole
#

Yes it does matter

#

GI is not replicated

#

So this can't work on server

#

it will always get the server's name

#

On the client it will lwyas get the client's name

#

What you should do here, is call a Server method with the GameInstance name as a parameter, and then set the PlayerName field in the PlayerState, on the server, using this value directly

#

You really need to write on paper where every object resides, and where the network comms happen

near bison
#

You really need to write on paper where every object resides, and where the network comms happen
@bitter oriole you've gotta believe me, in that I know...

bitter oriole
#

Does SetPlayerName take the actual name as a parameter ?

near bison
#

every other piece of entworking is working for my game. This is just oddly tricky because a client can join at any point, and I don't know where else to get my name form

bitter oriole
#

GameInstance is not replicated so it won't be usable as a parameter over the network

near bison
#

ok I'll pass a string now

#

ok

#

it works

bitter oriole
#

No shit

#

😛

near bison
#

quick question

#

when I get the game instance (or anything for that matter) and cast it, and send it as a parameter, isn't it creating a copy?

bitter oriole
#

Not at all

near bison
#

so shouldn't my custom event have had the local copy of that player's game instance

bitter oriole
#

Nope

stable kindle
#

no you're better off calling it than storing it.

#

it gets the reference not a copy

bitter oriole
#

There is no "better off"

#

It's not possible to copy it

stable kindle
#

There is no "better off"
@bitter oriole i meant storing the reference

bitter oriole
#

UObjects (every actor or component or generally spaking, anything in Blueprint) are non copiable, they cannot be copied, even in C++

near bison
#

I mean doesn't that depend if I'm passing by value or reference? (which by the way idk what BPs are doing)

bitter oriole
#

No, it does not

#

UObjects can simply not be copied

#

Instead, in multiplayer, they are passed as some kind of identifier

#

The object needs to live on both machines for that to work

#

aka, be replicated

#

If the object you are passing is not replicated, you end with a null pointer

#

GameInstance is not replicated - every player has one, the different versions are fully independent, not networked at all, they just exist

#

So you can't use it to pass as a parameter

near bison
#

Got you.

stable kindle
#

can also have a network stable name right ? tried it but i think you can basically set them up to be the same name

bitter oriole
#

Which brings me to the paper again : there are diagrams of which class exist on which machines, and whether they ar replicated, for the whole gameplay framework

#

You can just print it out and draw your own stuff on it to make sure you got it right

#

From Cedric's compendium

#

GameInstance would fit with widgets here

#

Well, except it's also on the server

stable kindle
#

hey @bitter oriole if you have a sec i had posted a query was wondering if you had any suggestions

bitter oriole
stable kindle
#

eh?

bitter oriole
#

Flipped the 1 and 2, but you get the idea

stable kindle
#

ah

bitter oriole
#

And I dont know about network stable names @stable kindle 😉

near bison
#

Just to let you know, I've read the compendium. And I actually have a lot of other networked components in my game that works fine

The reason I struggled with this? I was looking at the wrong place. I always assumed the name was being set correctly (in player state), so I thought something is worng with my widget setting

#

I never bothered to check if my game instance is yielding the right name

stable kindle
#

haha

bitter oriole
#

Which it is

near bison
#

Yes, it is

bitter oriole
#

What you didn't do right is using the GameInstance as a network object

near bison
#

UObjects can simply not be copied
@bitter oriole But then you said this 😛

#

Yes, that was a complete oversight

#

I'm usually careful about this stuff, everywhere else, where I have to extract something locally and send it to the network, I'm doing it fine

bitter oriole
#

Yeah I'm sure, just voicing some advice

#

I did a lot of multiplayer before and I still need a lot of time to debug issues

near bison
#

you know what would be really, REALLy useful?

#

if someone builds a tool that can be opened which shows you everything that's networked

#

but for starters, at least show all playerstates and gamestates visually

bitter oriole
#

You should be able to view these visually in the level editor window

#

They are actors, so they should be in the scene outliner

#

You can select them and see the state, for the server at least

near bison
#

I'll look into it

arctic willow
#

When I set visibility to true (previously set to false) on a character mesh in a multicast RPC, the simulated Proxies won't set it to true correctly (the character mesh is still not visible). Only if that Character Mesh is moving, the character is visible. I tried using Net Force Update after setting visibility, but it didn't worked out for me.

Can anyone help?

winged badger
#

In most cases, the visibility changes come as an effect of changing some other state that you already replicate

#

I can't think of a scenario where i would directly RPC visibility changes

#

Let alone use a multicast to do it

arctic willow
#

My case is, I want to hide the player only for the other clients, not for the client controlled character

winged badger
#

and what is the condition?

arctic willow
#

I use a multicast and check if the role is SimulatedProxy

winged badger
#

i mean

#

when you do want to hide it

arctic willow
#

When I apply an Gameplay Effect that hides the character

#

on it self

#

so my controlled character uses an ability that hides himself

#

but only for the other clients

winged badger
#

if (!IsLocallyController()) { Hide(); }

arctic willow
#

I don't let the server hide the character, because the weapon that the character is carrying is replicated and will be unvisible for the LocallyControlled Player.

#

if (LocalRole == Role::SimulatedProxy) { Hide(); }

winged badger
#

the gameplay effect is a state

#

so clients gtet that state replicated

#

which means

#

that can trigger the visibility change

#

there is no need to replicate that separately

arctic willow
#

So what should I do? Because in my opinion it need to be replicated separately, since the effect is different for Simulated Proxies then for the autonomous Proxy.

winged badger
#

al clients are aware of gameplay effects on all clients, correct?

arctic willow
#

yes

winged badger
#

so its already replicated

#

and as a state, consistent

#

there is no need to send the same information over network again

#

and also

#

i find generally replicating the visibility.... inelegant

arctic willow
#

My problem is not the replicated Gameplay Effect, it's that Simulated Proxies doesn't get visible when Setting visibility to true, only when their character is moving.

winged badger
#

hook into replication callback of the effect being applied

#

set the visibility locally on each machine

arctic willow
#

okay, I try

#

but wait, I'm using GAS and Gameplay Abilities won't get replicated. Only the Locally controlled client and Server has a copy of that Ability, so the autonomous proxies won't call the Set visibility function

#

I try it, to be sure just in case

#

Okay, I'm off for now, so don't bother Zlo for now. Thx for the Help, I appreciate it Zlo 😃

peak sentinel
#

because its not executing

foggy wave
#

How do i replicate (play sound at location)

ancient moth
#

Hello ! Someone who already setup a dedicated server with Steam could help me ? My dedicated and client are connected to Steam successfully but I can't see the session and the server is tagged as "LAN" on Steam server list even if I unchecked "LAN" on the session.

foggy wave
#

need help replicating sound!!!

mellow umbra
#

so im using als

#

how do i make multiplayer

lost inlet
#

if a server is in the LAN tab, it'll be there because it's on your local network

#

enabling the LAN checkbox basically just means LAN only, at least on steam

#

if it's not available from an internet query, it might because you haven't setup port forwarding

hazy snow
#

I'm having an issue with replication on a local server vs a remote one. When I run a multi-client session with a local server (via the editor), both my clients see the effect of interest replicated. When I launch my cloud server and connect via client, however, the effect doesn't replicate.

#

the Regenerate_Event is called in EventTick

rich ridge
#

@foggy wave sound is an asset you can't replicate it..

#

You have to program the sound ...

mellow umbra
#

so im using als
how do i make multiplayer

rich ridge
#

@foggy wave For example footsteps sound is embedded in animation..
To have better syncing of sound with animation..
And save network bandwidth.

#

And on every client server plays the animation, and when animation plays it plays the sound

#

@mellow umbra what is als???

mellow umbra
#

advanced locomotion system @rich ridge

rich ridge
#

What is stopping you to make multiplayer game?

ancient moth
#

@lost inlet Oh okay. Thanks !

mellow umbra
#

@rich ridge the camera has errors

#

and wont work for other clients

#

only the server

rich ridge
#

Are you using listen server?

mellow umbra
#

yes

#

the character spawns but the camera bugs out

rich ridge
#

Are your trying to control camera from server?

mellow umbra
#

no

#

its a fps

rich ridge
#

Exactly what is happening with your camera can you explain?

mellow umbra
#

il get a gif

#

this is what is supposed to happen

#

the clients

#

and as the server i can see them move

rich ridge
#

First time seeing this..

#

Check logs..

mellow umbra
#

many errors

rich ridge
#

Something fishy happening and logs might help you

mellow umbra
#

this is just repeated

#

multiple times

#

900 times

rich ridge
#

Your player controller has not possed the pawn

#

How are you joining game?

mellow umbra
#

player spawns

#

this is the code

#

for the player controller and such

rich ridge
#

Your NewPawn is null.

mellow umbra
#

so how would i fix it

rich ridge
#

This is the culprit

#

Once you know why this is happening , then fix is really simple...

#

There could be many reasons for this to haooen

mellow umbra
#

but i dont know why

#

or how do i figure out why

#

because als is made by another person

rich ridge
#

Put breakpoints and navigate around

mellow umbra
#

but what am I looking for

#

i never have really done multiplayer

quartz smelt
#

How would I get a client to possess an actor? When I bring up the possess node it says "Only runs on Network Authority"

rich ridge
#

Even I m not super expert in multiplayer..

#

@quartz smelt do in GameMode

#

GameMode is supreme authority

mellow umbra
#

but i dont know what to look for

quartz smelt
#

So create the function for possessing in GameMode? Do I need to replicate it?

rich ridge
#

Nope engine has handling logic.

#

@mellow umbra I guesss this is not your product or game?

mellow umbra
#

i want to make it into a game

#

i am just using someone elses movement system

rich ridge
#

Ohk understood now.

#

But this movement system is not required for multiplayer game..

#

If you want assets you can copy them in new project and start to work on it

mellow umbra
#

i want this movement system

#

its amazing

quartz smelt
#

@rich ridge Am I doing something wrong? My client can't cast to the gamemode, but the host can

rich ridge
#

Casting is not dependent on client or server.

quartz smelt
#

Dang, that's hella weird. I don't know why it isn't working then

mellow umbra
#

@rich ridge what should i look for

rich ridge
#

Find out exactly what is wrong

mellow umbra
#

idk what is

#

i saw what the value was

#

and it was a level

twin vault
#

@quartz smelt gamemode doesnt exist on client

#

put stuff that needs to be replicated on the gamestate

quartz smelt
#

Oh, the other guy said it didn't matter. So should I put the possess blueprint in a function inside of Gamestate?

twin vault
#

well you shouldnt be possessing on client

#

you only need to possess on the server

#

i was just answering why you cant use gamemode on client

quartz smelt
#

Oh gotcha, thank you

vale ermine
#

I should be able to test client rest api calls without creating a session correct? Use the login token to authorize the lambda function to return a value from users db. The only thing I would need to create a session for would be if I want to change a value on the users db? So client uses an item. client useitem sends rest command to gateway. gateway triggers Lambda function to return if user has item. If user has item true, invoke lambda function on server to remove item from user db and apply effects of item if needed?

mellow umbra
#

can anyone help pls

marble imp
#

Does OSC have an huge impact on latency?

harsh lintel
#

Can you access the PlayerState of an AI controlled character in a client? I know you can't access the AIController in clients and I guess it's the same for the PlayerState of the AI since it's owned by the controller I guess

hollow eagle
#

PlayerState is replicated to all clients. If you set things up correctly to have AIController request a player state it should be accessible.

#

You won't be able to access it through the AIController from clients, but you should be able to get to it via the playerstate array in GameState and Pawn->PlayerState

meager fable
#

How to handle overloading server functions?

#

this

#

is giving me this

#
UFUNCTION(Server, Reliable)
    void ServerPushBack(FVector PushDirection);
    inline void ServerPushBack_Implementation(FVector PushDirection) { ServerPushBack(PushDirection, PushBackDuration); }
    UFUNCTION(Server, Reliable)
    void ServerPushBack(FVector PushDirection, float Duration);
    void ServerPushBack_Implementation(FVector PushDirection, float Duration);
lost inlet
#

virtual Implementation function

signal lance
#

pretty sure UE4 doesn't allow function overloading for UFUNCTIONs

#

that's why it's giving you the error

lost inlet
#

well it does, for the Implementation function

#

especially if you explicitly define it

#

not sure if the default generated does that or not

#

or even if it didn't, you could just make it call something virtual

#

or use delegates

signal lance
#

well there are workarounds ofc but I'm saying there is no way to have multiple ufunctions with the same name (overloading)

meager fable
#

how would I approach it then, what should I mark as virtual?

#

or maybe there just exists a simpler way to have member variables as default parameters

kindred widget
#

Might also be worth considering just defaulting the Duration to -1.0f and building logic around whether there is a duration specified or not inside of the single function.

signal lance
#

Yeah that ^^ or
just have for example a normal function PushBack_Local() which is overloaded and have 2 different ServerPushBack functions (ServerPushBack and ServerPushBack_Duration) and have both of those functions call the local implementation which is overloaded if you really wanna go the overload approach

meager fable
#

okay, will think what approach seems better here

#

thanks guys

plucky sigil
#

Should you use GameMode's ChangeName or PlayerState's SetPlayerName to have individual names for players ?

kindred widget
#

@plucky sigil Either depending on how you want to do it. GameMode's ChangeName literally just gets the playerstate of the first argument that is a playercontroller and calls it's SetPlayerName.

plucky sigil
#

Do you know where i should call the SetPlayerName ? Should it be a RPC ?

#

I want to have the players enter a login or something of that sort, and have them specify their desired Player name

#

Where should i call the SetPlayerName function

meager fable
#

I made this 2 functions

UFUNCTION(Server, Reliable)
    void ServerAttack();
    void ServerAttack_Implementation();
    UFUNCTION(NetMulticast, Reliable)
    void MulticastRotateToControllerYaw();
    void MulticastRotateToControllerYaw_Implementation();

that are called like this:

void ABaseCharacter::ServerAttack_Implementation()
{
    MulticastRotateToControllerYaw();
}

but when I attack on my client he sometimes rotates and sometimes just does nothing. On the server the client always rotates

craggy raft
#

Hey, do you have any experience with switching between online subsystems, e.g. to use Steam hosting beside Gamelift dedicated servers?
So far I can do it, to switch from Steam to NULL to use Gamelift, sessions run fine, but cannot solve Steam re-initialization properly, thus Steam hosting does not work after Gamelift sessions. Any idea?

meager fable
#

also when the server attacks it always rotates but sometimes it does it in a different direction(but to the same place eg, 300 degrees to the left on the client, 60 degrees to the right on the server)

worthy rose
#

Hi

#

My peer player cannot destroy my object

#

any idea ?

#

thanks

bitter oriole
#

Guessing the actor shown here is not owned by that peer player?

worthy rose
#

it is an object that can be harvested that I would like to destroy.

bitter oriole
#

You cannot call Server method on actors that are not owned by the local player

worthy rose
#

ok! so how can I do`?

bitter oriole
#

Probably need to call that method on the server by going through another object - like a ServerHarvestStuff function on your Pawn

worthy rose
#

hmm ok so I have to delete my object from my peer player

#

not from the object himself

#

thanks i will try that

royal rampart
#

hey guys, is there a way to tell the client, hey a new player joined and loaded into your game fully

#

i know postlogin for the gamemode but i need it in the cliient

winged badger
#

any c++ @royal rampart ?

royal rampart
#

you want a snippet?

winged badger
#

i mean, its not a blueprint only thing?

royal rampart
#

nono i'm doing everything in C++

winged badger
#

override AGameState::Add/RemovePlayer

royal rampart
#

im trying to add nametags to all the players that joined with the correct names

winged badger
#

make them broadcast a delegate

#

typically PlayerState will be the last to arrive on client's machine