#multiplayer

1 messages · Page 316 of 1

tawny parcel
#

I have my BP project built with 4.15 source tho

brittle sinew
#

Oh, you do? Well you can do whatever you want with the function then

tawny parcel
#

Im just not familiar with how to make a C++ class for it or what not

#

Is it just a class with one command to set the isnetworkcompatibleoverridw?

#

or do i just change it in the .h or .cpp?

#

Thanks a ton for the help btw!

brittle sinew
#

You would probably want to do it in a custom GameInstance I'm guessing, it would be something like FNetworkVersion::IsNetworkCompatibleOverride.AddDynamic(&UMyGameInstance::MyFunction); (I think, it might be different binding to a static delegate? I'm not really sure looking at Google)

#

If you want to run a source build, you can just change it in the source

#

If you want to do it in the project, do the binding

#

Just wondering, are you stuck with BP only for something like iOS? Might just be better to bite the bullet and learn the module system, just to avoid running two separate projects like now

forest steppe
#

hey so im trying to replicate emitters to all in multiplayer for like gun muzzles. the issue is i can replicate it fine after making it an actor but i cant find a solution to mimic spawn emitter attached, so now it spawns but stays in the same place even if the play moves his muzzle

jolly berry
#

Yo I have an Actor placed into my world using the world outliner. It's replicated. It's responsible for changing objectives in the world. Whenever the code is activated to get a new objective, I check and make sure that method is only run on the server and then replicated to clients. However I'm receiving this error: UIpNetDriver::ProcesRemoteFunction: No owning connection for actor BP_ObjectiveManager_398. Function ServerUpdateCurrentObjective will not be processed.

#

The code is setup in the base C++ class which is inherited by my parent BP class. Wondering if that might have something to do with it. The BP class is set to replicate

thin stratus
#

@fierce birch Was the network stream today?

loud mountain
#

@jolly berry are u running on an listen server?

fierce birch
#

@thin stratus yeah

thin stratus
#

Nice, need to watch the youtube upload.
:D did they by any chance mention my compendium :x

fierce birch
#

few times

thin stratus
#

woot

#

That's cool

fierce birch
#

well, chat people mentioned

#

but I think Alex said something about it too

thin stratus
#

ya, thanks. Don't have time now

twin juniper
#

wrong section my bad

cosmic apex
#

hey @thin stratus I have a job for you if you are interested.

jolly berry
#

@loud mountain I'm assuming just using the popout PIE window auto makes it a listen server no?

loud mountain
#

Wow good Morning everyone and yes it does

#

Uhm The error You have means, that there is No owning Connection

#

Means that you need to have a owner for it

#

Because you are on a listen server you should make the servers playercontroller the owner i belive

#

This would have been a great question for yesterdays Stream

jolly berry
#

drat alright! How exactly do I make the server's playercontroller the owner?

#

does that mean I have to spawn the actor from the server?

#

or is there a way I can do that through the world outliner

#

or do I have to set the owner using the begin play on the server side?

loud mountain
#

There should be a function setowner

#

At least in c++ there is

jolly berry
#

oh I see, testing now

jolly berry
#

hmm I seem to still get the error

#

is it because I'm setting it in the C++ class not he BP?

#

lemme try that

#

even with me setting it in the BP and the C++ class I still get the error, is it possible it's something else? What I don't understand is that it's actually replicating and working flawlessly

#

my objectives are updating and rendering correctly on the client and the server

#

so I don't even know how it's possible this error is appearing

#

@loud mountain

#

sorry it took awhile for a response I was updating some of the replication functions/variables. The crazy part is it works! So I don't fully understand the error

jolly berry
#

Okay pretty sure I figured out why it worked. I didn't need any client to call the code on the server. Doesn't explain why I was getting the error but it explains why the net code was functioning despite the error. As of now I no longer need to fix this since I removed all instances of the server implemented functions but I am still curious as to what the error is really pointing towards.

indigo hawk
#

It happens when a client tries to join

#

I'm using steam

tawny parcel
#

I'm trying to bind the IsNetworkCompatibleOverride delegate of FNetworkVersion. Can anyone point me in the right direction on how to do this?

#

I'm trying to create a Blueprint Node for it, having trouble finding the right command

slim holly
#

@indigo hawk I think I've seen that before, it was something about folder names being too long

tough gyro
#

windows has a file path length limit of 250 characters or so

#

maybe that?

twin juniper
#

Good morning

cosmic apex
#

If my character has a static mesh shield that only comes out when you press a button, should I make it an actor or can I keep it as a component ?

thin stratus
#

That depends

#

It's useful to have it as an actor if it has specific values coming with it

#

Such as blockrate or so

#

And if you want to have different shields

#

But if it's only a visual thing and the shield is always the same etc

#

then you can keep it as a mesh and handle the block rate etc in the damage calculation of the character directly

#

You can technically save the data of a shield in a struct/datatable

#

And just fill the component and other data with it

cosmic apex
#

ahh so actor if I want more features in the future

thin stratus
#

And actor is actually only needed if the Shield is meant to be placed outside of the player (drop/pickup) and if it has values that change over time (durability)

cosmic apex
#

can you make the actor follow the character?

thin stratus
#

Yeah, plain data holding is a bit too less for an actor.

#

Yes

#

You can call "Attach to"

#

For example you can attach the Actor (its root component is the location then) to the Character mesh

#

And then even specify a Socket

#

For example the hand socket (Which you need to setup in the mesh editor of course)

cosmic apex
#

is it better to do that in the character blueprint if I want to assign it to a socket?

thin stratus
#

Hm, the Golden Rule of objective programming is that an object should handle its own state

#

Objects are here the Actors

#

So in an ideal situation, you would tell the shield that it's equipted

#

And pass it the Character

#

Then the Shield would attach itself to the Character

#

Otherwise you overload the character with all kinds of code

cosmic apex
#

ah that maybe part of the issue i'm having

twin juniper
#

@thin stratus how performant are Actors? Like in multiplayer, could you in theory have like 10k of them and no lag

cosmic apex
#

I was reading on the ue wiki that actors only add like 4bytes to the code because of the header code compared to a component so its almost not noticeable

#

Any tutorial recommendations for making a multiplayer shield actor ?

thin stratus
#

@twin juniper Technically yes, but that depends on the actor

#

I spawned empty actors in the my scene and even with multiple thousand actors, it wasn't lagging

#

If you add models to them the whole thing goes down the drain

twin juniper
#

For my instance I want to spawn in actors with only two things, a mesh and a variable, and maybe physics enabled

thin stratus
#

Physic enabled actors would probably hurt

twin juniper
#

hmm

thin stratus
#

You might want to disable physics on them (sleep) till they are used

twin juniper
#

Does Tick() need to be enabled for physics to be active?

thin stratus
#

hm, idk

twin juniper
#

Because maybe I could just disable the tick lol

#

and save on performance

thin stratus
#

Disable tick on actors that don't need it is one thing

#

I had a VR project with loads of candy

#

all physics

#

I found that putting them to sleep until the player interacts with them helps a lot

twin juniper
#

hmm

#

Arent things just naturally culled out when the camera isnt looking at them?

#

Like just for the client i mean

thin stratus
#

Well, if somethings is falling

#

and you look away

#

Do you want it to keep falling? :P

#

I mean, you could ask schrödinger at that point

cosmic apex
#

lmfao^

twin juniper
#

Lol

#

Am I not getting the joke?

#

-..-

thin stratus
#

Schrödinger's Cat

#

If you don't look, is it dead or alive

#

I was just joking, as if you don't look, is the physics thing falling or not

twin juniper
#

Lol

#

Ohh

thin stratus
#

.>

twin juniper
#

😛

cosmic apex
#

ah that brings me back to school

#

i'm a chemistry majors, we had shirts with shrod's cat on them in a box

thin stratus
#

It reminds me of the qwertee "Schrödinger's Dropbox"

twin juniper
#

@thin stratus are you currently working on any projects

thin stratus
#

Yes, why

twin juniper
#

Are you allowed to talk about it?

#

Or NDA?

thin stratus
#

Despite my own project, NDA

twin juniper
#

Lol

#

What's your planned release date?

#

I'm assuming you can at least say that lol

thin stratus
#

For my own project?

#

There is non. I work on it when I have time

#

haven't touched it for the past month

twin juniper
#

How long have you worked on it?

thin stratus
#

(or so)

#

Uff, 2 weeks only atm. But it's actually pretty small.

#

Trying to get the base systems in

#

It's a resource manager where you manage a fantasy guild and the resources are your guildmembers

twin juniper
#

Wait

#

Resources are people? Slavery?

thin stratus
#

:D na, you use them to send them on quests that the townspeople bring in

#

They earn money for living and give a bit to the guild so you can improve it

