#multiplayer

1 messages · Page 305 of 1

twin juniper
#

@wet oriole In you GameMode, there is one "OnLogin" event. It will be called once when the server joins, and then again for every client

wet oriole
#

Thanks I'll check it

#

I'm pretty sure that must be another better way 😀

#

@twin juniper

twin juniper
#

Getting 0 will return the servers player controller

#

You can use game state to call an event as well. Say, when X players have joined, tell gamestate to call event "initiate clients" or similar

wet oriole
#

I make a mistake that branch to check IsServer always return true because this event only call in server ... I must check the new controller to see it's server or client ... Is it possible? @twin juniper

twin juniper
#

@wet oriole You can call an event on the players controller to see if he's server/client, since the playercontroller exist on both server and owning client

wet oriole
#

Yes i did same 😋

sterile pebble
#

How ue4 let us test steam multiplayer without external steam agreement or some sort of pay for steam?

compact oyster
#

if you start the game, it will appear as Spacewar

sterile pebble
#

@compact oyster doest this mean that steam allow developers test steam multiplayer without publishng game in steam?

compact oyster
#

yes

#

it will actually give you the access of steam that you need

#

e.x steam overlay, name, id etc

sterile pebble
#

that suprising

supple musk
#

Hi guys, i'm having a bit of trouble from within a Widget Blueprint.

On my server pops a Start Button ( working ). When I click it, it should disappear and call a multicast showing a text ( "Loading" ) on all my clients. BUT, it only is called on the Server. What am I missing ?

http://puu.sh/tadED/e607cfd88c.jpg

#

Debug messages on screen are "Server : < Who am I ?" and "Server : Hi i'm multicast".

brittle sinew
#

That's because widgets are local only; the widgets that exist on the server aren't the same object that exist on the clients @supple musk

#