twin juniper
#

oh

#

Sounds like a mobile style game

#

Is that the intent?

thin stratus
#

Yes and no. I might port it to mobile later

twin juniper
#

hmm

#

Do you have experience with art?

#

or do u buy your art?

thin stratus
#

@twin juniper I only have a bit experience, but I don't think about art until I have a state in whic hthe game makes fun without art

#

I can always plug together some cubes and low poly art

twin juniper
#

Yeah

#

Sounds good

left sky
#

Hi everyone

#

Does anybody here worked with Amazon Gamelift?

tidal jungle
#

Hello, currently evaluating possibilities with a friend, we want to build a game that doesn't have instanced servers (lobby system or similar) but has possibly 200+ people on one map (mmorpg like), can you use the ue4dedicated server for such a thing? Would it be bad to build something myself with raknet and integrate it into the ue4 server or even standalone? (I'm aware of how much work that is)

#

Hello, currently evaluating possibilities with a friend, we want to build a game that doesn't have instanced servers (lobby system or similar) but has possibly 200+ people on one map (mmorpg like), can you use the ue4dedicated server for such a thing? Would it be bad to build something myself with raknet and integrate it into the ue4 server or even standalone? (I'm aware of how much work that is)

thin stratus
#
  1. The Server itself can do that, but it has limits. All your players need to be on the same map, as one Server can't have multiple maps. You need to work a lot with netculling etc. And games most likely start to lag because of all the collision checking in the Character Movement Component. At least that's what I read a few months ago. Usually people don't try to use the DedicatedServers with so many players. They were build for FPS sized games.
  2. Why would it be bad to use RakNet? If you can work with it (I don't know if they have any user slot license things) then go ahead.
#

@Sidia#9322

#

I can't tag people again

#

DISCORD

#

-.-

#

Could someone tag him for me -.-

alpine plume
#

@tidal jungle

#

There you go cedric

thin stratus
#

Ty!

tidal jungle
#

Thanks! Well would it be better to integrate Raknet into UE or standalone?

#

And raknet has no fee as long as you only distribute to pc

worn nymph
#

Why don't you want to use instances ?

#

Speaking of which . Would anyone be interested in a DSM for unreal . I just finished coding one . It can start and stop dedicated servers fully auto so they are opend when needed and shut down when no games are needed

#

Could also be used for dungeons , level streaming big open levels etc

#

Players can also choose to host or can use classics approach of having a master server list and choose games to join

#

And all can be controlled from a widget inside unreal

tidal jungle
#

@worn nymph cause we aim towards an open world game, I know about instances for different areas but we have to look whats possible for us

worn nymph
#

if its open world game even more reason to use instances

#

and level streaming

#

so you break big world up into small server chunks

#

and only stream in what players need

#

like this is a massive map from life is feudal

#

each one of them squares is actually a seperate server instance

#

they are spun up and shut down only if players are on the square

#

but together they make the whole map

twin juniper
#

@worn nymph isnt that the ARK map? lol

worn nymph
#

lol no

twin juniper
#

is that your map?

worn nymph
#

its life is fedual mmo

#

they finally launching the proper multiplayer soon still in beta waves

twin juniper
#

lol

#

@worn nymph lol

#

@grizzled crane hey

worthy wasp
#

just for my own curiousity - why would you need a SEPERATE SERVER to instance that map?

#

wouldnt SEPERATE SERVERS be for load distribution on population?

supple thicket
#

you wouldn't

worthy wasp
#

IE: WOW having 10 million subscribers - each server has 1200 players

#

(just an example of load balancing)

twin juniper
#

MMORPG's have very low real game play though

#

90% of it is grinding

#

10% is bossing / raids

#

If you compare it to MOBA games, League of Legends has 100 million users who play monthly

#

Way out classing WoW and basically every moba in existence

worthy wasp
#

that has nothing to dow ith the map instancing - but ok

twin juniper
#

Just saying that people shouldn't focus on MAP size, but instead on gameplay

#

Lol

#

That's literally the only reason why I mentioned that.

#

Large map < Good gameplay

supple thicket
#

map size can BE the gameplay tho

worthy wasp
#

^^

#

Ark

twin juniper
#

It can.

#

But...

worthy wasp
#

in some games... IT IS

twin juniper
#

Ark is more based around grinding still

supple thicket
#

(like the one im making)

twin juniper
#

i have like 753 hours on ARK

#

and i was second strongest tribe on a server at one point

worthy wasp
#

thats 753 more than me

#

😉

twin juniper
#

then everoyne just quit

worthy wasp
#

point?

twin juniper
#

point is, games shouldnt be revoling around constantly having to replenish resources

worthy wasp
#

its still the key element of the game

#

MAP = GAMEPLAY

twin juniper
#

grinding should be removed from games

worthy wasp
#

looka t EVE ONLINE

supple thicket
#

i disagree bdoom

twin juniper
#

no game should have grind

worthy wasp
#

thats opinion

slim holly
worthy wasp
#

your opinion = entitled to yourself

supple thicket
#

i'd say MOST players really enjoy resource gathering

twin juniper
#

Grind = Lazy Design

#

Its lazy

supple thicket
#

really gets the feel-good hormones going in the brain

twin juniper
#

anyone can do a grinding game

#

Its easy to make

worthy wasp
#

again - opinion (we were asked to move this CONVO btw)

twin juniper
#

thats why people do it

#

because its lazy

supple thicket
#

yeah we should to gaem design

tidal jungle
#

btw where is the code of the dedicated server? I cant really find it right now.. 😄

true peak
#

Is there any way to have a client call a function from the game mode? Like make a request for the server to call a function? I thought that was what custom event set replication to server did

#

but can't seem to get it to work

twin juniper
#

if I call a server function on a Character and try to use "this" to reference the player, or when doing a linetrace if I am adding an actor to ignore could I type Params.AddIgnoredActor(this); or would it be doing it on some class on the server?

#

AVeritexCharacter* TheCharacter, UWorld* World, UCameraCompoonent* FollowCamera

#

are these acceptable parameters

#

to pass into a server rpc

thin stratus
#

If the Actor is replicated

#

Which is needed to call RPCs

#
  • being owned by the Client who calls the ServerRPC
#

Then you can pass "this"

twin juniper
#

@warm pagoda you there?

warm pagoda
#

I don't usually hang out in this channel, you can ping me directly though. What's up?

twin juniper
#

Hey so uhh

#

Im trying to figure out this LoadObject thing again

#

but with a separate instance

#

U think you could help me?

#

Wait nvm i think i got it

#

yea looks like i got it

warm pagoda
#

Alrighty. 😛

outer sable
#

Hello! I'm currently trying to setup a basic network multiplayer lobby following the blueprints network multiplayer tutorial on Unreal's youtube. However, I'm having a few issues that I'm having a really hard time figuring out. Namely, my host is able to connect without any issues, the client however can find and join the server, but doesn't spawn in the lobby at all. And when I select a character in the lobby menu, my character disappears entirely.

I was wondering if anyone can point me to a working example project that I could download to compare and troubleshoot? I can't seem to find project files for this tutorial anywhere.

Thanks a ton!

thin stratus
#

Project files might be on the thread of the tutorial

#

The tutorial itself isn't the greatest though

#

It teaches a lot of unnecessary things

#

Lemme see though if there is a working exmaple project for it

fierce birch
#

@thin stratus ^

thin stratus
#

cheers

outer sable
#

Thank you! I read through that thread saying that the tutorial has a few unnecessary additions to it, but figured it'd still probably be the best way to jump into it quickly

twin juniper
#

@thin stratus morning

thin stratus
#

@outer sable It certainly is a good way. The thread is directed at Epic so they change it a bit though :P
@twin juniper Yo

twin juniper
#

@thin stratus I was going to post a video of my newest updates of my game since last night

#

But, I forgot to make the video... was too tired once I finished adding a new update

#

@thin stratus

frank portal
#

would you guys recommend playfab for a multiplayer fps game? or do you generelly have any experiences with it?

indigo hawk
#

I've never heard of it

cosmic apex
#

@frank portal we tried to integrate playfab but there wasn't really much documentation on it so if you can figure it out all yourself you'll ultimately save yourself the most money IMO compared to other alternatives

frank portal
#

@cosmic apex yes at the beginning it will be for free but i am not sure if it will be that cheap later on i saw some comments that it will be more expensive than some alternatives. also the documentation is not that much for ue4 like u said. did you find a alternative or still looking for smth good ?

cosmic apex
#

There's also gamesparks, they seemed to of had more plus they include a login blueprint. We're probably going to use steam and revisit the topic later just so we can reduce launch times

rare cloud
#

what the best way to rotate a character ? I read some topic talk about CharacterMovementComponent

frank portal
#

yes steam is nice, but the problem is that it is only for pc ^^ so playfap sounds like the right solution, because of the free developing accounts till 35 player or so

glad knot
#

@rare cloud The CharacterMovementComponent that is part of the Character automatically gets you network predictive replicated movement for translation and rotation in the default provided movement modes. You can also add your own movement modes and still make use of the network predictiction.

rare cloud
#

actually I simply want to set a new Yaw for my character

#

maybe an existing function already do that

glad knot
#

Calling SetActorRotation on the server side will automatically replicat that back to all clients

rare cloud
#

sometimes yes

glad knot
#

if you are using a Character (not a Pawn)

rare cloud
#

but nothing can happen too

glad knot
#

It isn't replicating back to the clients?

rare cloud
#

not everytimes

#

from my own experience

glad knot
#

The only time I have had that happen is when it isn't network relevant

#

which usually only happens if one character is a LONG way away

#

assuming you are running the default nerwork relevancy settings

#

To see if that is your issue you can check the box Always Relevant and see if it makes a difference

#

you also want to make sure you are setting the rotation on the server, not the client

#

If your action originates on a client, you will need to make a run at server RPC call to get from client to server and then set the Yaw

#

In most cased you won't need to override the Yaw and you can just use AddControllerYawInput

rare cloud
#

ok well from others clients it's look fine

#

but owner haven't got the correct rotation

hollow hatch
#

Any gurus want to have a quick chat about some more philisophical/architectural questions? (Im in Lounge 1)

cosmic apex
#

Has anyone tried to implement discord into their game for voice/chat ?

still barn
#

@cosmic apex, I thought about discord implementation which could be simple as a Web Browser UMG Widget. Do you have any other ideas on its implementation?

cosmic apex
#

I bet that would be a very nice selling marketplace feature

#

I'm thinking discord for m y game would automatically create 3 private voice channels per match, 1 for each team and 1 for global and then 3 for messages

#

and then private lobby chats when you are waiting to join a game

rare cloud
#

Well I'm currently using 4.14 and SetActorRotation is replicated to all clients except owner

#

I created a Third person project with a simple event

#

using 4.15 and I have the same problem, my character rotation isn't update from the owning client

untold cipher
#

Is there an open source or free alternative to Oodle for network and data compression?

still barn
#

@cosmic apex thanks for the link. Ill have to review the docs. IMO its a great chat option and I would integrate it into my game's chat system as an additional feature set. Can you elaborate on what you mean by 'very nice selling marketplace feature'?

cosmic apex
#

@still barn Yea basically a discord plugin, thats very easy to swap out all the settings with, well documentated and has a hud widget to drop into your game for pulling information like avatar, username, text, etc

#

basically a chat box that uses discord instead

#

and the overlay feature for in game

still barn
#

@cosmic apex. It sounds like a quick solution for powerful features. Are you working on this?

#

Can someone point me to a decent Blueprints Tutorial for dealing with Replication for Character Customization/ Attaching Items to Player Characters? The goal is thee fold. 1) I want players to be able to customize their pawn and those changes are replicated to clients. 2) I want two more players to be able to make changes (attach items, swap materials) to a Entity, and those changes are replicated to all clients. 3) Player makes personal changes that are only seen by the owning client.

I can handle #3 but 1 & 2 is driving me insane to get working properly. I've referenced eXi's Network Compendium, which has been helpful, but i have yet to see a tut on a network character customization. I'm using several types of networked construction systems, i anticipate each using the same attachment replication processes. The solution to this will solve all my worlds problems. I truly appreciate your recommendations

cosmic apex
#

No, i'm just exploring all the options of voice chat/ text in game chat at the moment and thought discord would be ideal solution

still barn
#

@cosmic apex, I considered a IRC solution from the start and discord is very nice. I'm going to dig deep into the gamebridge, when I start implementing a chat solution. Im integrating text based dialog, bot commands, scripting etc into the chat interface as well for unified text interface.

thin stratus
#

afaik, someone tried to get that SDK before

#

And they denied him

#

No idea what they actually want

mild tapir
#

first image is server, second is client

#

nothing happens on servers for openrep.

#

(when client calls it)

brittle sinew
#

If you're trying to call the RPC on the door, you won't be able to call it from the client

#

Server RPCs can only be called on owned objects, like the little text says

mild tapir
#

wouldn't the client own everything locally viewable ?

#

or am I totally getting this wrong

brittle sinew
#

No, the only thing that the client really owns by default is the PlayerController, and indirectly the pawn

mild tapir
#

ah, righto.

#

that's why I can do these rpc's on the pawn >.>

#

that was all making so much sense making those, so how do I run one on something I don't own ?

brittle sinew
#

Yep, that would be the reason 😄 , it is slightly annoying but it lets the client affect things it owns

#

You would have to run the initial RPC call on something you own

#

For example, the PlayerController. Once you're on the server though, you can do whatever you want

mild tapir
#

oh, so I'd be actually replicating that I'm pressing the use button, but not what I'm using

brittle sinew
#

Yep, that's pretty much the workflow you have to take when calling server RPCs

mild tapir
#

all good then.

#

boss wanted multiplayer stuff to go in, this has been a year long project

#

xD

#

didn't ask for it until recently.

still barn
#

Hi Litruv, just curious, any character customization or attachment of items that must be replicated to clients?

vital steeple
#

eh so the shooter example is c++. 😦

#

whats the proper way to possess pawns to recieve input in a MP game?

#

via BP

hollow hatch
#

Is there anything extra needed to be done to make a custom uobject subobject replicatable? (other than overriding IsSupportedForNetworking)

#

i've done so and my property isn't being replicated

#

and it's sitting right next to a AActor reference that is replicating fine

fossil silo
#

Did anything in 4.15 change how networking should work? I had my spawning & possessing working fine, then upgraded to 4.15 and now its not working at all

rare cloud
#

@hollow hatch, you need to create a function like "ReplicateSubobject" on your UObject and call it from your actor

dusky skiff
#

Howdy y'all - my player actors keep getting rocketed in to space when they run in to each other, any ideas for mitigating this? They're using a slightly smaller capsule than usual but other than that they're pretty vanilla

untold cipher
#

Is there an open source or free alternative to Oodle for network and data compression?

hollow hatch
#

thanks @rare cloud I'll check that out

thorn merlin
#

@untold cipher let me know if you find one, I got a quote for Oodle and it knocked my socks off

#