In contrast to a normal object like an actor—those exist on both the server and client and are the same object (if it's replicated, of course)

supple musk
#

Thank you @brittle sinew .

So to work around that, should I get the start button press event in my widget C++, call a Multicast RPC on the HUD class which will in turn call the Show Loading Text on the local widget ?

twin juniper
twin juniper
#

It seems to work well once all clients has successfully left session

polar bridge
#

do i have to do anything special to properly host a dedicated session? from the command line if i launch my packaged project with MapName?Listen everything works fine. but if i try to launch it using -server it doesn't listen on port 7777, the log doesn't really say anything

red ledge
#

@Etienne#0067 you need to make the owning player call it, make the host have a a function thaat multicats and makes the other players show the loading screen
you just get the owning client from the widget, cat it, and call the multicast event

subtle sonnet
#

/giphy multicat

#

Aww no giphy? 😦

lavish dagger
#

Anyone got good suggestions for hosting a server? (besides the mainstream ones like AWS or Azure)

polar bridge
#

digital ocean droplet

#

doesn't have the crazy advanced features, but you would never use those with UE4 anyways

rare cloud
#

@hollow bear, did you succeed to communicate through a socket ?

#

(erf don't forget the ')' in the URL)

hollow bear
#

Thanks, I've seen Rama's implementation but I haven't gotten it to work. I can't test it as I can't find something that is easy to use to send a message over TCP. I've never done networking before, even though it is just routing everything to localhost.

fringe dove
#

Is it ok to use AddForce AddImpulse, etc. inside PerformMovement based on a custom movement flag (in mycase whether a jetpack is running)? will it get all the state rewind, server correction, etc.?

#

I see other examples of jetpacks use AddVelocity, and AddForce says it queues all forces until the end of the frame and then combines them

#

didn't know if that (queuing for the end of the frame) conflicts with anything in the way PerformMovement works

thin stratus
#

Hm i don't know how exact you need that, but for my Grappling hooks, networked, i just set the velocity directly, on server and clients

native axle
#

Any tips on doing a dodge roll in multiplayer? I want to run it on the client-side first so there's no delay for the client and then send the roll input the server. I can't figure out a nice way besides disabling Unreal's movement replication and writing my own replication for movement since Unreal's replication snaps me back into place when I roll.

boreal bay
#

does ue4 smooth out movement for you in multiplayer or do you need to handle that yourself?

fossil spoke
#

@boreal bay movement is smoothed on the CharacterMovementComponent for you yes. Any custom movement that doesnt use this components smoothing will need to be smoothed manually.

gray crag
#

Hey guys, I have a project that was using blueprint networking (I think I got some of the behavior from Shooter Game). I want to convert the networking behavior to c++ so I used the tutorial @thin stratus put up to try and do that. I completed it and tried to connect to games playing on the same computer and it can't seem to find any games when I try and find games. I'm using 4.14.1 and the OnlineSubsystemNull subsystem to do this (will switch to Steam once I get things working)

So I'm wondering if there is something that was added in 4.14 that is required to do this sort of thing or if connecting 2 games on the same computer isn't possible to test this sort of thing. Thanks!

orchid cairn
#

if you're working from blueprints, is it possible to get access to OnRep for movement, or would i need to up cpp for that?

#

(for the purposes of smoothing movement for an actor, not a character class object)

thin stratus
#

Hm. You can check if the override functions are listing it

#

if not, then I guess no

wary willow
#

@thin stratus you did a MP tutorial?!

fresh saddle
#

@gray crag check your log files and make sure subsystem booted up properly

gaunt kestrel
#

how does Time Dilation work in multiplayer?

#

Custom and Global?

red ledge
#

in Paladins they use GlobalTimeDilation I think

#

when the match ends everything fades to black and the time slows

#

but you can still move etc

#

I guess it works if you use it correctly on the server? @gaunt kestrel

orchid cairn
#

time dilation works fine as long as you fire it as a server function, it'll replicate across to the clients

gaunt kestrel
#

Okay thanks everyone!

#

Gonna make a wizard shoot time spheres

orchid cairn
#

good luck 😃 word of advice, dont forget that if you're going to use a timer for when the time dilation ends, remember that the dilation will effect that as well 😉

thin stratus
#

@wary willow Hm?

wary willow
#

@thin stratus nothing, someone said you did an MP tutorial. He probably meant the comp.

gray crag
#

@fresh saddle just checked the logs and it said "Loaded Plugin OnlineSubsystemNull, From C:/Program Files/Epic Games/4.14/Engine/Plugins/Online/OnlineSubsystemNull/OnlineSubsystemNull.uplugin" so it seems to have loaded it correctly

fresh saddle
#

That means its loaded the plugin but it might not have started correctly.. send me your log? @gray crag

dawn glen
#

So I have a question about a few multi-player things I'm having a hard time wrapping my head around. First off is how to preserve security of logins. For example I have a php set up and a lobby map. You log in and the username and encrypted password is sent to the php server and Json comes back with success and a few basic variables like account Id, username and password used. It then puts that info into storage and migrates to the game map. The server then through Json requests all of your persistent data and applies it. The issue I'm worried about is that encrypted password is sent and could be intercepted. Then a person could hook the client and paste the encrypted password into the network stream and hijack an account. Is this something that I should be doing differently?

#

I was thinking of storing the salt locally so it would encrypt off a unique salt but then if the player reinstalled they would loose the salt

jolly siren
#

does anyone know why my projectiles don't show up on client when I'm really close to something when I fire? I spawn the projectile on the server and replicate it. But when it hits something I'm not destroying it right away. I'm setting it's lifespan. So I would expect to see it on the client and server. But it's only on the server

#

SetLifeSpan is really basic and just starts a timer. So it shouldn't be stopping the replication

dawn glen
#

Are you spawning it to ignore collision on spawn? It might be spawning collided and not actually spawn

jolly siren
#

I thought of that but SpawnActor logs if that is the case and I don't see anything in the logs there. I'll add a breakpoint just to make sure

#

hmm I see it in the world outliner for the client

#

oh weird

#

it's bouncing off the object it's hitting and flying off super fast in a different direction lol

#

but only on the client

#

💣

#

these aren't projectiles that should bounce either

#

wtf

jolly siren
#

That's on the client^

#

the client/server projectile velocities

#

I am spawning the projectile on the server only and replicating it to the client. So I don't understand how that could be possible.

#

my projectile has an initial speed of 5000

#

if anyone else every runs into this, zeroing out the velocity on the projectile movement component fixed this

wary willow
#

Anyone found a out of the box way to do Vive Motion Controller replication?

#

SO, no plugins and/or engine code changes.

fierce birch
#

@wary willow can't you just put actors that follow them and replicate them?

wary willow
#

Actors would get replicated, but the MoCon wouldn't?

#

As in, me moving, would not really move

#

I'm just doing research before actual production start, and I may be limited as to what external content I can use

#

So I am trying to streamline it if possible.

fierce birch
#

oh right

#

can you just replicate local space tranforms for them?

#

like location + rotation

#

I don't know if there's actually some built-in replication for them, although why would there be?

#

it sounds pretty specific use case

wary willow
#

I know there a way to do it via tick

#

I guess I should have said I would like to rule that one out

#

@fierce birch ATM MoCon replication is actually bugged

#

Well, it was supposedly fixed in 4.13, but that never happened

fierce birch
#

ah

wary willow
#

That is why most people are either doing source changes or using VRExpansion

#

I will probably have more than 5 non-coders on my team and it's already going to be a headache with Perforce

twin juniper
#

When a client disconncects, the possessed pawn seems to be destroyed immediately. How would one handle destroying objects associated with the pawn? I no longer have a reference to them, and keeping an array of "pawn objects" to then loop over on disconnect doesn't seem right...

#

Binding an event to "OnDestroyed" might work, but I'm unsure if that will be replicated in time. Not sure how that order of operations is handled

rare cloud
#

@twin juniper, IIRC you can specify inside config files how many times you want to keep alive Pawn and Playerstate

#

after deconnect

twin juniper
#

Yes I've set player state

#

Didn't see pawn

#

In this case I spawn actors on the server that is then attached to the pawn. Client disconncects - > pawn is destroyed -> spawned actors stay

#

Which makes perfect sense, just trying to figure out the best way to deal with it

rare cloud
#

can be a solution

#

but config file seem to be cleaner I guess

twin juniper
#

The "Inactive Player State Life Span" is a variable within the game mode

#

Only refers to player state

rare cloud
#

override this function, and unpossess the player

#

instead of delete it (that the engine code did)

twin juniper
#

Ah that might work. And then I guess setting up a system to "time out" the pawn

rare cloud
#

maybe if you add the player to an inactive state, with GameMode->AddInactivePlayer()

#

I will see function code

twin juniper
#

But it seems as if that's already done by the playerstate

#

Rather, the playerstate is left as an inactive player

#

And it automatically looks for inactive playerstates on postlogin

#

I don't need to keep the pawn, it's cleaner and easier to destroy it

#

And stats will be kept in playerstate

#

So on pawn begin play I can go through playerstate and see if stats != null

#

And set pawn accordingly

#

So, I think my solution is: On PawnLeavingGame(), call destroy objects on pawn, then destroy pawn

rare cloud
#

ok

twin juniper
#

Thank you you've been much help

#

Jeez late night english

sick remnant
#

Hello everyone, I'm having some issues with possession on dedicated server. What I'm trying to do is allow all my clients to take control of the other characters but only the first client that connects is able to take control of characters that are part of the level instead of connecting clients. I think I'm unaware of some requirement before I can call Possess on the server, but didn't see anything in related docs. So if anyone knows of a can my client controll this actor checklist, that would be much appreciated.

polar bridge
#

i'm taking a bit of a shot in the dark here, but i'm not sure that's possible with the way owners/instigators work

#

you may have to spawn a new character off the owners controller and copy the properties over

#

you could try changing the owner/instigator of the character to the other players controller, but i'm not sure that's possible

night jay
#

You could do a DoOnce at postlogin

#

So the first that connects only gets through

#

Or at begin play of player controller

#

Calls event on gamemode

#

Gamemode event fires doonce with the logic you want to happen only for the first to join

sick remnant
#

Thanks for your input, its much appreciated. @polar bridge Hmmm, I have tried setting the owner before but ended up with inconsistent behaviour, i'll look into it more. Do you know of any docs about ownership? A quick google didn't turn up anything. @night jay I'm not even sure what is wrong. So I wouldn't know what to do at postlogin/beginplay

polar bridge
#

there are not-go-great documents out there i think. most of my knowledge comes from talking to other guys on irc

night jay
#

Possessing the player should make the controller automaticaly its owner IIRC

polar bridge
#

are you unpossessing it first from its original controller then trying to posses on the new one?

#

might just be something as simple as it's already possessed

sick remnant
#

I am not, because I have seen that the first thing the Possess call does is call unpossess. So me doing it would be doing it twice.

polar bridge
#

ahh, not sure then. i only spawn characters off the controller then possess them immediately after, so my knowledge is definitely limited. but i would look a bit into ownership

#

doesn't give you an error when you try possessing?

sick remnant
#

no errors

polar bridge
#

you try putting a breakpoint in on the possess and see what it says for owner after? maybe that will give you bit of an idea whats going on

sick remnant
#

I dont see a call to SetOwner for possession and I do see one SetOwner(null) in unposses. So am definatly investigating that.

thin stratus
#

SetOwner in BP doesn't really work

#

at least it never did for me

#

No idea about C++

#

Normally you set the Owner when you spawn the Actor

#

Non set owners are owned by the Server and can't have Server and Client RPCs

#

As they need the Client to own the actor

#

A pawn usually gets spawned an possessed on Server side

#

And the Owner gets set at this very moment

#

Which is normally the PlayerController

#

Possessing might set the Owner, but I don#t really have the C++ code in front of me atm

#

Calling Possess unpossesses the old pawn

#

As PlayerControllers only allow possession of one Pawn at a time

#

What exactly are you aiming for @sick remnant as I didn't really got it in your initial post

sick remnant
#

I have a Character standing in the level and I have 2 clients controlling a character of the same type. I want to be able to aim at the character in the level press E and take control of that character.

thin stratus
#

But only if it's an "empty" one, or?

#

So you can't take control of a Character someone is controlling, or?

#

Also, C++ or BP?

sick remnant
#

Right now I dont care about empty, working in BP

#

infact, I just notice I dont have the problem when taking control of the other clients characterr.

thin stratus
#

Hm okay, I will still give you the "solution" to not kick someone out of his character

#

So what you should do (just out of my head)

#
In your PlayerController

Press E -> ServerRPC -> LineTrace (from Camera for example)
If hit -> Cast to your PlayerCharacter Class -> From the result call "GetController"
Check if Valid -> if not (no one controls it) call possess on it
#

That's what I would try

#

@sick remnant :D You still there?

sick remnant
#

I tried your suggestions, same problem.

thin stratus
#

Could you also explain me the problem in a short and easy sentence ?(:

#

I'm sure I can help you somehow

sick remnant
#

If I take control of the character with the second client to connect, the camera does move to the possessed character and I can look around, but I can't walk.

thin stratus
#

The Character is correctly possessed, yes?

#

If you simply print a string on your Input, do they work at all?

#

Like for example print the value that the "MoveForward" event gives

#

Does that change to 1 if you press W?

sick remnant
#

Lemme try sec

sick remnant
#

yes, sorry that took so long.

night jay
#

Sooo anyone know how I kan get inactive player states?

thin stratus
#

@sick remnant Ok so on the newly possessed Pawn, you get input events returning 1 if you press W?

#

That's important to know, so I know if you have Input at all or not

sick remnant
#

Yes, I get input events returning 1 if I press W

thin stratus
#

Can you show me a screenshot of the code you use for walking?

sick remnant
#

ThirdPersonExample

thin stratus
#

I don't have that at hand :P

#

So simply adding Movement Input I assume

#

The Character is set to Replicate, right?

#

And also to replicate movement?

sick remnant
thin stratus
#

Do you get any errors while playing

#

Just to make sure :D

brittle sinew
#

@night jay AGameMode::InactivePlayerArray?

night jay
#

Is that C++?

sick remnant
#

no errors, character is set to replicate, and replicate movement is ticked

brittle sinew
#

@night jay yes, not currently exposed to BP

night jay
#

If I do an get actors of all class will it include that

brittle sinew
#

Of what class? PlayerState? Because that will get all of them..?

night jay
#

yes

#

I want all of em

#

Including the ones that are inactive

#

Right now my issue is

thin stratus
#

@sick remnant Hmmm. Does the PlayerController have movement input and is maybe consuming it?

brittle sinew
#

Then look at AGameStateBase::PlayerArray

#

That's in BP as well

night jay
#

Hhmm

#

Other question

#

My default playerstate of the gamemode is a child of the parent playerstate class

#

There I have my character stats and whatnot

#

When the player leaves does it set the inactive playerstate as the same child playerstate class I have in my default gamemode settings or does it set it as just playerstate(resulting in the loss of any variables set in the child playerstate)

#

Might be a bit vague

thin stratus
#

It uses your class

sick remnant
#

@thin stratus I am getting input in ThirdPersonCharacter, lemme check the Controller.

brittle sinew
#

You would retain the child values, but you would have to cast to it ^

night jay
#

Alright cool

thin stratus
#

I exposed functions that allow getting the values back iirv

#

OverrideWith should do that

night jay
#

One more question

#

Is there a variable in the playerstate or anything which has it marked as "inactive"?

thin stratus
#

That would be called in the new PlayerState and the inactive one should copy that over then. At least if I understood that correctly

brittle sinew
#

I don't believe there is, though if you override AddInactivePlayer you could set a custom variable on it

night jay
#

Hhmm

#

Alright I'll look into it

#

Thanks

thin stratus
#

Not exposed to BPs (the inactive var)

brittle sinew
#

Yeah, I was wrong

thin stratus
#
/** Means this PlayerState came from the GameMode's InactivePlayerArray */
    UPROPERTY(replicatedUsing=OnRep_bIsInactive)
    uint32 bIsInactive:1;
night jay
#

Hhmm

thin stratus
#

But you might be able to check

#

if the Controller is valid

#

Inactive States should not have a valid controller (on server)

night jay
#

Alright thanks

sick remnant
#

@thin stratus It uses the default playercontroller C++ class, and I am seeing input in my Character.

night jay
#

More questions

#

Is it possible to travel to a server while not needing to open a new level?

#

Like I want to travel to someone's lobby

#

But the lobby is just the mainmenu with a different widget

#

And thus to prevent stuttering everytime you try to join someone's lobby you only join the server and load the corresponding widget for the lobby while grabbing the correct info from the server like players etc.

#

Possible?

#

Anything to get a smooth lobby experience? I know many games that provide that

thin stratus
#

When you travel to the Server

#

you open his map

#

That's how it works :P

#

If you don't want that, yo uwould need your own Session/Lobby logic

#

@sick remnant Hm. Only thing that comes to my mind now is that maybe the Controller Forward Vector returns 0,0,0

#

Since you say the AxisValue of new possessed pawn is actually changing

ripe cypress
#

could someone help me look over this or figure out this multiplayer resoawn system geez stressing me out

cursive herald
#

whats wrong with it?

ripe cypress
#

just can't get one to work been trying everything for days

polar bridge
#

does register server not get called in PIE or something?

#

trying to override it in my game session, specified the game session in my game mode, but never hit the breakpoint. hmm

polar bridge
#

is there any documentation on dedicated servers? i can't seem to host a session properly

#

anything on the net is pretty outdated, what little there is of it

polar bridge
#

i took a quick look at that stuff but didn't see anything specfiic to dedicated servers. i kinda took a step back and making sure everything works local with null subsystem. i think i found a few problems with my code, but i also think for some reason RegisterServer on my GameSession isn't getting called when i run a dedicated server, and i have no idea why.

rare cloud
#

the last step seem to create an Online SubSystem

polar bridge
#

i've done that, and i've gone as far to put log calls in there. but when i launch the dedicated server executable with logging enabled, i never see that log call 😦 it's almost like it's not picking up on my game session. i haven't tried since switching from steam to null online subsystem

#

there was almost definitely some problems with steam

polar bridge
#

so my GameSession should just call RegisterServer when i launch a dedicated server right? it's an overridable function, so that would make sense. but i'm 99% sure it's not calling it, because i'm not seeing my log calls. but now. i do have it working with a listen server, but this dedicated server really doesn't want to create my session

fringe dove
#

Is there a way to use an FUniqueNetId as a key in a TMap, without converting to a string?

jolly siren
fringe dove
#

@jolly siren looks like ToString would still be the only way with that with UniqueNetId, because all the internals are hidden

fringe dove
#

hmm, sucks there is no hash function exposed because it does expose operator==

languid birch
#

I'm working on multiplayer and process is customEvent(runOnServer) execute customEvent(multiCast) am I doing wrong?

#

Pickup function

steady topaz
#

Hi, how might I go about adding a simple push-to-talk voice chat to a two-player game? I'm using Blueprint and I do not know C++, but if it's only doable with C++, would it be simple enough for someone to help me out with it?

thin stratus
#

No idea if that's simple. You can check out the Advanced Session plugin

#

i think i saw voice support in there

#

could be bound to steam though

polar bridge
#
thin stratus
#

UE_LOG(LogTemp, Warning, TEXT("****************************Attempt to register server**************************")); Is also not called?

#

@polar bridge

#

Will head to bed now. Are you sure the GameSession class is actually used? Maybe add the BeginPlay to it (or what ever it features for that) and check if it actually gets spawned

#

Also, are you sure you want to advertise the DedicatedServer as a "non LAN match"?

#

Because for Online Session finding you need a MasterServer or a Subsystem like Steam (which offers a MasterServer)

polar bridge
#

correct, that first call is never there either.

#

in my tests locally, non LAN worked fine

#

but that was with a Listen server

#

i will try your suggestion of using beginplay to see if it's ever spawned, i bet it's not

thin stratus
#

Non lan works fine cause you are still in lan

#

If you try that with 2 pcs not sharing the same network you won't find it anymore

#

Session + internet need a masterservsr

#

My god second time i do that

#

Freaking phone app

#

@polar bridge

polar bridge
#

that's fine, i want to get it working with null subsystem/LAN first, then i'll move over to steam. i realize it won't register until i move over to steam

polar bridge
#

if i put in a log call in beginplay, doesn't show up. so obviously it's not using my specified class

orchid cairn
#

so i grabbed the Twin Stick Multiplayer Example thats pinned to this channel, downloaded it and tried to compile and i'm getting a boatload of errors... could it be that it's using an older engine version and it's depreciated? trying in 4.14

#

@rough iron any ideas?

rough iron
#

it's done in 4.11

#

or 4.12 xD

#

might need to update the source ^^

#

give a day or two xD

night jay
#

Uh question

#

Is it possible to get someone's Steam username?

#

Not screenname

#

The name one puts in when logging into Steam, the unique name

brittle sinew
#

I don't believe so, I've never seen that as part of the API and steamid.io doesn't give it

#

If you need some tangible to tie to on an account, use their ID or ID64

night jay
#

And ID matches the ID you can get from accessing the profile page on the Steam website right?

brittle sinew
#

People can define (and change) a CustomURL, but you can always access their page via steamcommunity.com/id/{ID64}, even if they have a custom URL

#

I'm not sure if you get a person's CustomURL or the ID if you were to click on them on your friends list or something, not at computer to test

night jay
#

Would be kind of a pain to only beign able to get it ingame. I want to make some kind of whitelist for testers so only they can play

brittle sinew
#

Well, you can use sites like I mentioned, steamid.io, to make a pretty complete API call with just a CustomURL or name

#

I'm sure there's a lot of others too

orchid cairn
#

edit - screen name yes, from PC, username no, for obvious reasons

#

update for anyone interested. for 4.11 it was an issue with VS2015 Update 3 - hotfix is here - https://forums.unrealengine.com/showthread.php?3147-Current-Available-Quick-Fix-Solutions

fierce birch
#

yeah, for some reason they didn't put full hotfix for 4.11

#

IMO they should have put out 4.11.3 for that as it's pretty big problem

#

also

#

they never put out fix for 4.10 for that same issue

#

4.10 was first ue4 that supported VS2015 by default

#

you can manually fix that on 4.10 though

red ledge
#

any idea how a summon system like the one in Dark Souls could be done in unreal engine?

#

as far as I can tell, it would be some thing like this:

  • whenever a player plays online, he uses a listen server and sends info to a server with a database that stores his info
  • when a play registed online puts a summon sign in a certain place, he also sends that info to the server
  • all online players ask the server for the summon signs in their area on a timer
  • when a player summons another player, the server makes the summoned player connect to the summoner using the registered IP of the summoner
#

I have no idea what kind of server it will be tho or how to make it.

lean river
#

As you wroted .. you need a listen server. This server do only data collection, collect every player ip and necesary data for the connect. Every Client running the game in "local" server mode i guess and nobody can join to this (because only the listen server know information about ips) except who has summoned. So basically you summon your friend, you send a summon request for listen server. Listen server check your friend is online etc and if everything fine listen server will send a connection command eith your ip

red ledge
#

what would be that "listen server" though?

#

a dedicated server running somewhere?

#

the problem is how to do that communication

lean river
#

hmm maybe easyest explanation of listen server. listen server is somekind of lobby where accepting player connection, logging player, check passwords etc then forwarding player to the game server 😃

brittle sinew
#

I'm not really sure that's a listen server, more of a coordination server

#

A listen server is someone playing in the game while also acting as a server

lean river
#

Yeah, you are right. Listen server basically someone who play and acting as server

#

But in not client server model, listen server is a backend server, but mostly called login server/realm server etv

#

But no matter, if we need collect online players that is definitly not a gameserver, because server who collect data, managing userprofiles, friends is a backend server :)

#

ue4 will not handle this by default i guess....... for this need custom onlinesubsystem implementation.... where client start, connect to a server and indicates "hey server im playing and im online with these ip to summ me if somebody want"

rare cloud
#

@lean river, are you already develope a backend server like this ? I made a small one using Java with async sockets

#

but there is a better language to handle more connection or simply be more powerful ? python ?

lean river
#

@rare cloud nop, i never developed a backend server from scratch, but i worked with many backend server. i helped in trinitycore/mangos (wow emulators 😄 ) and i work on another games too... this games used backend and master servers too... soo im similar with these network model 😃

#

i think java is good enough. WarZ used asp.net for backend 😄 that was horrible...

#

wow emulators have own master server written in c++ and master servers have direct acces to db server 😃

#

but every language is good if run fast and stable 😉

polar bridge
#

that's the problem, they're not all fast. not even close. c++ is one of the few languages still around that actually compiles down to binary and not some stupid intermediary machine code

#

java is getting much, much better

lean river
#

asp.net was terrible slow and unstable..

polar bridge
#

yeah asp.net is probably one of the worst of the bunch, it has so much going on in the background

lean river
#

for login and user profile things i think php good enough too and unreal has curl implemented i guess?

polar bridge
#

i'm not a fan of php myself, it's pretty slow too from what i've heard.

rare cloud
#

@lean river, ok thanks

polar bridge
#

@rare cloud imo python or something like NodeJS would probably be faster.

rare cloud
#

Php seem slow

#

@polar bridge, yeah

polar bridge
#

java is not bad

#

it's gotten significantly better over the years

#

i'm a fan of NodeJS myself

#

python probably still faster

rare cloud
#

python is not my favorite language haha x)

thorn merlin
#

theres a module on the marketplace, for server communication - i think its python

#

then theres gamesparks

polar bridge
#

the syntax of python throws me off for sure

#

it's an odd little duck

rare cloud
#

I really hate the auto typing

thorn merlin
#

i use asp.net at the moment, mostly because thats my day job - been looking into nodejs or firebase or something

#

regardless of what you say bout asp.net it comes with additional cost to host it, hence why i wanna move away from it

#

azure makes me want to pull my eyes out

polar bridge
#

lol i've had limited experience but, not fun. our corp is moving everything to azure soon ugh. hoping to convince them to at least look at AWS

thorn merlin
#

i used aws first, azure is fine.. but the costs are higher, the ui looks pretty but it really is frustrating to do things

#

but if i wanna deploy a webapi to azure only, you have to include all this nonsense.. i want something super lean and easy to manage for my web layer

polar bridge
#

yeah i played around with a pilot project and it seemed overly complicated when you want something simple

thorn merlin
#

try deleting all your stuff you created to test

#

thats what made me lose it, it takes forever

polar bridge
#

oh yeah, i had to. and it was weird. of course you want to make sure it's all gone so you don't get charged lol

#

i can't even remember what it made, but i remember having to delete 6 different security groups or something stupid

thorn merlin
#