@dusky skiff are your character holding static meshes? if so, are their collisions set to block all? (thats what happened to me once, they'd swing rifles into other actors and send them flying)

untold cipher
#

Ya @thorn merlin . I was worried to ask them.

cosmic apex
#

Anybody have a guide on how to make a proper inventory system for multiplayer?

still barn
#

@cosmic apex, Are you referring to a shared inventory between multiple players? or using an inventory to equip (attach) items to player pawn and replicating that attachment to clients? I believe both requires the same mechanism to work as a character customization replication. Heres an answer from hulken from #survival-template

hulken - Yesterday at 8:29 AM
I don't have time to work on tutorials for something like that, but in short what I did was, make an array in the game instance with all custom meshes the characters could use, then make a widget to browse between those meshes and apply them to a preview pawn in the main menu map. when changes were made to the character choises I used that to store the settings in a SaveGame instance which in turn was loaded in the player controller when the game started. Then it sends that to the PlayerState with a RepNotify that triggers a server event to set the selected character mesh on the server (and all clients), that event also triggers an update mesh event on the pawn
for more advanced "character customization" like bigger boots, you need a skeleton with boob bones, then all you do is make a bone transform in the animation blueprint with the characters values

cosmic apex
#

Thats techlord, that seems like it makes sense. Hopefully i can make it happen. I want to make a system sort of like Destiny, swap guns out of a vault, swap body parts, "shaders"

#

thanks techlord*

still barn
#

@cosmic apex, multiplayer customization is vital to my game designs. I'm essentially applying customization to all entities in the game, for use by game designers to prefab entities, for use use by game admins to create quest, for use by game players to customize characters, weapons, vehicles. I would expect all construction systems to attach/swap parts, swap/adjust materials, etc using the same method.

twin juniper
#

shooter example seems to have alot of security flaws in weapon system?

fossil spoke
#

Its not meant to be an AAA game example with perfect secuurity lol. Its just meant to be an example of C++ systems in place

vocal ingot
#

If I put something on PlayerState class, will that automatically be replicated?

rare cloud
#

@vocal ingot, no, are you using C++ or BP ?

vocal ingot
#

Blueprint right now

rare cloud
#

ok set is as replicated and now it will be replicated

#

also don't forget to set a specifier like OwnerOnly, to avoid to replicate something other don't need 😃

vocal ingot
#

even from clients?

#

I heard replication only works from server to clients

#

not from clients to server

rare cloud
#

@vocal ingot, what you want to replicate ?

vocal ingot
#

Team Id

rare cloud
#

I guess you have an UI to select your Team and others options before start a game ?

#

@vocal ingot, if you have more than 2 teams, create an Enum, else a bool is nice

#

create a struct to store all informations player select and send it to the server through an RPC

#

ideally check player input to be sure informations are valid like set player to an already full team or whatever hack

thin stratus
#

@vocal ingot @rare cloud A good example for the Conditions, like OwnerOnly, is WeaponAmmo.
A WeaponActor is most likely replicated. So everyone has an instance to see the weapon.
Setting Ammo on that Weapon to replicate would allow everyone to see the current Ammo of that Player's Weapon.
Setting it to OwnerOnly would make sure the correct Ammo is only replicated to the Player and the other clients will only see the default base value.

#

So if your TeamID should be visible to everyone, then you don't need the conditions

rare cloud
#

yup

night jay
#

Anyone managed to get network profiler to work with STeam

#

Game crashes once someone joins with that on

mellow cipher
#

Anyone here know much about steam dedicated servers?

mellow cipher
#

Dw I figured it out

native axle
#

Has anyone tried out SpatialOS?

gilded eagle
#

Hey, I'm trying to create an overheating mechanic. I've got it so that it replicates on a dedicated server, so clients can't fire when they shouldn't be able to, but it doesn't work on a listen server. The server player is able to fire constantly. Can anybody point me towards a solution?

rare cloud
#

@native axle, I will try soon

#

@gilded eagle, you use BP or C++ ? I guess you simply need to replicate a float variable

gilded eagle
#

BP. I've had every variable set to Replicate, but it won't work for a listen server.

rare cloud
#

hmm you can only change it server side

#

if you change it client side, it will be override by server

gilded eagle
#

As far as I can tell, the overheating code isn't even being ran on the server, just the clients.

rare cloud
#

well you need to replicate with an RPC when the player press the input and release it

native axle
#

@rare cloud Yea it looks really nice, been thinking about making a semi-open world game with lots of small servers and some hacky stuff. But this would make it so much easier.

rare cloud
#

@native axle, yup I'm waiting pricing too 😛

#

I will try to join the Innovation program

native axle
#

@rare cloud Oh so we can't test it without entering this program?

rare cloud
#

we can test it already

#

but innovation program really help once you release your game, for pricing and support

#

but yeah one of the advantage of SpatialOS, you can create a small instance and start to dev for free

native axle
#

ah I see

#

I might try it out later this week then

rare cloud
#

I hope later we don't need to patch the engine it's a bit boring 😛

native axle
#

Yea I was looking at that earlier, seems like a quite long process to get it up and running. Hopefully woth it though 😛

jolly siren
#

anyone else seeing steam voip breaking on RestartGame?

#

i.e. on seamless travel

rare cloud
#

@jolly siren, I have no experience with steam voip, but I guess its instance it build from a core object of Unreal (eg. UWorld), and RestartGame will destroy and rebuild clean one

jolly siren
#

I know the voip will stop while it's travelling. But it doesn't work after travel. So voip works for the first match and then doesn't for any other matches that are started via a restart.

jolly siren
#

NumOpenPublicConnections is also always returning 0 now in 4.15

twin juniper
#

Hey, I'm having some issues trying to send a decent amount of information to all connected clientes using a NetMulticast function. Whenever the TArray containing the information gets above ~50ish for a decent amount of time the replication on the client stops working and it starts spitting out this error message:
"LogNetPlayerMovement:Warning: CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)"

I'm sending an array with a varying size between 0-50 once ever 16th of a second where every entry has the size of about 28 bytes which to me doesn't feel like all that much.

Would appritiate some light upon this issue or maby some form of workaround 😃

twin juniper
#

hey

#

If I call a Client function inside of a Server function

#

is is being called on the server or the client?

loud sage
#

I think on the client, but I'd need someone to confirm that.

brittle sinew
#

Yeah, it gets executed on the owning client

#

That's kind of the point of a client RPC: to be called from the server 😛

loud sage
#

So some questions that I have regarding UE4 multiplayer, how hard is it to do complete server side verification of every move a user makes, including stuff like database checking etc. How resource intensive is the default ue4 server? And are there any alternative (more customizable / non ue4-specific) frameworks/platforms available? Thanks in advance!

brittle sinew
#

Hmm, that's quite a loaded question, haha. To be honest with you, I'm not sure of a great resource on that that has already done testing on it, especially around a real game situation

#

IMO it's best to really look at what moves need verification, and past that do what you can with less info

loud sage
#

Yeah sorry, I have been looking into multiplayer a lot and considering my options 😛

#

Well emagine a casual game, like a turn-based game. They have barely any data, but pretty much all of the actions require verification (or the player can cheat)

brittle sinew
#

Oh, I thought you meant something like you would be checking 10s of times per second, like movement or something

#

You definitely wouldn't want to do a DB lookup on every single move, you should try to cache as much as possible most likely

#

Unless it's at a point where the checks are pretty infrequent

loud sage
#

True, I won't be interfacing with DB's every time, but pretty frequently

brittle sinew
#

You know what I'll say next haha, that UE4 is probably overkill for something like that. Maybe it has some truth, but I also see value in using it just as a learning tool. Still though, you would have to really look at the limitations

loud sage
#

Hm, I guess I'll do some testing then 😃 I was just hoping I could avoid it as I hate waiting for builds to complete when testing 😛

twin juniper
#

heh

#

@brittle sinew hey so do you know how this works? Server -> Calling a cllient function

#

where is it called?

#

Server or client

#

im assuming client

#

but i want to verify

brittle sinew
#

I responded up there, client

twin juniper
#

oh

#

ok so i was right

twin juniper
#

@brittle sinew do you happen to know why im unable to get a client's Transform and spawn an actor on the server from that transform

#

like, the player needs to be able to decide where they place the building stuff

#

but for some reason when i spawn it from the server and get the structures transform

#

its returing a ZeroVector

brittle sinew
#

What does your flow look like?

twin juniper
#

Server -> Sets the Actor Class to be later spawned on server -> Client spawns the actor, and there is a variable held to the "CurrentStructure" on the clients character. Structure is spawned on the client and the structure actor is given the characters camera (for moving to infront of the player) , its also given a reference to the player and my item index. on the actor (the structure) its replicated and it does a linetrace to the ground so it snaps to the ground, then it calls my Server_Replicate_Transform() function which all it does is get the local actor transform and set it. (Basically Replicated_transform = GetActorTransform();) then when the player left clicks, it checks if you are placing and if the object is obstructed, and then calls Server_spawn_Structure(), it spawns with the Local "CurrentStructure" variable and gets the replicated transform which is set from the structure itself

#

does that make sense lol

#

@brittle sinew

brittle sinew
#

Where is your Server_Replicate_Transform function located?

twin juniper
#

it is on the replicated actor (the structure)

#

that was spawned by the client

brittle sinew
#

If it's spawned on the client, it's not replicated

twin juniper
#

but would that mean

#

nothing is replicated tho

#

like... would it not replicate the single variable?

#

because thats all i need is that FTransform

#

lol

#

i dont think it nees to be replicated to set a replicated variable

#

but idk tho

brittle sinew
#

No, the client has no authority to spawn replicated actors in the world, it'll just spawn it locally

#

What would you call the function on on the server, if the actor gets created on the client and is local to it?

twin juniper
#

so should i be holding the FTransform somewhere else then?

#

like on the Character

#

yea that makes sense

#

so basically what u are syaing

#

is that my Server_rep_transform() function

#

needs to be on something else

#

like the Character

#

or the controller?

brittle sinew
#

I would put it on the controller yeah, but that's what you should probably be doing

twin juniper
#

it needs to be on something that is already replicated

brittle sinew
#

Additionally, something you own

twin juniper
#

ok

#

that makes sense

#

ill try it out

twin juniper
#

ok the worked @brittle sinew I still have problems but i think i got these

twin juniper
#

@brittle sinew got another replication issue... I have a bool which I set that decides whether or not to change a material on overlap... yet its' always returning false on the client, i did a print test from the server and the server is setting it to "true" which is what i want

#

See

sterile pebble
#

@twin juniper did you mark this variable with Replicated?

#

@twin juniper and add it in doreplication macro?

twin juniper
#

ok

#

i forgot dorep

#

thats probably

#

why

#

lolol

sterile pebble
#

yeah, that thing is reason of troubles in 99%...

twin juniper
#

xD

#

Its so easy to forget

#

yepp

#

that fixed it

#

thanks for the reminder!

sterile pebble
#

last time I spent half of the day because of that thing ))

twin juniper
#

rofl