yea, you have to do the same on all of them, but i found it was like 10x the clicks on azure

red ledge
#

@lean river dammit, I was thinking that there night be hacky way through unreal without having to modify the source code or knowing python to test the concept

thorn merlin
#

theres also the plugin on the marketplace

polar bridge
#

if you know c++, python isn't terrible

#

weird sure, but it's pretty easy to learn

red ledge
#

I'll star it for now, but I have no idea how to do this stuff for now

#

@polar bridge it's easy yes but the syntax gives me nightmares

#

you have to space everything right

thorn merlin
#

@red ledge maybe look at https://www.gamesparks.com - it has a UE4 plugin

The unity of the server-side. GameSparks is a cloud-based development platform for games developers enabling them to build all of their game's server-side

polar bridge
#

from what i've learned with my past year in UE4 is there is no shortcuts 😃

#

"hack job" solutions tend to turn into hack job games which turn into nightmares themselves

thorn merlin
#

lol ^^

#

yea I agree, welcome to the jungle baby

red ledge
#

@thorn merlin Thanks, saw someone talkin about that in the forums before, I think about the PAragon server or something, not my priority right now but I'll check it when I'm free

polar bridge
#

do you have a project already started? it's good to see if the tech will work (which it will), but it's maybe not the best starting point

#

i've worked with the networking for a while now, and it still makes my head spin

#

look at rocket league, they definitely use some form of a master server

thorn merlin
#

did you see how rocket league was like the #1 downloaded game on ps4 or something like that last year. wow I knew it was big but not that big

polar bridge
#

not surprising, it was free on psn for a while i think

thorn merlin
#

ahhhh

polar bridge
#

plus it's a decent game 😄 some people are ridiculously good though my god

red ledge
#

@polar bridge only testing some networking stuff for now, trying to learn how to put together a networked RPG/MOBA together

polar bridge
#

gotcha

#

it's possible, that much i know. but, tricky for sure

#

at some point you will almost definitely have to make your own online subsystem for something like that

red ledge
#

Yup, I know. right now it's not something outside of the normal session based system that you can do on steam, but most likely will have to learn nretworking and how to modify the source

polar bridge
#

i think the online subsystem interface should give you everything you need without modifying source. i think.

red ledge
#

I mean for making something like that dark souls summon

#

or invades

#

btw, what kind of networked games have you worked on?

polar bridge
#

top down "bullet hell" shooter

#

don't know if i'm allowed to link my twitter?

#

bullets aren't actually replicated, had to do everything through RPCs

red ledge
polar bridge
#

hahaha

#

i'm a programmer, not an artist 😃

#

hoping to get a kickstarter going soon to fund the art side

red ledge
#

good luck!

#

if the kickstarter worked. any idea on when you might finish it?

#

also, is that a freakin' parrot?

polar bridge
#

depends on what you define as "finished" lol. early access i'm hoping this summer. full release next summer

#

yeah that's the girlfriends linnie haha we have two

red ledge
#

good luck

#

you are releasing it on steam I think?

polar bridge
#

thanks man! yeah that's the hope

#

i'm sure i'll be able to get greenlit, i'm more worried about funding

red ledge
#

hope to get to that stage where I'm sure of the greenlight lol, btw, do you know the process of it? not the voting, I mean after that. or are people not allowed to talk about it?

polar bridge
#

i don't, and i know there's an NDA

#

and as far as i understand it the NDA is rather ... insane

#

not allowed to talk about profits, the inner workings, nothing. but i do know 30% goes to steam.

red ledge
#

Damn I thought they only took 20%

cursive herald
#

I've been on steam and afaik I didn't sign any steam NDA

#

but I'm through a publisher so maybe they signed it

#

but yeah its 30%

#

for everyone

#

Im sure if your AAA you could talk them down

red ledge
#

so if you made 1000$ with the unreal royality and the steam 30% it will end up being about 760$?

lean river
#

maybe im not so good in math, but (1000 * 30%) + (1000 * 5%) = 350 and 1000 - 350 != 760 😄

red ledge
#

wait i missed up I multiplied the 5% and the 30% together

#

forgot that both epic and steam get their share from the revnue

polar bridge
#

i'm pretty sure there's an NDA, talked to other indie devs who said they can't talk about their profits because of it

red ledge
#

yup, I read about that somewhere

polar bridge
#

but yeah steam takes their pretty penny. without steam though, you just have no exposure

red ledge
#

yeah but still there's an explosion of steam games in the summer each year

#

in a way this is your chance to shine, but on the other hand, you don't really have the strong media other games have

#

unless the concept of your game is really unique and it went viral

polar bridge
#

yeah i think getting ahold of steam and trying to get some sort of spotlight is huge

#

or sale

red ledge
#

or had a trailer with insane graphics that also went viral

polar bridge
#

sticking out from the crowd is the biggest thing. i know myself i go "ugh another survival game, skip"

red ledge
#

yeah, that's the problem

#

a game like TABS for example is very simple but went very viral because of how silly and buggy it is

polar bridge
#

a single tweet/youtube video can take you from nothing to 30,000 sales in an instant

red ledge
#

not sure how can a solo dev or a very small team break the 10k$ on steam tbh

polar bridge
#

i thought that at first too, but found out later that people are tend to make quite a bit as long as the game is well polished and marketed

#

guy who made dwarf fortress said he's raking in around 6 figures a year

#

that's pretty damn good

red ledge
#

10k is not a huge number of sales even, around 680 for 15$ title

polar bridge
#

have a local friend who hasn't told me any numbers, but from what i can guess, is making ~$50k/yr

#

and tbh i didn't like his game

#

but he put shit loads of work into it, listened to his players, released it for xbox, etc etc, and is making a living off it

#

he actually quit his day job to work on it, don't know if i could do that but yeah haha

red ledge
#

not to mention that you will end up getting around 6500 only since steam will suck the revenue with your blood

polar bridge
#

yep

red ledge
#

I can live on pretty little since the living cost here is very low when you have an income in a strong foreign curreny like USD or EUR

#

those 6500 are very good if I didn't have to pay for college

polar bridge
#

yeah i'm canadian myself, so the usd->cad exchange will pretty much make up for that 30%

#

or 35% even

red ledge
#

wait I can't find any info on dwarf fortress

#

can you give me a like to the game site or steam page?

#

50k/y is very good tbh, not sure if I will risk leaving my job for a chance at that

#

just 6500 a year I would be making 5.5 times the average salary so it would be quite good

polar bridge
#

it was on reddit, could try to find it

red ledge
#

nah, no need

polar bridge
#

it's hard to get figure out what the numbers are exactly. but, from what i've seen, if you put 110% into your game, make it absolutely shine, market it well, design it well, and mostly importantly have something FUN to play, you can live off the money. maybe not live like a king, but you can live off it. if you're one of the lucky ones, your game goes viral, or people find it really fun, and you do live like a king (ie: rust and gary). but, being realistic, those cases are few and far between.

#

the problem is that i think most guys just can't put in that 110%. i've almost given up many times, because really, it's not easy.

red ledge
#

true, I give up on simple tests sometimes because they are too difficult or I can't solve a certain problem etc, but to live like a king here doesn't really need all that money, 20k a year is enough for me until I finish college and maybe leave the country because I'm not planning on staying here my entire life

#

it's also very fun to make a fun game that you enjoy and take in player input then present them something they like as well

polar bridge
#

i hear you, don't get me wrong some of my motivation is the potential to make money, but right now most of my motivation comes from re-creating a childhood favorite 😃

#

if you don't mind me asking, what country?

red ledge
#

some of my motivition is money as well since I kinda need foreign currency if I want to live here right now, game dev is fun , I love it, and it can get me that, so

#

Egypt. A country famous for pharaohs and a currency that its value decreses by 120% each year

polar bridge
#

oh wow, yeah, i honestly can't think of many country's that are in a worse economic situation

drowsy zodiac
#

LogNetPackageMap:Warning: SerializeNewActor: Static actor failed to load: FullNetGuidPath: [19]/Game/Maps/UEDPIE_1_TestingLevel.[17]TestingLevel.[15]PersistentLevel.[123]TargetSequencer_Marker2, Channel: 58

#

I am running into a weird issue where after i use server travel, assets dont seem to load into the map

drowsy zodiac
#

Its coming down to an issue with loading child actors I think

high lotus
#

has anyone ever had an issue with steam overlay not showing up when you hit shift+tab?

polar bridge
#

did you enable the steam online subsystem?

high lotus
#

yes

polar bridge
#

if that's enabled, and you have steam running, it should pop up

high lotus
#

the "hit shift+tab" to open steam pops up

#

but shift tab does not open the overlay

polar bridge
#

do you have overlays disabled in steam 😄

high lotus
#

it does work on other games - just tried it

polar bridge
#

you can disable overlay in steam itself on an individual app basis, i would double check that

high lotus
#

it is using spacewar right now

#

what's preventing me from putting in an steamapp id?

#

oh, it's gotta be linked to my account, right?

polar bridge
#

i think the steam api won't let you

high lotus
#

i'm going to try it with an appid I own.

#

nope - it runs as my project, but it didn't open the overlay

#

while opening the steam overlay isn't a pressing problem, it makes me believe that I've done something else incorrectly

polar bridge
#

do you have shift+tab bound in your game or something?

high lotus
#

no, it's basically an empty project

polar bridge
#

yop copied over all the dll's necessary for steam?

#

i imagine if you didn't, you wouldn't get the popup, mind you

high lotus
#

that I'm not sure about -

#

it's not opening with ctrl+shift+1

polar bridge
#

so, you need the steam_api64.dll from the steamworks page, then you need to install some steam app on your machine and copy over the dlls from there as well. or else you wont have the steamclient/tier0/vstdlib dlls from what i've seen

#

i don't remember the app id i used in steamcmd, but that fixed quite a few problems for me. a quick google will probably find it

high lotus
#

it's packaging with that dll

#

I'm not sure what you mean by copying over the other dlls

polar bridge
high lotus
#

some of this is outdated, unreal now ships with the steamworks api

#

I did add those dlls to my built project with no change

#

trying to join a game as space war reveals some interesting logs - I can see so many games out there with odd names

orchid cairn
#

slightly late to the conversation, but @red ledge - playfab have a UE4 SDK, full dedicated server hosting and a basic matchmaking system. it's what we use currently for our title which is pre-greenlight but soon to be announced 😃

#

long story short, our online game flow is very similar to something you would find in a MOBA (league, dota, etc) and it works really well for us

#

you can also implement your own matchmaking system and tie into their API through REST calls

high lotus
#

@orchid cairn why use playfab over steam or others?

orchid cairn
#

cross platform multiplayer, and easy dedicated server hosting were the two big factors for us

#

playfab also supports an easy backend for online accounts, player stats, in game purchases etc

high lotus
#

cool

twin juniper
#

@orchid cairn Did you compare it to GameSparks?

#

Playfab seems to be a lot more expensive

#

Question: Why isn't player state constructed before the player pawn? I'm getting the player state on begin play of the pawn, and it always returns null

orchid cairn
#

@twin juniper - remember that the player state is created on the server, and replicated across... if you're trying to access it from a client, especially if youre in beginPlay, put a loop with a 1 tick delay or something like that and check IsValid on something in the player state to see if it's replicated across yet

#

and we looked at GameSparks, the big difference for us was the free tier on playfab suited us for testing, and we are taking advantage of their amazon EC2 integration for dedicated server hosting. means we can spin up servers on demand, only pay for what we use, they handle the integration for us, and the fee for dedicated server hosting is quite reasonable (roughly the EC2 costs + 10%). since we need a smooth multiplayer experience, it's worth it for us

twin juniper
#

@orchid cairn I am actually getting it after Has Authority Switch -> Authority. Shouldn't server have a reference to the player state before it creates the pawn?

#

Oh, pawn is loaded on client?

orchid cairn
#

not always, not sure why UE4 does it that way, but whenever we touch player state at the start of a match or when theres a chance it hasn't been initialised, we just throw that loop in to be safe

#

your pawns should be spawned on the server, then use replication to get them across to client

twin juniper
#

@orchid cairn Hm, what if I uncheck net load on client

orchid cairn
#

for the pawn? you wont see it on the client then

twin juniper
#

Ah, I thought it was created on clients machine to save the server some processing

#

Or that that's what net load meant

orchid cairn
#

give me a tic i'll screenshot what i'm talking about

twin juniper
#

Yeah I'm aware of the loop, I just don't understand why player state isnt instantiated before pawn

orchid cairn
#

you can always solve the problem the other way, use GameModeBase instead of GameMode to inherit from, and implement your own spawn logic

twin juniper
#

The loop seems to work just fine. But yes I've been thinking about that. It's just that I started the game modes before gamemodebase existe

#

And I have some logic tied into Match State

orchid cairn
#

depending on your game, it's not that rough to make the change yourself, i know for us we were reimplementing alot of the stuff GameMode had anyway

twin juniper
#

This is not too bad of a workaround. I just put a .1 delay on it

#

If not valid

orchid cairn
#

if you do a delay of 0.0, it'll wait a single tick (either works fine tho

twin juniper
#

I'm fading in the view for the player anyway, so saving a couple of cycles afaik

#

@orchid cairn I like that playfabs unreal support seems pretty solid, but gamesparks free tier isn't bad either. 100k players on the indie tier, which, for a VR game will never be passed

orchid cairn
#

if you dont need server hosting, that would be fine 😃

twin juniper
#

Yeah I'm doing listen atm. First networked project for me so I'm trying to stick to as much documentation as possible, and I have seen more for listen than for dedicated

#

I learned pretty quickly though that dedicated would solve a lot of issues

orchid cairn
#

your code base is very similar, main difference is you'll have to work from source to compile

twin juniper
#

Right, and set a server default game moe

#

Source would be no problem for me, but I'd have to teach my artists on the workflow unless I can compile out rocket builds for them

#

I read into that and it didn't seem like something epic supports outside of their own internal ones for the launcher

orchid cairn
#

if your artists are happy using source control, their workflow wont change

#

source still builds the editor for you

#

you'll just have to have a programmer do a nightly build for a ded server, or use something like jenkins

twin juniper
#

@orchid cairn Thanks for the info I'm looking into it

twin juniper
#

Definitely some stuff to learn there

#

Ok it doesn't look too bad when actually going through the steps, most of this I've done in one way or another

red ledge
#

@orchid cairn thanks! you can use prefab to send info for all clients connected, right?

#

the main diffrence I guess is that what I want is more of a master server than a dedicated server, the server only has some informations that it sends to players and vise versa

#

@twin juniper I had that problem before, I do a timer delay on beginplay

#

be carful though, the slower the machine running the game and its internet, the more the playerstate needs to load

#

up to 0.1 s is pretty ok, the player won't really notice

orchid cairn
#

@red ledge yeah, on login we load the client info into gameinstance for UI, then when the client connects to server it validates the player through playfab, then grabs the player data again (so for example, the server knows what weapons the player is allowed to use based on in game purchases)

#

dont do a delay only, build it into a loop 😃

twin juniper
#

I guess a While Loop, PlayerState != valid

#

Is sure to work

#

Delays can be wonky

orchid cairn
red ledge
#

@orchid cairn Thanks will change it to that

#

but what I mean is that your server is dedicated

#

so it was made with unreal

#

but it's kinds too much to make a dedicated server when you want to just some info

#

the problem is that those info are very uneral spacific like session info etc

#

and player unique net itds

orchid cairn
#

not sure what you mean

red ledge
#

@orchid cairn I mean that the only thing I want the server for is to have a database of all online players and also to be able to call some functions on the client game like makeing a player join another player in a session

orchid cairn
#

ah right, this is for the dark souls style thing?

red ledge
#

yup

#

or generally for players to be able to interact without having to login to a dedicated server session etc

orchid cairn
#

basically if the player agrees to let other players join their game, you'd open a session on that machine (basically making it a listen server) then use either a master server to track that, or some sort of matchmaking system. players who choose to join someone elses game can either pick from a list, or are joined randomly or based on ping. steam providers a master server that would work for this using the steam API

finite linden
#

Hi, I'm having some issues with load stream level blueprint node, seems client crash every time I try to load level from server. The log is showing the same message for all levels I try to load, something related with RenderingThread.cpp. Know someone can it be?

red ledge
#

@orchid cairn didn't know steam had this even, can it be done through the online subsystem or has to be through native steam api?

orchid cairn
#

online subsystem does it all for you

#

grab advanced sessions plugin, makes it dead simple to do it all in BP

red ledge
#

I'm trying to do it in code lol, thanks, I will take a look at the plugin code, helped me a lot already

#

just one stupid question, what exactly is the name of what I'm looking for lol?

orchid cairn
#

code works, just make sure you're not reinventing the wheel... blueprints are awesome for this sort of work, especially if it's already been done for you 😃

#
red ledge
#

true, but I just like to understand how to make it myself when it comes ti networking lol

orchid cairn
#

all good

snow cliff
#

hey, whats the best an easiest way to get a simple online multiplayer going for itch.io?

#

do I need dedicated server things?

orchid cairn
#

@snow cliff for itch it helps, since you dont have an online subsystem such as steam to fall back onto

snow cliff
#

ok

orchid cairn
#

or you could roll your own master server and host it somewhere, and allow clients to host listen servers

snow cliff
#

so only use the server for connecting the players, but let the games itself be handled p2p?

snow cliff
#