#

that sucks

jolly siren
#

@rough iron have you seen steam voip stop working after seamless travel?

rough iron
#

Only if something happened to the session

#

Like some client called end session for example

#

Then voip, leaderboards etc are shutdown

twin juniper
#

Is it bad to have just one massive map in multiplayer

#

lol

#

DrawDebugSphere doesnt show up on clients?

brittle sinew
#

Do you mean on a multicast? It's not a replicated function by default

twin juniper
#

yea

#

I got it now though

fierce birch
#

anyone here asked Valve if it's ok to use VPN to test gameplay between countries?

#

I know their terms tell you can't hide your residence with proxies etc

#

and I know that they deny all use like that because they don't want people to bypass geolocked content or pricing

sharp obsidian
#

Does anyone know how to replicate a render target? I'm trying to display a client's camera view to another client. It works when simulating multiplayer on one machine, but it dosen't work over the network. I'm replicating the scene capture component and running the games from the editor using -game

rough iron
#

You will have to send the data yourself, I would try to implement any well known video streaming protocol

sharp obsidian
#

@rough iron Thanks, I was hoping it would be easier than that. I think I'll try moving the scene capture component to the client that needs the render target and just update the capture components transform to match the transform of the other player's camera. That removes the need to stream a hefty texture and the other pawn's camera transforms are easily replicated.

rough iron
#

Way better, always try to simulate when you do networked gameplay

night jay
#

You could have your client directly look through the camera of the other client maybe

#

@fierce birch you can set your Steam download location to be the same for everyone to play with different countries. I'm from Europe and set my DL location to US-NY because that's where the host is located

#

Also anyone know how to do a cheap scoreboard? Currently I have to send the playerstate info of all players to each client and have that info go through some UMG logic to display on the scoreboard and the server load is going up exponentially with more players in the game

#

Is the client always updated on player states?

worn nymph
#

Hi guys I am using dedicated server . All my data for the game is stored externally and then loaded in or saved out as needed but just wondering where the best place to keep everything is during actual play. All the documentations and threads say different things . So for example profile stats like experience points username etc i load them in from the external database then use these to create the players profile widget but where should I store them ?? On character bp, in player controller. In playerstate? Then what about let's say all the items for the in game shop . Finally what about all the game rules and stats etc like number of kills number of deaths things like that . A lot of the stuff will need ti be shared information between players and various widgets and then a lot of it is just personal to the individual player/profile Thanks . So this is how my structure works . Player logs in I load all his stats personal information etc and display it in various widgets . Then I press play it puts me into matchmaking session if a game is found I then disconnect from that server and transfer to game server inside game server the only stats I need are the ones made during the actual match . Game ends I save all the stats back to each individual profile they rejoin lobby server where I then reload the profile and all stats including the new changes from the last match . Thanks

slim holly
#

playerstate for individual data, GameInstance on server could store data between map changes, but storing it to savegame isn't bad option either

#

rules by gamemode(however, it only exists on server)

#

and all-n-all, see pinned messages. Network Compendium is really good place to start

fierce birch
#

@night jay I'm aware of that, but it doesn't make the network connection to route through that country

#

which would be nice way to test actual routing in worse case scenarios (you get double ping in that case)

#

I'm also aware of that you can virtually generate lag and async, loss for packets in ue4 (and by using clumsy etc) but I'd want to have real life data too

night jay
#

@fierce birch double ping?

fierce birch
#

well, if I connect to another country via VPN, I get the roundtrip time twice

#

basically the VPN machine has to communicate through the VPN server in that country before it communicates with my other computer that's not connected there through VPN

night jay
#

If you want VPN though you might not need steam

#

If you have a virtual LAN network you can use OSSNull

#

May I ask what platform you use for the VPN

#

We want to make use of one too because network profiling doesn't work with Steam

fierce birch
#

yeah, I know I can make a direct IP connection too

#

but would really prefer to test it on target platform

#

anyway, I'll probably just ask Valve if they are cool about that

#

so, targeting steam

wise depot
#

guys
if I replicate a struct, do I then have to replicate its members?
and if so what about the lifetimeProps function for them?

jolly siren
#

@wise depot UPROPERTY members in a struct are automatically replicated if the struct is replicated

#

if you don't want to rep something in a struct, don't make it a uproperty

wise depot
#

thanks 😃

jolly siren
#

np

rare cloud
#

to complete the reply of @jolly siren, you can use UPROPERTY if you need for reflection or whatever @wise depot, but you need to add NotReplicated to your UPROPERTY()

jolly siren
#

right, good addition to my comment

wise depot
#

okay so I have a struct that just isn't replicating correctly and I don't understand why

#

how does the engine check for it changing? is that server side check for change or client side?

#

because I have 2 structs, one works, the other doesn't, both are marked as replicatedUsing = OnRep_Function

with 2 different functions

#

and i can see the values in both structs changing server side however only one of the two is calling its onRep function

#

both are in the DOREPLIFETIME function

summer rivet
#

Is there a way to spawn/place at design time a blueprint that is only on the server? I have a monster spawner BP that spawns monsters (lol). The spawning act itself gets them on the server/client so that is the desired effect but it seems silly to have the actual BP for the spawner on the clients side when they do nothing for them. Right now I place them at design time in the editor. Basically is there an easy way to make these Blueprints server side only?

jolly siren
#

@wise depot what does the struct look like?

#

@summer rivet what do you mean by "place them at creation time"?

#

@rough iron no, I'm not ending any sessions. I'm just calling RestartGame on the server with seamless travel. And after restart voip isn't working.

summer rivet
#

I drop the monster spawner BP's into the editor at design time

lilac tartan
#

There is a Net Load on Client checkbox in the Replication Section of an Actor

jolly siren
#

Net Load On Client

#

yeah that

#

it's in the bp

summer rivet
#

what does that do?

jolly siren
#

doesn't load it on the client during map load

#

so what you want

summer rivet
#

that's a weird name...

jolly siren
#

seems decent to me

#

@rough iron is there someway to restart voip?

summer rivet
#

ok well cool I will have to check that out when I get home. Thanks for the help 😃

wise depot
#

ah nvm I got it working

#

was a rookie mistake -.-

jolly siren
#

okay cool

rough iron
#

@jolly siren start/join again, first check if the session gets ended when you restart (I think it might)

jolly siren
#

get's ended and then restarted again?

#

I played like 10 games in a row 3v3. Wouldn't the game die if the session was gone?

rough iron
#

Only some steam stuff such as stats or voip

#

Stats will get flushed on EndSession

#

Check your logs

jolly siren
#

oh I see, I'm not using steam stats, I have my own system. But voip dies after the first RestartGame. So that must be it.

#

I don't see where shootergame is rejoining the session

rough iron
#

It's just a StartSession call

#

All clients should be in the session already

#

Normally it should be called after a travel, who knows might be a bug?

jolly siren
#

ShooterGame is calling StartSession from ClientStartOnlineGame only. Which is only called from PostLogin

#

so they aren't calling it from a seamless travel

rough iron
#

But if they hard travel it will get called

#

I think they are not using seamless travel

#

It's just a versus game

jolly siren
#

they do use seamless

rough iron
#

Sure?

#

Mhhh

#

EndSession should log atleast

jolly siren
#

yeah, I wish the code was on github

rough iron
#

XD

#

I would not use ShooterGame as an example

jolly siren
#

hehe really?

rough iron
#

XD

#

Try to call StartOnlineGame after a travel

#

There is a initialization function that is called in postLogin and in postSeamlessTravelPlayer

jolly siren
#

right, yeah I'm using that the GenericPlayerInitialization

#

I will try that

jolly siren
#

it looks like EndMatch ends the session

rough iron
#

Yep

twin juniper
#

EndMatch() ends a session

#

but if ur trying to end a server i think its

#

UnregisterServer()

#

in AGameMode

jolly siren
#

yeah I'm just ending the current game and then restarting it. so EndMatch() and RestartGame(). So I'll need to call StartSession again at some point

twin juniper
#

I think RestartGame() calls that

#

but i might be wrong

vocal ingot
#

ExactPing in PlayerState not exposed in blueprints?
in UE4

brittle sinew
#

Correct, not a ton you can do about it, the regular ping is exposed however

#

If you really want to make a getter in your C++ version you could though

#

That is, if you have one

#

@vocal ingot

boreal merlin
#

What happens if you call start session if you are already inside of a session. Or clearing the same online sessions delegate handle multiple times without assigning anything new to it between calls.

#

I'm asking because I am trying to get some logging in place so I can organize my code better. Currently I have multiple "StartSession" and ClearOn"Start/End"SessionCompleteDelegate_Handles and my game works but its messy so I want to clean it up.

twin juniper
#

is GetWorldTimerManager() not accessible by the client