do you have experience with doing that @orchid cairn ? Is that a lot of work to do? and what would be a price on a suitable server?

orchid cairn
#

There's a master server available on GitHub somewhere, and it's not that hard, but obviously more work than using a online subsystem and sessions

snow cliff
#

ok, thank you very much; I will look into that !

orchid cairn
#

end of the day, it comes down to what sort of game/experience you're making, and how you want the player experience to go. you cant beat dedicated servers for that sort of thing, obviously with an added cost of hosting however

snow cliff
#

It's a party game, more or less casual. It is not intended as a competitive online multiplayer experience, especially not when the game is launched on itch.io

#

I think very few similiar games have dedicated servers#

#

And I have no money to afford dedicated servers anyway right now 😄

gaunt kestrel
#

How large can servers get?
squad does 50v50 right?

snow cliff
#

https://forums.unrealengine.com/showthread.php?943-More-than-32-players-supported-in-UE4-Max-AI-supported tim sweeney himself tells in this thread that there is no hardcoded limit

gaunt kestrel
#

Cool! thanks

#

I like how the first answer is "Try breaking it!"

hollow bear
#

Sometimes that is the best way to figure it out.

#

It'll also vary depending on lag, computer processing speed, internet connection capabilities, etc.

#

Anyone, other than using Rama's tutorial, know how to receive messages over TCP through C++? I can send messages just fine, but I'm having a hard time getting it to receive messages.

thin stratus
#

Nope, but you could post your code. Maybe people know what you are doing wrong when they read it (:

#

@hollow bear

fierce birch
#

could be worth linking the Rama's tutorial then too so people don't have to google it

signal sand
#

anyone know of any anti cheat software i can use for my project?

#

VAC just seems like the punishment is too severe

fierce birch
#

never used it

glad wharf
#

Hi everyone! Do you know how I can possess the camera of a pawn when in DemoPlay mode? (instead of having a spectator camera)

wise depot
#

@gaunt kestrel i'm pretty sure its max is 32767

#

although i wounldn't try actually allowing that many if i were you 😛

rare cloud
#

@glad wharf, DemoPlay mode ?

glad wharf
#

@rare cloud : yes, when you record a network replay

#

you can then replay it, but the camera you have by default is a Spectacor cam, but I would like to have a player POV

gaunt kestrel
#

Oh hey thanks

rare cloud
#

and there is a ReplaySpectatorPlayerControllerClass

glad wharf
#

Ok, thank you very much for the pointers!

#

so I would have to modify the engine or inherit from the DemoNetDriver

rare cloud
#

Simply create a new PlayerController

#

and assign your class to your gamemode

glad wharf
#

oh okay I see, and I can affect my Pawn to this PlayerController or make anything I want in it, great!

rare cloud
#

and you simply set the camera on the OnBeginPlay() function, with SetViewTarget() or SetViewTargetWithBlend()

glad wharf
#

Great, you save me a lot of time, thank you very much!

rare cloud
#

@glad wharf, No problem !

twin juniper
#

hey

#

what is the "EventsInterface"

#

in OnlineSubsytem

#

also

#

is it safe to remove playerstates

#

from the PlayerArray

#

of gamestate

#

or will that fuck shit up

#

also is there a way of getting the player controller from a playerstate

boreal bay
#

whats a realistic player limit for a fast arcade game where you need as little lag as possible

#

4?

proven wraith
#

depends how much data each player needs to replicate

#

and if you're using a dedicated server or not

drowsy zodiac
#

Does anyone have any experience doing networking predictions for character movement and projectiles

boreal bay
#

I thought ue4 had that built in

drowsy zodiac
#

It has built in prediction work, but I have a few reasons behind doing my own

#

For the character movement that is

polar bridge
#

@twin juniper i believe controller owns the state, so just get the owner

#

it's either the controller or character, pretty sure it's the controller

twin juniper
#

yea

#

i got it already

#

had to look through the api

polar bridge
#

at least theres references in the API! look up "AGameSession" and you get nothing, so dumb lol

proven wraith
#

@drowsy zodiac It's all in the charactermovementcomponent - and it's pretty intense

drowsy zodiac
#

@proven wraith ya I have been to intimidated to really look through it thoroughly, though I have looked at it. Was hoping for some verbal communication on the matter

fringe dove
#

how would you guys handle jetpack fuel inside custom flags based movement? basically I have a custom flag for 'is using jetpack'; I guess I'd want it to consume fuel only if it isn't replaying the move?

rough iron
#

If the move is on just consume it when you get the right input

#

Which you can do on the server only, this way you code might be cleaner

fringe dove
#

If it is only done on server won't client and server desync?

finite linden
#

Hi,

I'm having some issues with Unload Stream Level blueprint module.

Listen Server is crashing when try to unload some levels only if at least one client is connected. The clients don't crash. Those levels don't seem having nothing different. The Unload instruction can be in the level itself or in another level. Crash anyways. The next instruction after Unload is executed but only crash when Unload instruction is connected.

Anyone know something about that?

orchid cairn
#

@fringe dove - you run the test on both client and server, for the actual variable, you just set it server side, and replicate it across, or if you're using the character class, look into adding it as a custom movement into the CMC

twin juniper
#

Good evening! So how does one deal with region lock on connections via Steam?

#

And that evening is meant to all of you, wherever you are. Evenings are the best.

#

My current test with Mr.Aussie has him connecting for a couple seconds, but then disconnected. This has been tested all over US, so seems to be region based

orchid cairn
#

@twin juniper - are you using 480 gameID? that one is region locked to prevent abuse

#

afaik, once you go through greenlight and are approved, you wont run into that issue

#

case in point, rocket league i know i can connect to servers hosted anywhere in custom games

#

fellow aussie here too btw 😃

thin stratus
#

Rocket League doesn't use Steam Server or?

#

What I heard is that Presence base listen servers are region locked and depend on friendlist etc

#

Dedicated servers don't use that so they should be fine?

red ledge
#

@thin stratus nope, friendlist doesn't matter even, tried to join a listen server with someone from another country but we couldn't find the session

#

maybe because of the 480 app id, maybe something general, dunno.

thin stratus
#

Looking at Dead by Daylight and other UE4 Games, such as ARK, the problem is pretty consistent

#

That's why I'm pretty sure Rocket League uses their own Server System

red ledge
#

yup, most likely

#

they kinda havo to to sync up all the data from the different platforms, I think.

thin stratus
#

Also that they have you in a lobby before you search

wary willow
#

Quick newb question to all your fine folks.

If I wanted to do a Vive Multiplayer LAN game, I should be able to just set OnlineSubsystem to NULL in the config file OR is that the default to OnlineSubsystem if I don't put all the SteamOSS stuff in the config file?

Also, if I don't want to use a plugin to replicate motion controllers, then I need to replicate the movements manually on tick? Is that correct? (In BP or C++)

polar bridge
#

you need to set it to null

#

i believe in your build you need to even add the onlinesubsystemnull dependancies

#

second question...no idea 😃

wary willow
#

😃

orchid cairn
#

is there a list of supported online subsystems somewhere, and preferably also with what features each actually supports?

wary willow
#

well

#

in 4.14 and 4.13 if I remember, you can see the plugins

#

that'll tell you which one are supported

polar bridge
#

facebook, null and steam are the only ones i know of

wary willow
#

google play is one also

polar bridge
#

looks like nulll, amazon, facebook, gamecircle, google play, steam, oculus

#

ios*

orchid cairn
#

i can see the list in plugins, any idea how to tell what each supports? or just trial and error? (documentation has always seemed to be a weak point for epic)

polar bridge
#

i doubt it

#

documentation does indeed suck

#

especially when it comes to online subsystems heh

wary willow
#

documentation in general aye

#

Lucky we have this community

polar bridge
#

worst case scenario you can dig up the source code too

#

had to do that quite a bit recently

obtuse zinc
#

So I'm trying to make an online multiplayer fps type game, and I have most of the mechanics in place and they all work locally, but I have no idea what im doing when it comes to writing the game mode and checking for server verification on hits and stuff like that. Does anyone have any good places for me to start? Ive googled a shit ton and the instructions seem kinda iffy. I managed to get my railgun particle effect to replicate which is awesome, but I'm not sure at all what im doing lol

orchid cairn
#

check out generic shooter in the marketplace? has everything you're after, 100% BP based

obtuse zinc
#

ok ill take a look, thanks

#

i guess i should utilize the marketplace more huh? lol

polar bridge
#

do you understand how roles work and how authority works etc?

obtuse zinc
#

honestly? not really. I read some stuff in the ue4 networking documentation

polar bridge
#

would probably start with reading up on that, some of the doucmentation is decent for that

orchid cairn
#

check out the networking guide by exi too... that thing is a bible for replication and online

obtuse zinc
#

awesome, thanks a bunch guys

#

really appreciate it

#

been pulling my hair out the past week lol

polar bridge
#

its not easy

#

but once you get your head around it, it's not bad

obtuse zinc
#

Awesome

polar bridge
#

your listen server or dedicated server, more or less acts as the authority in any case

orchid cairn
#

*most cases 😉

polar bridge
#

sorry, yeah, if the actor is spawned on the client then the client is the authority

#

depending on what type of game you're making, you need to code RPC's which will call the server from the client

obtuse zinc
#

So Ill read about this stuff in this compendium im guessing but say im spawning a rocket that a player shoots. I want to spawn that on the server?

polar bridge
#

yes

obtuse zinc
#

that would probably explain why it replicates when player 1 shoots but not when player 2 shoots

polar bridge
#

if player 1 is acting as a listen server, yes

obtuse zinc
#

yeah

#

okay that makes more sense

#

learning already lol

orchid cairn
#

generally writing code for a listen server and dedicated service is quite similar

#

because even for the player who is the listen server, you can use a server RPC call for spawning a projectile

obtuse zinc
#

ohhhhhhh

#

okay

#

yeah i used an RPC for my particle for my railgun

#

and that works great

polar bridge
#

i think the way shootergame works is it actually replicates a boolean "IsFiring" then when the server see's thats set to true, determines if they can fire again

obtuse zinc
#

so i had a question about shootergame

#

because i found that example the other night

#

is there actually code for shootergame anywhere?

#

Or is it just the explanation of how parts would work

polar bridge
#

it was all there before, but, i don't know if they keep it up to date any more because it was a lot of work

obtuse zinc
#

gotcha lol

polar bridge
#

if you go back to like 4.12 or something, the source is definitely there

#

and it's not that much different

#

oh, no, it's still there

#

all the source should be available

obtuse zinc
#

am i blind? lol

polar bridge
#

if you created a project with it, you probably have to generate the solution by right clicking on the uproject and "Generate project files" or something like that

obtuse zinc
polar bridge
#

in the epic games launcher, learn tab, at the bottom you can download it

obtuse zinc
#

sweet jesus

#

thank you lol

polar bridge
#

welcome 😄

obtuse zinc
#

i should have come on discord way earlier haha. oh well, at least i learned through my struggles. this is a process 😂

polar bridge
#

the learning curve of UE4 is steep, there's no doubt

#

probably the biggest drawback of the engine imo

obtuse zinc
#

But every time i learn something new my mind is blown at how awesome it is lol

polar bridge
#

like most things in programming, it all has a ryhme and reason

obtuse zinc
#

Yeah I had to do a quick VR project at work and I wanted to use UE4 i just didnt know it enough so it was easier to do it in unity without knowing anything about the engine

polar bridge
#

i've only briefly used unity, doesn't seem as powerful but seems much easier to learn

#

found it odd there's no visual editor for shaders

obtuse zinc
#

its definitely way eaiser to learn, but i dont think it's as powerful. And it doesnt have blueprints.

#

Yeah i had to write all my shaders i used

#

luckily they were simple, but still

polar bridge
#

i believe UE4 was built with networking in mind from the ground up as well

#

so for me it was a no brainer when making a MP game to use UE4 hehe

obtuse zinc
#

Oh i havent seen this

#

Looks pretty cool

#

I'll definitely read through it

fierce birch
#

@polar bridge I'd love to see people making physics based MP games with this MP ready engine 😃

polar bridge
#

i'm not sure i understand? 😃

#

i'm certain there's MP physics based games been made in UE4, if that's what you mean

fierce birch
#

I mean that ue4 doesn't really implement MP properly for any fast paced game other than ones that use characters

polar bridge
#

like what?

#

no engine will support some crazy niche that requires tons of replication, no

#

honestly i was told UE4 wouldn't work with my project too, seems to be doing fine so far heh

fierce birch
#

yeah, we could debate on this but it's pointless

#

in the end, ue4 replication does work for most things as long as you don't need prediction and if you do, it's there only for characters

polar bridge
#

yep, pretty much why i don't use replication 😄

#

i'm doing a game with slow moving bullets and started with replicating them, had to move to RPCs that mimic what it should look like because replication just couldn't keep up

#

but, i think if the networking is used properly, you can push it quite far. replication, no. it's just...too much for the network

orchid cairn
#

@fierce birch ... ask me that question again after we announce our title for greenlight 😉

fierce birch
#

@orchid cairn heh, I didn't say you couldn't do that

#

just saying engine doesn't do that itself

orchid cairn
#

yeah it would be awesome if it did, but oh well

#

character class is a great learning tool for the right way to do it

fierce birch
#

yeah, I'm in the middle of doing my own system as well, I don't really like the CMC though

#

it's 10k lines of c++, in a single file 😄

orchid cairn
#

lol yeah, that part kinda blows

fierce birch
#

it's a text book example how you shouldn't write c++

orchid cairn
#

you've seen gaffer on games obv?

fierce birch
#

yeah, it's a really good site

orchid cairn
#

he used to have a heap more examples, i think he's taken them down now that it's a business for him

fierce birch
#

yeah, I've got the additional examples too by supporting his patreon for one month

#

I didn't mind though, was happy to give the man some support for what he's doing

orchid cairn
#

for sure

fierce birch
#

Rocket League networking works like that too

#

(talking about the last page sample, not how you figure out headshots)

orchid cairn
#

rocket league is really good, they actually go back into PhysX and rewind whenever there's a discrepancy, so it's ridiculously accurate

fierce birch
#

they don't use physx

#

they swapped into bullet

#

I plan to do rewind and resim selectively for only things that have collided myself

#

but I have custom physics movement on my project that's not relying on physx sim at all so it should be pretty easy to do when I get to the multiplayer part

#

all the core parts are there

#

(that allow it)

orchid cairn
#

i'm pretty sure OmaManfred on the forums works on rocket league... every time i look up anything physics and vehicle related he's all over it 😃

fierce birch
#

I've talked with the guy on IRC

#

not sure if he's here

#

I don't fully agree on his replication logic but if it works for him, I guess it's cool 😄

polar bridge
#

curious what you're working on that requires that level of replication?

fierce birch
#

a racing game

orchid cairn
#

fast paced physics based game

fierce birch
#

I have completely custom physics

orchid cairn
#

you haven't tested with latency yet?

fierce birch
#

and by that I mean, no physics engine for anything but collisions (I do similar thing that CMC does actually)

polar bridge
#

interesting

fierce birch
#

well, I'm not at multiplayer stage yet, but latency shouldn't be an issue with that server reconciliation + clientside prediction

#

that's what that stuff is for

#

I expect player vs player collisions to be the biggest issue but will see how it turns out when I get there

#

there are plenty of things one can try to make it feel good

#

other thing that will definitely require some trial and error is the starting grid

#

like how you get all cars moving at the very same time

#

it's an issue with many racing games, but some actually get it solved nicely

orchid cairn
#

you can "cheat" it a bit... you have players revving the engine before you start, so you just use that when the server ticks over to start the race. it means on your authority everyone starts moving the same time, even if there's lag

fierce birch
#

yeah, I've thought about that

orchid cairn
#

then over the next few ticks you'll replicate and sort it out

fierce birch
#

that you'd use the throttle prior to greenlight to make the cars move

#

or if there's no throttle, car would sit still

#

one racing game "nudged" the cars forward at green always, but that felt wrong if you didn't press the throttle

#

basically it automatically applied throttle to all cars on greenlight and then transitioned into players values

orchid cairn
#

yeah that seems a weird way to do it

fierce birch
#

I guess one option would be to sync the players based on their ping and do non predicted sim on start, so it would only do things that server gives back, since cars are not moving fast at that stage, player might not notice the delay at that stage

#

and then get the predicition going after few hundred ms

orchid cairn
#

also comes down to whats more important for your game, the "feel" for the player, or accuracy/fairness

#

you could also do some funky math with sending the time to race start to the client, then calculate based off ping the "real" start time and go from there

fierce birch
#

it's not a kinda game where seconds matter on finishing the races, so only thing that matters at starting grid is that everyone just moves forward when lights go green

#

yeah, that's kinda what I meant by syncing players by their ping, by offsetting clients own the race start time by it

orchid cairn
#

just keep in mind even if you go that way, you'd probably want to resync with the server fairly quickly, especially as everything would be bunched up so collisions are a high possibility

fierce birch
#

yeah

#

it should only happen at the first second of the race

#

probably a lot shorter period

#

would be curious to know how different commercial games do that though (where it actually works properly)

#

when it comes to racing games (or any other more niche genre), the knownledge isn't that openly shared

orchid cairn
#

so you're not using physx at all? just your own physics code?

fierce birch
#

I use physx for sweeps and traces (basically collision detection)

#

same deal as what CMC does basically

#

I run my own physics integration at fixed time steps

orchid cairn
#

then handling the actual collision yourself?

fierce birch
#

yes

#

I've been converting things to double precision lately

#

which would have been way easier if ue4 actually supported doubles 😄

orchid cairn
#

lol

fierce birch
#

there's some things on FMath that are templated

#

but most things are not

#

and I need to use my own versions for tranform, vectors, quats etc as they are all float based on ue4

#

in hindsight, I probably should have stuck with floats but it's just too tempting to get the additional precision when it's possible

#

physx and ue4 visuals are is still single precision so collsions and raycasts would still be limited to that but actual sim itself would get double precision

#

I kinda want to stick with physx for that though as it's so deeply integrated that it's just more convenient to use it vs bring in another physics engine and sync things to it manually (and there's literally no point in me doing the collision engine myself)

orchid cairn
#

when you get to the multiplayer stage of it, let me know, will be interesting to see your aproach 😃

fierce birch
#

I plan to do the same approach as gambretta site described, it should work really well in theory for this kind of game

#

but yeah, I'll probably post more here later on 😃

obtuse zinc
#

dang you guys are crazy. here i am trying to get a basic server set up and youre here talking about custom predictions and stuff. one day lol

wary willow
#

I'm in the same boat

#

So no worries @obtuse zinc

#

But I'm trying to do it in VR

obtuse zinc
#

Haha

wary willow
#

😭

obtuse zinc
#

you making a VR game?

fossil spoke
#

You will get there 😛

wary willow
#

I know I know

#

I just need to get started

#

😃

#

@obtuse zinc I have made VR games

#

But yes, this will be my first multiplayer VR game

obtuse zinc
#

dang thats awesome

stiff wasp
#

@fierce birch you can very much use the same prediction that characters have with pawns. You just have to write your own movement component. If you follow epic's example with the character it's not too difficult to make your own.

fierce birch
#

@stiff wasp I can but I don't want to

#

epic thing works with variable time steps and has been designed to work always like that

twin juniper
#

@orchid cairn Late answer, I actually got 13h/sleep wooh. No I am not using 480, I have a released game. Hmmm according to @thin stratus's conversation afterwards I'm guessing this is how it is... because I've had terrible latency without being disconnected, and it was at the exact same moment every time (and my friend also pointed out that he had the exact same experience with Onward, connect, enter game, then disconnect)

brittle sinew
#

Onward uses Unity, right? So you might want to look at the Steam side of it more than UE4

native axle
#

Can anyone help me with disconnecting from the client-side in blueprints?

native axle
#

All good got it working

red ledge
#

I'm having a lot of weird behaviors when testing in the editor with two players on 4.14.1

#

however if I made it a dedicated server with 2 clients everything works perfectly

#

is it a known bug?

#

I don't think the code is fucking up at any point

#

a lot of stuff are actually working only with a dedicated server only, like when I do a sphere trace and I know that It doesn't hit, the damage gets done to the server regrdless of the distance and vise versa

twin juniper
#

@brittle sinew Yes it does, and I do believe that it's steam related. Was hoping someone here had experience using both

#

@red ledge That widget is being made on both server and client, put a "Is locally controlled"-check before it

red ledge
#

@twin juniper Yeah forgot that. added the check but it still doesn't affect the problem where the widget doesn't appear on the server, don't know why.

#

solved the affecting over a distance tho, it was just a UI problem

twin juniper
#

@red ledge what do you mean widget on server? do you mean the host? or are you trying to replicate it to all clients?

red ledge
#

nope, it's just a widget that shows health, the problem is that it doesn't appear on the host for some reason

twin juniper
#

Not sure, why don't you rig it with strings server/client and hos side to see which events are firing where and when

red ledge
#

did that, appearntly it was a problem with some sort of a lag or code speed

#

some other widget code that should have been called before this on the player controller made the widget on the server fuck up dunno why

#

thanks tho

twin juniper
#

I just wanted to report back on the topic of steam region lock. I tried between US and Europe and everything worked the way it's supposed to. And since the Australian could connect but got disconnected, I think it's just the shitty copper wires and the distance that caused the disconnections because of too many lost packets

wary willow
#

@twin juniper SO, you still have region lock on steam right?

twin juniper
#

There's the region lock for buying games in another region, but I had no issues to connect to someone on another continent if their connection is decent

#

And I didn't have to contact valve to change it (which I read on some forums)

#

However! I think appID 480 is different

#

And that one is locked

#

But using my own I didn't have any issues (atleast US-Europe)

heavy mantle
#

Hello guys, just a little question, someone already follow the big tutoriel made by Unreal engine about networking ? Just want to ask some question before start the tutorial

twin juniper
#

@heavy mantle The one made by Wes? W lobby and menus?

fleet sluice
#

@twin juniper do you happen to be using dedicated servers? I could use a hint or two debugging mine

dense citrus
#

How i can replicate my Movement Variable , those are importent for my animation BP

night jay
#

Use the add controller input nodes

#

And make sure your character BP is set to replicate

#

You can do that in the details panel by clicking on your root component

dense citrus
#

I got it , thx to eXi

delicate basin
#
lapis forum
#

is there any reason why adding a replicated component should cause the client to crash? or does that sound like a bug?

twin juniper
#

@fleet sluice I do not, I'm relatively new to networking so I'm taking it one step at a time

#

@lapis forum What type of component is it?

lapis forum
#

any component

twin juniper
#

@lapis forum Well, if the actor itself is replicated then setting a component to be replicated should not be necessary

lapis forum
#

in most cases, yes

#

my intention for replicating the component is to use replicated variables on a custom component

#

if I don't replicate the component, even if I replicate the actor none of the variables are replicated as the client has their own version of the component

#

at least that's how I understand, I could easily be wrong

twin juniper
#

@lapis forum I tried to use Child Actor Components where the actor of the child actor was replicated, and I could just not get it to work. There might be a similar issue with custom components

#

In that scenario, setting the child actor component to be a "replicated component" didn't change anything

#

So I just spawned the actor on the server and attached it go get around the problem

lapis forum
#

it's not just custom components, even adding a box collision component and setting it to replicate crashes the client 😦

#

I suspect I'll have to do something similar with spawning an actor, although it's considerably more hassle in the context of what I'm trying to do

wary willow
#

What would cause players to lose controls in a packaged MP game?

#

As in no one, not even host could use their controls. But editor works fine.

#

Works just fine in editor, but no go on packaged.

brittle sinew
#

Is that an arrow I see there?

#

I remember someone had the issue where arrows don't get packaged, so when their movement depended on one, it wouldn't work

wary willow
#

nah

#

those are just for the spawn points

brittle sinew
#

Ah, ok

wary willow
#

it's just weird that it works in editor but not in packaged, there are no errors or warning in log

brittle sinew
#

Are you getting input events to fire at all and it's the PC exchange that's not working? Or do they not get sent

thin stratus
#

Are you sure the Players actually connect in the standalone?

wary willow
#

Yeah

#

everyone was connected to the game

#

I feel like this may not be a replication issue, but posted here just in case it could have been

#

Could be some sneaky 4.14.3 bug

supple musk
#

Hi, would someone know why when i uncheck "use single process" ( to use seamless travel PIE ), i can't connect to my local listen server anymore ? 🤔

#

( seamless travel isn't checked, i just uncheck the "use single process" box and it doesn't work anymore)

polar bridge
#

i have a player scoreboard and when the play quits, i want to remove their name from the scoreboard. i've tried making replicated calls in the PlayerState when they quit, but i'm guessing it's gone by the time it tried to do the RPC. where would be a good place for this code?

#

oddly enough if i check the player state it actually shows up as a valid state even after the player leaves, which confuses me on why the RPC doesn't work heh

cyan light
#

@supple musk Your game is not a multiplayer programmed game?

supple musk
#

@cyan light Don't know what you mean by that, but I use "open MapName?listen" in the first client, and i get others to join with "open 127.0.0.1". Works with Use Single Process. Does not when Use Single Process is unchecked.

cyan light
#

well, unchecked single process means server and client

supple musk
#

what do you mean

cyan light
#

listen server means a process that has both the server and the client

#

unchecked single process means

#

ue4editor game.uproject -server

#

ue4editor game.project -game

#

both ran at the same time

smoky ore
#

is it possible to have a UFUNCTION that uses validation, while also at the same time being an overloaded function?

compact oyster
#

yes

red ledge
#

@polar bridge If I remember correctly, there's a TornOff function or something when an actor stops being replicated

polar bridge
#

will give that a shot when i get home, thank you!

chrome bay
#

OK

#

Anybody know, if it's possible to host and join multiple Game Sessions at a time?

#
#

@thin stratus may already know this..

thin stratus
#

Well I would assume Rocket league does what you want

chrome bay
#

That is a good point..

thin stratus
#

I guess they join a Session and then search an external master Server for actual games

#

Probably possible to use the Steams Master Server for it

#

So you join friends with the Friend Invite stuff

#

And then the Host searches and ones you found a session you tell all clients to travel to that new server including you

chrome bay
#

Yeah that part seems simple enough... I guess I'll just have to give this a go

thin stratus
#

You just have two destinguish between friendlobby session and actual game session

chrome bay
#

Also why I'm not prototyping this in BP first I do not know.. oops

#

yeh

thin stratus
#

Cause BPs can't do that?

#

:P

chrome bay
#

maybe :p

thin stratus
#

The Session Nodes have 0 stuff that helps you there

#

Neither can you tell clients to join a session via bps

chrome bay
#

Although there is that advanced session plugin which is pretty sweet

#

been having a glance at it today

thin stratus
#

Saw it. It does what it needs

#

but hacky af

#

Mostly having custom Structs and then having a C++ function that converts everything by hand

#

to the C++ version

chrome bay
#

yeah that parts v annoying

#

lots of duplication of existing C++ stuff too

fresh saddle
#

@chrome bay my way of doing it was subsystem as the inital party host (allows voice coms and everything nice) then sending all the party members to a server by giving them all a console command to enter (open 74.24.214.29 as an eg)

#

Its lame and doesnt allow for nice features but it works

chrome bay
#

Yah the tough part is going to be segregating players into groups... like I don't think I can have a player be a server of one session and the client of another :/

fresh saddle
#

Once you open a connection it should close any preexisting connections