#

and if not how can a client set a timer

wary willow
#

How was that "Replication" stream last week?

sterile silo
#

is it possible to play cutscenes / sequencers in a multiplayer game?

wary willow
#

@native axle @rare cloud @loud sage you guys having any fun with SpatialOS? Any big hurdles setting it up at first? Easy to implement anything afterwards?

rare cloud
#

@wary willow, I didn't test it yet but I already read the doc and seem not that complex to setup, it's only boring to wait to download and compile stuff

dusty sleet
#

anyone know why, when I spawn an certain actor (or place it in the level manually) for the server its in the proper spot, but for the client its like 200 feet to the left and up in the air... but when the client hits it in its proper space it moves in both views. Only the server is seeing it correctly though. and the client can see it move fine in the distance but its invisible in its real location

#

nvm... apparently setting a component to replicates inside an actor that is set to replicate causes it... no idea why but having just the actor replicate but not components seems to work

loud sage
#

@wary willow Not tried it in ue4 yet, but I heard from someone else their ue4 support is picking up 😃

mellow cipher
#

Has anyone here used steam with unreal? Im trying to setup dedicated servers but the name of the id of the server keeps changing

#

Anyone know why?

twin juniper
#

Does anyone know if you can replicate drawn debugging lines of widget interaction components?

twin juniper
#

Nobody? hmm So maybe building a spline and the replicating the spline might be better?

warm wolf
#

It is said that most computations are run on both client and server (unless they are not relevant for client). It is also said that even singleplayer (NM_Standalone) games have a server. So, does this mean that singleplayer games run most computations twice?

thin stratus
#

No

#

A Singleplayer game can kinda be seen as a ListenServer without any clients connected.
But he isn't really a "Listen" server, as he won't listen to any incoming connection. It's singleplayer after all.
Computations are only run once on a singleplayer game

#

@twin juniper You can multicast and run DrawDebugLine with passed parameters

#

Is there something special about the widget interaction that this is important to mention? I didn't use that yet

#

@mellow cipher Where do you set the ServerName?

#

@boreal merlin It will probably tell you that it can't start a session that is already in progress

#

StartSession is called by default when a Map Starts

#

Singleplayer games often will find the message "Can't start a Session that hasn't been created."

#

Cause the GameMode/GameSession etc are calling that every time you open a new map

#

@vocal ingot @brittle sinew The ping of the PlayerState is divided by 4, or?

#

is that what you mean with exact?

twin juniper
#

@thin stratus my boss asked if this is possible but currently I don't know "how". So I wanted to ask if this is possible. In our mp-experience we want each player to see what the other vr players are currently looking at with their controllers. So I use a widget interaction component to scan for widgets and draw the debug line and it would be great if I could just replicate that line without creating a spline

thin stratus
#

DebugLine is nothing you want for actual visualization

#

I'm not even sure if it's surviving the final shipping build

#

Just make a thin mesh with a 100 unit in X direction

#

Calculate distance between the position of the controller and the target

#

And rescale the mesh

twin juniper
#

Well it's not the small DebugLine you get from LineTraces, so it's a bit bigger and better to see

thin stratus
#

Debug lines in general aren't surviving if you are unlucky

#

they are also not that good for performance

#

Just swap it with the mesh

twin juniper
#

hmm yeah, scaling and rotating a cylinder might be the best choice

thin stratus
#

And I mean

#

you probably have the controller already replicated

#

So you don't need to replicate the mesh/line

twin juniper
#

yes I manually replicated the controllers so they work for rift and vive

thin stratus
#

Each client can handle that himself

#

If we are both clients and I can see your controllers moving, then I don't need replicated data about the line that is on them

#

I can just take the replicated controller position and draw the line myself

twin juniper
#

true

#

I replicate the location and the rotation so that is enough to create that line

thin stratus
#

Yes, i mean at least as long as you have the end point on the clients too

#

But that should be the same line trace

#

with the same settings as the actual user

#

as soon as you have visuals that need to be on the client, try to check first if you can simulate them on the clients

#

Without the need of the server

twin juniper
#

the end point would be the end of the line trace where the controller is facing already so I don't need to tweak that

vocal ingot
#

@thin stratus I don't know what exactping is

thin stratus
#

Yeah, the exposed ping is rounded

#

But for what do you need the exact one?

#

If you have any C++ skills, you could utilize this:

/**
 * Receives ping updates for the client (both clientside and serverside), from the net driver
 * NOTE: This updates much more frequently clientside, thus the clientside ping will often be different to what the server displays
 */
virtual void UpdatePing(float InPing);
#

Cause the exact one isn't replicated at all

#

But if you only need it on the Server, then you can also create the getter that Lethal told you

native axle
#

@wary willow Haven't got a chance to test it out yet, too busy with uni 😦

night jay
#

If I join someone's server but it isn't a listen server, the client won't load the map but can I still have access to the playerstates of all the clients in that server?

#

and vice versa

vocal ingot
#

@thin stratus I am just curious. In what way would you need ExactPing instead of Ping?

wise depot
#

clients, ExactPing is a much better representation of your ping than Ping is IMO

#

also Ping is a uint8

Which is ExactPing * 0.25

#

being uint8 means its maximum value can be 255

#

therefore, the maximum ping that Ping can actually support is 1020. As soon as your ExactPing is over 1020 (which some games may support like Civ) you will have overflow issues

#

Also, ExactPing is already a float, so if you're doing latency compensation you get Lateny by ExactPing * 0.5 (because multiplications are cheaper than divisions)

so you could do for instance:

FVector ForceToAdd = (Foward * Velocity) * (ExactPing * 0.5f);

as a 'really' rough example

#

although it would actually be (ExactPing * 0.001) * 0.5

as ExactPing is in MS not S

#

@vocal ingot

vocal ingot
#

Ok, thanks!

languid plume
#

Hey guys, is there a way to restrict which blueprints get loaded into a dedicated server?

Currently, I have a combat system that spawns certain blueprint actors at runtime. I.e. a player does an attack, which spawns a burning effect that is attached to an enemy character for a certain amount of time. Right now I have like 100 blueprint objects, but players will only have 5 of these available per character.

How can I tell the server to only load the selected blueprints, to reduce load time and add security?

brittle sinew
#

Usually you'll want to use a TAssetPtr for something like that. Not sure what your point about security is really, as this will still load it when requested, but it should alleviate initial loading times

#

If you're in BP however, I'm not too sure.

languid plume
#

Well basically I want to avoid players trying to spawn Actors that theoretically could not even exist

#

Right now I have a list of abilites on the server that gets copied to the client, the client does a preemptive check whether or not they can cast the ability and the server checks back on that

#

If the server doesn't even load the asset file (the actor blueprint for that ability) it would add another label of security so that players cannot trick the server into thinking they got all the abilities etc

#

But really it's about load time, since right now I have like 100 abilities even though in a single match players online have ~20 or so total

brittle sinew
#

Yeah, IMO that's not really a reason you would want to use async asset loading, just do checks on the server normally, could get weird trying to spawn assets that don't exist, even if you get it working correctly

languid plume
#

Do you happen to know what happens if the dedicated server has access to blueprints that never get spawned?

#

Do they still take up memory space somehow?

#

Or only if actually used?

#

I'm not really an expert when it comes to that kind of stuff, sadly :/

brittle sinew
#

I'm not 100% sure how it works in BP only. I know in C++, if you load BP classes in via a normal pointer, they will get immediately loaded and take up memory. That's the good thing about TAssetPtr. I don't know if there's a ton of info on deep BP memory management besides the source, which I wouldn't look forward to dig through 😛

languid plume
#

Oh well, since they are all based on a (more or less) empty C++ class I could probably work with that anyway

twin juniper
#

@brittle sinew hey if I run a Server UFUNCTION() to save a file, it will only save the file on the server right?

#

and not on clients

languid plume
#

@brittle sinew Thanks for the tip, I will look into that. 😃

brittle sinew
#

It will save wherever it gets executed

languid plume
#

(TAssetPtr that is)

twin juniper
#

@brittle sinew is there a way I can make it so that I have a dedi server which is the only one to save player data (Like im storing it as json and I want it to only save and load from the server)

#

in the game mode

brittle sinew
#

Not really, you would have to write separate server code for that most likely

#

(not really as in I don't really know)

twin juniper
#

im pretty sure i can just do the saving functionality

#

in a server function

#

and it should only save on the server

#

lol

brittle sinew
#

If it's in the GameMode, it's always on the server no matter what

#

I thought you meant a separate dedicated server

#

Like in contrast to a normal SP/MP listen server type thing

twin juniper
#

oh

#

noo

#

im just saving my data from the GameMode

#

and I worry the files may somehow get saved

#

to the client

#

lolol

#

but idk if thats possible

#

also do you know if its possible to get a player controller via UniqueNetID or their playerstate

rare cloud
#

I would like to know the best way to replicate character rotation

#

when I use SetActorRotation on server side, it's correctly replicated to all client except owning client

#

I read some stuff about CharacterMovementComponent

#

or an FRotator using RepNotify

#

I only want to replicate Yaw

languid vapor
#

Hi. Anyone knows where can I find an updated guide of how to make a dedicated server?

dull stream
#

Has anyone gotten hotswap gamepads to work for local multiplayer? Like Everytime I plug in gamepad during runtime it doesn't work

#

And I do spawn player when new gamepad is detected btw

#

Input just breaks for some reason...

desert breach
#

@dull stream where you have kept your input code?

dull stream
#

Controller

#

All the input events are in controller blueprint

desert breach
#

@rare cloud use a replicating variable and set it on server. As it will update from the client

dull stream
#

It works when gamepads are plugged in BEFORE game starts btw

#

Then I can unplug and do whatever. Works fine. Just when I don't plug them in beforehand it breaks.

#

Is there something in the engine I gotta set beforehand to let it know, okay there can be 4 gamepads

rare cloud
#

@desert breach, yeah I'm just curious if there is already a built in replicated variable, thanks 😄

dull stream
#

Anyone have info on my problem?

#

Is it something I broke or something I'm forgetting to do, etc. Tips?

dull stream
#

I got it, no worries

twin juniper
#

hey

#

how do i connect to a steam server

#

i cant type open ip_here

#

what do i have to type in the console

#

to connect

wary willow
#

@twin juniper What do you mean by Steam server?

twin juniper
#

Like I registered my server

#

hold up

wary willow
#

K, (where at exactly?)

twin juniper
#

in Registerserver()

wary willow
#

Is this a dedicated server?

twin juniper
#

yes

#

im going to run it on my laptop to test stuff out

#

i just want to be able to connect to it with my friend so we can see if its all working as intended

#
void AVeritexGameSession::RegisterServer()
{
    Super::RegisterServer();
    //SessionName = "Veritex 1";

    IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
    if (OnlineSub)
    {
        IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
        //Sessions->GameServerName = FString("VeritexServer1");
        
        if (Sessions.IsValid())
        {
            AVeritexGameMode* VeritexGameMode = Cast<AVeritexGameMode>(GetWorld()->GetAuthGameMode());
            if (VeritexGameMode)
            {
                FOnlineSessionSettings Settings;
                Settings.NumPublicConnections = MaxPlayers;
                Settings.bShouldAdvertise = true;
                Settings.bAllowJoinInProgress = true;
                Settings.bIsLANMatch = false;
                Settings.bUsesPresence = false;
                Settings.bAllowJoinViaPresence = true;
                Settings.bIsDedicated = true;
                Sessions->CreateSession(0, GameSessionName, Settings);


                /*HostSettings = MakeShareable(new FOnlineSessionSettings(false, false, MaxPlayers));
                HostSettings->Set(SETTING_GAMEMODE, FString(*VeritexGameMode->GetName()), EOnlineDataAdvertisementType::ViaOnlineService);
                HostSettings->Set(SETTING_MAPNAME, GetWorld()->GetMapName(), EOnlineDataAdvertisementType::ViaOnlineService);
                HostSettings->bUsesPresence = false;
                HostSettings->bIsLANMatch = false;
                HostSettings->bIsDedicated = true;
                HostSettings->bShouldAdvertise = true;
                HostSettings->bAllowJoinInProgress = true;
                HostSettings->NumPublicConnections = MaxPlayers;
                Sessions->CreateSession(0, GameSessionName, *HostSettings);*/
            }
        }
    }

}

#

this is my RegisterServer() function btw

#

I just need to know if I can still use console: open ip_here

wary willow
#

I haven't done Dedicated & Steam before, but you may be looking for this:

open steam.ServerSteamID(long number):PORT
#

If you are still having any issues, you should check out ShooterGame

twin juniper
#

@wary willow what is the serverSteamID

#

lol

#

also, shootergame has steam built in?

wary willow
#

No idea, remember I've never done Dedi/Steam, only dedi by itself and steam regular listen server

#

And yes it does

#

That's like the "best available source"

#

for C++ networking

twin juniper
#

yea

#

even though its all in slate

#

for the UI

#

lol

#

so i dont even know where to look xd

wary willow
#

You look for AShooterGameSession

#

Start there

twin juniper
#

@wary willow do you know if it's possible to mix-match BPs and C++? It's a lot easier to use the BP node "FindSessions" than it is to use the c++ equivlant

#

im just curious if you can mix-match them

#

lol

wary willow
#

The only thing I know is that for dedicated servers is was only possible in C++ before

#

When doing it on Steam

#

There is a plugin I am looking for

#

To help you out

#

I know I've seen it before

#

not a plugin, but this is something I had been following

#

ah, you're already on there

twin juniper
#

yea

#

I just havent gotten that to work lol

#

because my partner is using the pre-compiled engine

#

and im using the source

wary willow
twin juniper
#

so we cant rly do that

#

lol

#

yea i already got it setup

#

i just dont know if open 127.0.0.1

#

will work or not

#

it works on local

#

but idk about steam

wary willow
#

you haven't tried?

twin juniper
#

uhm

#

Not yet

#

compiling the enigine

#

lol

#

i mean server*

wary willow
#

@twin juniper Advanced Sessions?

boreal merlin
#

@thin stratus you were right, it said cant start a session thats already in progress and cant destroy a null game session thanks.

#

Am I missing out on anything important if I don't call OnCreatePresenceSessionComplete().Broadcast(SessionName, bWasSuccessful);

#

I took it out momentarily but everything appears to still be working.

balmy plaza
#

Anyone here use Photon's Server backend? I'm curious as to other's experiences with it. (Please do tag me, as my status is misleading, and I am not currently "online")

cursive herald
#

@balmy plaza I poked at them a bit but never anything full. Mainly ended up dealing with in-house solutions. My recommendation for any middle-ware vender is to ask yourself what happens if tomorrow their company died or they blacklisted us or something. That said photon looks fairly good for the features they deliver. If they meet your needs there isn't anything stopping you from trialing them right?

#

Using them would limit your platforms as well it looks like.

#

What feature set do you need?

balmy plaza
#

We were just trying to find something that could easily do some RPC and replicate it to two clients at a time. We don't need something permanent, but rather just looking for a quick solution to build a prototype off of, to see if the concept works. We can't test the concept without having the ability to replicate it, and the company thinks it best not to use the UE4 solution. I personally don't see anything wrong with it, aside from the 10 yr. old SSL. @Mr.Fishy (Brune)#9850 (Thanks for the reply, sorry mine was so late.)

cursive herald
#

why not a listen server?

#

@balmy plaza There are a lot of choices you can do. I mean for a quick solution a listen server is easy to setup which is client based not server based. But then you have host advantage.

#

If you are looking for a quick and easy dedicated server system then honestly photon might do just that.

#

but the question of SSL is what data are you protecting? 10 year old SSL isn't cool.

#

but if its just like player names then why?

desert breach
#

@dull stream You should check the call back of function which triggers, when you connect the gamepad in between. What is happening is your game looks for game controller in the start. And set the input controllers accordingly, it doesn't do that check in the middle of the game

dull stream
#

Its fine @fieol#4977 I already fixed it earlier today

#

I had to go into input interface, basically, and check when gamepads were getting connected and create the player after the gamepad is connected.

#

and also make sure that input was set to game mode or w/e

#

I dont think creating the player before the gamepad is connected initializes it properly idk. I could be wrong about that but it seemed to be the case.

#

I feel like i shouldnt have to write my own function to check for gamepads but eh guess it doesnt matter

#

they should really make a blueprint node and some functions for it. I think theres a function for checking if a gamepad is connected, but not checking for specific gamepads (player 1, 2, 3, etc.) have been connected

desert breach
#

cool

cloud ledge
#

Is there a way to efficiently send one-shot messages in UE4?

#

Like umm

#

I have an array of things, the length is very rarely variable

#

I need to replicate this array at a very controlled rate

#

E.g. replicate it at a rate that depends heavily on a complex rule

#

Previously I've simply called a RPC and passed an array into it, but it seems to carry a lot of overhead? Or maybe it doesn't and the data just ended up big like that?

wise depot
#

@cloud ledge so you're sending huge amounts of data and you want to limit when it does it?

#

is that right?

#

don't have it marked for replication, whatever class it is that replicates it create a timer that triggers an RPC to pass the data along

#

i would also consider writing some compression methods

cloud ledge
#

Yeah, I'm using RPC calls

#

But I was wondering if there was any overhead and if so, any way to reduce it

wise depot
#

well the overhead would be how much data you're sending I guess, if its large amounts then its a bandwith issue

#

in which case the way to reduce would be either send it in chunks or compress it

rare cloud
#

@cloud ledge you can use the Network profiler to check if it's a bandwith issue as @wise depot mentioned

wise depot
#

if you're using steam P2P good luck with that.

#

it doesn't work with 4.14 and steam P2P

rare cloud
#

hmm that's true

wise depot
#

other versions idk, but 4.14(.3), launching the network profiler gives a CTD

rare cloud
#

steam network look like a nightmare

wise depot
#

yup

#

dedicated servers i think it works with

rare cloud
#

I actually never use it but I read so many bad thing about it x)

wise depot
#

nah its really useful tbh

#

steam Relay servers are great for what they do and they're really simple to use. They're just a pain in the ass when you need the profiler

rare cloud
#

I'm currently looking how the rotation and the location are replicated with Character and CMC, to search a way to force the rotation to be replicated

wise depot
#

yeah, in the pawn's blueprint, Replication->ReplicateMovement=true

#

then in the extended options set the rotation ones to whatever you want

rare cloud
#

@wise depot, Replicated and ReplicateMovement are already set to true

wise depot
#

does the pawn have an owner?

#

does the server spawn it?

rare cloud
#

it's a character player

#

well yes server spawn it

wise depot
#

its rotation should be replicated then?

#

Unless you're calling "set rotation" on tick somewhere that is overriding the replication

rare cloud
#

if you use SetActorRotation on server side, other client will see you rotate but owning client see no change

wise depot
#

so then your owning client is doing something that is overriding the server's replication

#

so somewhere you are calling "SetActorRotation"

#

which is forcing it to compeltely ignore its replicated rotation

rare cloud
#

the rotation has a COND_SkipOwner, because CMC use client prediction I guess

#

to avoid replicate something that owner already know

balmy plaza
#

@cursive herald Payments is what we're trying to protect. 😃 Sensitive data like passwords and the like, too. But yeah, quick and easy, and we need to avoid any client based code, the server needs to handle everything mechanical in the server, client's just going to display stuff.

wise depot
#

@rare cloud well remove that condition if you want the owner to recieve it. However if the owner directly uses the servers replicated data then they are controlled by the server

#

therefor all input they use will be delayed by their ping

slim holly
#

so, can you even kill the PIE session?

#

oh this smells like burning

#

Opening map as listen on Gameinstance Init

twin juniper
#

@thin stratus can you build a Server target without the source?

#

I've never tried lol

#

Im assuming not though

thin stratus
#

Nope

twin juniper
#

K

queen ermine
#

Question, say you had to replicate a grid of 64x64 tiles, and each tile could have 25 states associated with it. What would be the best method to handle this?

#

we are doinng it now, but UE4 keeps trying to send every tile state on every tick, creating massive lag

#

is there a way to process the data in chunks or bits, or a method to que the data up so it can process it as it goes?

thin stratus
#

Why do you need to constantly update 64x64 tiles

#

How often do they actually change?

queen ermine
#

well.. good point @thin stratus

#

so say the grid, needed to process the entire 64x64 every time, but needed a method to skip past unchanged tiles, what would you do?

#

some kind of recursive check for the state difference?

thin stratus
#

What is a tile actually

#

An actor?

#

Just a Mesh?

queen ermine
#

an actor

#

that has meshes, and states for the meshes

thin stratus
#

I assume it's set to replicate

queen ermine
#

we are making a grid, each grid spot has a state associated with it

#

is a plant on it, is a plant not on it

thin stratus
#

What keeps you from only changing the data of that one tile, whic hthen replicates the value?

queen ermine
#

has it been blah or has it not been blah (blah means like 10 possible sub states)

#

hm... not sure, i guess we could go through that route

thin stratus
#

Well you have 2 possible things here

#

You could have each Tile being a replicated actor with a replicated state variable

#

let the server change the tiles state variables

#

and then let the tile handle the rest itself

#

OR

#

You have some kind of manager that has a narray of these tiles. That array would need to be in the same order available on the clients

#

Then you can change a tile based on an index

#

And the manager gathers all changed tiles with index and state

queen ermine
#

hm... i think that is how they are doing it

thin stratus
#

and multicasts that

#

Which would be an array of a struct

queen ermine
#

but the issue was the sending the information was too large

thin stratus
#

and that structs holds the connection of index and changed data

#

Well if something changes, you add it to the change array

#

On tick you check if the changearray is empty or not

#

If not, you process all the changes with one RPC and clear the array

queen ermine
#

hm...

thin stratus
#

I would go for the actor solution though

#

As long as it doesn't break anything

queen ermine
#

well i think they didnt want to go with that because of the actor cap or some crap 😛

south flare
#

Yeah before we were sending it all in one replicated TArray, I knew we would need to break it up

queen ermine
#

@south flare is the coder for it, i told him to jump on

south flare
#

I'm with riu

thin stratus
#

Well, you can do both

#

Actors are spawned anyway

#

Making them replicated doesn't hurt as that isn't actually flooding anything until you actually let them replicate something

south flare
#

Right now we just spawn these tile actors loacally

#

Then we have a rpc system that we use to call for state updates

thin stratus
#

Yeah that's the other version. Then you need to make sure that the Server and the Client tiles are indexed

south flare
#

On a managing actor

thin stratus
#

And you gather the changes in an array?

south flare
#

Yep, I'm making a system now where there is a replicated actor for a subsection of the tiles. Each of them will have a replicated array of their own tile states

thin stratus
#

Hm

#

So what exactly was the problem again?

south flare
#

Since before I just put it in as one replicated array. Obviously not optimal

thin stratus
#

I'm not directly talking about a replicated array though

south flare
#

So I'm splitting up tile regions

#

Oh

thin stratus
#

The Array is only contructed on the Server

#

Every time he changes something, you save the change with a new entry into the array

#

And in tick you check if the array is empty. If not, you multicast the update by passing the array

#

Then you clear the array

south flare
#

So you are suggesting a change stack?

thin stratus
#

basically yes

south flare
#

Ok

thin stratus
#

Then you only have one multicast per tick

#

And I doubt that your states change that much

#

I did that with my inventory. If there were a lot of changes, the inventory was constantly pushing multicasts

#

So I gathered all changes and pushed them at once

south flare
#

They dont, I can implement a que system with the current implementation as well

thin stratus
#

Solved issues for me

south flare
#

I do need a way to broadcast to new players joining in the states

#

Which I would use my replicated arrays for

#

Which get replicated based on netculldistance

thin stratus
#

Well that's an issue then with Multicasts. Gotcha

#

Hm

#

An OnRep variable would take care of the joining players

south flare
#

Yeah

thin stratus
#

You can try it with the Array itself, without the multicast. I'm actually not sure how often an array would get replicated if it changes rapidly

south flare
#

Since I subdivide the grid. Based on distance you would just replicate in a certain array instead of the entire thing

thin stratus
#

Might need to set the array with itself to actually get the OnRep to call though

#

Some Array operations don't call the onrep

#

kinda annoying

south flare
#

If you set it with itself it still won't replicate, it does need a value change

thin stratus
#

I mean, you could also NOT use the OnRep, stick with the multicast and simply ask the Server as a new player for the updated grid

south flare
#

That is true

thin stratus
#

or even just let the server push it anyway

#

With a simple OwningClient call on the PlayerController*

south flare
#

Yeah

thin stratus
#

OnPostLogin

south flare
#

Then I can just use all the serverside array data and combine them for save and load purposes

#

Which is good

#

I could also set a repcondition on that array so that it only initially sends all the state's of that subsection to further save bandwidth

slim holly
#

that's odd

#

non-reliable event had 100% failure rate

south flare
#

Non reliable could have been dropped

#

For multiple reasons

slim holly
#

before match has even started, I doubt

#

there was absolutely nothing on replication when it was dropped

south flare
#

Ok

#

Did you try starting up wireshark

#

Setting up a display filter

#

Set to udp.port == 7777

#

Make sure it's not sending

#

Although other things will be sent like world time

#

And other little things

thin stratus
#

What kind of RPC did you try?

slim holly
#

a structure of vector,string,enum and 2 integers

thin stratus
#

Only thing that comes to my mind is the wrong usage of ownership

south flare
#

Did you have uproperty on all strict feilds

thin stratus
#

aka, calling a ServerRPC from Client while not owning the Actor

south flare
#

Struct*

tranquil yoke
#

What is your problem? Sorry, I just arrived

thin stratus
#

non-reliable RPC dropped

slim holly
#

reliably dropped 🙃

tranquil yoke
#

All of them or just a few? cause it's very possible

#

Reliably shouldn't "drop"