#multiplayer

1 messages · Page 306 of 1

fresh saddle
#

Oh you want your players to remain in the party?

chrome bay
#

yah

fresh saddle
#

Ah.. yeah as I said, it has no other proper functionality other than being able to all join one server and what else

thin stratus
#

You might need to handle that by saving who's in parties

#

And when the game is over you just recreate teh group my hand

#

or @rough iron Knows something

fresh saddle
#

Yeah there's definitely ways of doing it

chrome bay
#

Yeah the only other thing I can think of is tracking it all manually...

#

but would probably lose features in the process

thin stratus
#

You sure that steam doesn't have some kind of interface for that?

chrome bay
#

nah I checked 😦

#

IOnlineSubsystemSteam::GetPartyInterface() return nullptr;

#

#cry

#

in fact they all do, I think that party interface is for Xbox / PS4

thin stratus
#

bummer

chrome bay
#

I will hax this

thin stratus
#

What was that Beacon thing

#

Wasn't htat a thing?

chrome bay
#

yeah I wonder if beacons might be the other way to do it...

#

they're supposed to be a way to send super minimal data to a connection I believe

#

gonna have a look

#

ooo

#

in fact... why am I thinking about this when UT probably does it.. ugh

#

yep.. UT literally does everything I want

#

#RIP

rough iron
#

If you like we can chat about parties tomorrow (got a bbq in a moment)

chrome bay
#

sweeet

#

in the meantime Imma study UT sauce

rough iron
#

The idea is actually simple, and on e you know how to use beacons you can vreate aome awesoe matchmaking systems

fresh saddle
#

If you find something, fill me in. Been too busy to work on my hacky implementation and it'd be nice to see other solutions

chrome bay
#

yeah UT seems to handle parties via beacons... which is pretty sweet

rough iron
#

I did the matchmaking for 4 games so far (all using beacons)

chrome bay
#

and turns out UParty is an actual thing

thin stratus
#

@rough iron Srsly mate, how often do you have bbq?

#

It's -10° in germany ;-; let me live at your place

#

@chrome bay Think about something you want and put a random letter infront

#

UMakeGameButton

#

Wouldn't surprise me if that's in the engine

chrome bay
#

haha probably

chrome bay
#

ok so this party thing is definitely an engine supported thing - but jesus h christ is it a mindfuck

#

UParty is more accurately a Party Manager.. and you can join/host multiple parties of different types.. and each has a gamestate. Most communication seems to be done via beacons to keep net traffic / load times to a minimum

red ledge
#

would you mind sharing what you find here etc? I'm interested and it might help some other people

thin stratus
#

Yep, make us some documentation about it :D

chrome bay
#

will definitely do so when I work out what I'm doing :p

#

currently I can't run the editor when including the 'party' module, which sucks :/

red ledge
#

is that a bug or how it's supposed to work?

chrome bay
#

ok nvm got it, also had to enable to OnlineFramework plugin... ugh

red ledge
#

if you don't have time but son't mind leaving general comments here, I would appreciate that as well

chrome bay
#

yeh happy to do that

red ledge
#

there's so many things in this engine that you never know unless you stumble by them accidently in a chat or a forum post

chrome bay
#

PartyManager->Init(); = crash

#

FML

slender cloud
#

Anyone know of a good tutorial for setting up a 3d scoreboard widget? I have one attached to my character but I cannot get it to update or do anything.

#

Anyone know of a good tutorial for setting up a 3d scoreboard widget? I have one attached to my character but I cannot get it to update or do anything.

chrome bay
#

really depends.. on lots of things

#

with a scoreboard you probably want to just update it using NativeTick

#

too much of a pain in the arse to have lots of objects trying to talk to it to update it

#

just make it pull data from the playerstates

slender cloud
#

I was trying to use interface bp to pull score values from targets. I tried to make it set to 0 on begin play though and it just doesnt do anything.

wary willow
#

Why would you run a scoreboard on tick?

#

It's an event based object

slender cloud
#

not sure if there is a special way I need to add it to my character. Right now I just dragged it in as a child componant

wary willow
#

Anyway @slender cloud look into event based driven umg

slender cloud
#

ok thanks

wary willow
#

I usually use Event Dispatchers

chrome bay
#

Not neccesarily. Score can potentially be updated in many different ways depending on what you're showing on it

wary willow
#

¯_(ツ)_/¯

chrome bay
#

Players also join and leave at anytime

#

Player States can replicate at different times

wary willow
#

And those are events...

chrome bay
#

And if you miss the events, your scoreboard goes out of sync

wary willow
#

Anyway, however you want to create your architecture is obviously personal preference

#

Not sure how'd you miss any of those events you just listed though

#

Unless I just haven't done anything super crazy complicated yet

slender cloud
#

current tut I followed was for a regular pc game, but I obviously cannot add to viewport in VR. all my other logic is set up. Widget componant still says experimental though if that could be the issue

wary willow
#

@slender cloud this belongs in #umg anyway

chrome bay
#

Yeah, dunno why this is in MP tbf..

slender cloud
#

Shit my bad. I was trying to ask in VR. Wrong channel haha

wary willow
#

or vr

chrome bay
#

FUUUUUUUUUUUUUUUUUUU

#

FCoreUObjectDelegates::PostLoadMap.AddUObject(this, &ThisClass::OnPostLoadMap);

#

OnPostLoadMap isn't a UFUNCTION so engine just crashes

#

gr8

wary willow
#

Don't worry @chrome bay once you figure out all the bugfixes, you can try to submit a PR and wait a year or so until Epic decides to use it. Or never use it.

chrome bay
#

and I can't write a wrapper function cus it's private 😦

#

haha yeah true

#

oh wait nvm that's not it

#

`UWorld* UParty::GetWorld() const
{
UGameInstance* GameInstance = Cast<UGameInstance>(GetOuter());
if (GameInstance)
{
return GameInstance->GetWorld();
}

return nullptr;

}`

#

my outer is something else... dangit

red ledge
#

you can also wait for @rough iron to finish the BBQ

#

that's what I hate about UE4 tbh, I love the engine in general, but the lack or docs is frustrating

#

I'm sure there is some stuff only like 20 people know about

#

you will never know them unless you randomly stumble by someone who knows them

chrome bay
#

I wish it was like the Matrix... you just plug yourself in and learn the entire codebase in in seconds

#

20 years of code straight to the neurons

#

Ok I have succesfully created a Party object... that's a start

hallow shore
#

@chrome bay when you finish fighting against the party thing, i would like to hear how its actually work and what you managed to do with those, postmortem kind of thing 😛

chrome bay
#

well so far, I've got a party object working and am just hooking up UI delegates

#

BUT, got a funny feeling there isn't a default party interface and UT is using epics launcher online subsystem

#

which would suck massively

hallow shore
#

its UT thing?

chrome bay
#

well, UT is using the build in party system so I'm using that and the engine sauce for reference

fluid terrace
nocturne token
#

Pro-tip: Be more specific with your question

fluid terrace
#

oh, your right

#

the replication is not working

#

it only responds on the server not the client

#

sry about that

pallid mesa
#

ok, i'm on it, basically Epic's character movement components don't need to be replicated because they already are.
So it is not necesary for you to do the switch has authority neither create a C.E. for calling the jump on server @cerulean canyon

#

i already replied to you on #lounge i'm new in this discord im a bit lost yet.

fluid terrace
#

makes sense @pallid mesa but i kinda just want to know for using it on other instances of the project

#

i will just type here to not bother other people

pallid mesa
#

for using the jump you mean?

fluid terrace
#

the replication part of it is what i am intrested the jump is really just a test of making stuff replicate properly

chrome bay
#

yse LaunchCharacter on the server

#

*use

#

ReplicatedMovement will take care of the rest

#

oh wait nvm

#

alright if anyone can make sense of this class I'll pay them 1 million internet cookies

#

FOnlinePartyTypeId

#

oh wait

#

it's literally a uint32 wrapper

#

ffs

pallid mesa
#

you have to pay yourself 1 million internet cookies

chrome bay
#

lol

chrome bay
#

[2017.01.16-22.46.21:813][181]LogParty:Warning: No party interface during JoinParty()

#

shit

#

I guess that means there's no default party interface 😦

wary willow
#

@fluid terrace also, you might as well start learning proper naming conventions

pallid mesa
#

@wary willow Aside from files, i saw written in many different ways the rep nodes, what is the correct way? OnRep(NAME)? SV_(NAME)?

chrome bay
#

Ok so findings so far... UParty works with IOnlinePartySystem - which has zero implementation whatsoever.

#

The only implementation is through Epic's server system so far, which they haven't released publicly and all relies on having your own XMPP server

#

whatever that is...

#

So basically routing party functions via Steam as if it was an online session doesn't seem to be possible.

orchid cairn
#

pretty sure i know the answer to this one, but i'll throw it out there. is there currently a way in blueprint to access command line arguements passed in to the game? For example, if i was to run "UE4Server.exe -RunServer -Community=SixSeasonsAndAMovie" is there a way for me to access these without going into cpp?

alternativly, does anyone know that if i build as a dedicated server and do the same command as above, if the Options String in GameMode will have that info?

thin stratus
#

@orchid cairn "UE4Server.exe YourMap?Options1=Value1?Options2=Value2"

#

And the Option String should have that in them

orchid cairn
#

cheers @thin stratus - will test with my dedicated server build and see how we go

#

while i've got you, random quick question... in your ballbump demo, you implement your own collision/impulse for when the balls hit... any particular reason you didn't just let PhysX do that for you?

thin stratus
#

Eeehm, haven't looked into that for ages

#

I think I just wanted to have more control

#

My old examples aren't the best anymore. They work but i plan on recreating them properly

#

Learned a lot the past 2 years :P

wary willow
#

Haven't we all

heavy mantle
#

@twin juniper Sorry had some internet issue, yes the 24 video from Wes about multiplayer

#

Just wanted to know if we have something to buy on steam or if we can follow the tutoriel without buying anything :3

bold cedar
#

Over the past 2 years, I have never been able to reliably host or join a game session via IP. Typically, what I need to do, is attempt to host a session, and then attempt to join a session, and then re-host (At which point the other person is finally able to join my game). This also applies to the other person I am testing with, if I am to join their session. This has been the same over different computer builds, projects, and ISPs. Am I the only one?

#

This all being done without using a Subsystem. To join, I am using 'open IP', to host a map in listen mode, I am using 'open MapName?listen . This is also all being done using the ExecuteConsoleCommand function in Blueprints, though results are the same using the console command window. This all applies to all packaging builds. When joining does not work, the game simply does nothing, but will eventually restart the game to the main menu after a random amount of time (For both the person hosting, and the person trying to join)

rough iron
#

@thin stratus we got a bbq atlesat once a week (that's the one sponsored by the company xD), every Thursday at 11 AM, then ocasionally I make my own xD

#

@thin stratus we have about 15ºC atm

rough iron
#

@chrome bay just stared writing all done xD it will take a good while xD

red ledge
#

@rough iron you mean that you are writing on beacons and match-making?

orchid cairn
#

is there a particular reason why a dedicated server build has to be done from source?

rough iron
#

@red ledge yep, I try to make it a bit more general plus some insights in UT

#

@orchid cairn because there are a whole bunch of defines that are being set so strip editor condtent, editor code and client code

orchid cairn
#

ah 😃

rough iron
#

Small bianary size and stuff alike xD

red ledge
#

@rough iron can't thank you enough for this, if you remembered, please mention me when you are finished, this looks promising.

pallid mesa
#

Is there any way to make a GET http vía Blueprints?

rough iron
#

ok ^^

glad wharf
#

@pallid mesa : there is a plugin to use rest API in Blueprint if I'm not mistaken

pallid mesa
#

Well the objective was making It without plugins, i guess we will have to program It on C++ then

rough iron
pallid mesa
#

Great article. Ill be looking through It.

#

Is there any documentation out there about how to gamebridge properly between ue4 and discord?

twin juniper
#

@pallid mesa I recently heard about the api, assuming it's fairly new?

pallid mesa
#

Yes it is New

#

I have already chat communication Squad wise, So if you pertain to one Squad of the game you can chat with only your Squad or with everyone. The thing with discord will be creating a guild chat for that Squad.

#

And execute opt-in at the begining of the match for every member of the squad

#

But here It comes...

#

I know the theory

#

But im struggling with the practice

#

And also the oauth which is another factor to have in mind

#

I would appreciate any kind of guidance or documentation if someone struggled with It. :) It would save a lot of hours

glad wharf
#

Is it me or the network ticking rate is tied to the frame rate? I see that netcode ticking is inside UWorld::Tick...

fleet sluice
#

@bold cedar my first thought is to ask if you forwarded the ports 7777/7778 on each machine you're trying to use? (Server+clients)

bold cedar
#

@fleet sluice The answer is yes

glad wharf
#

@bold cedar : to Vlad or me?

bold cedar
#

To Vlad, my bad

#

Also, the network data could only be acted on each tick, so I don't see why it wouldn't/shouldn't be.

glad wharf
#

the problem is for voice data, I need minimal latency

#

I'm on LAN and ideally I would like to have like phone latency

dense citrus
#

how i can get player name of players over head ? any idea ? get PlayerName but than i see only my name over all players 😄

thin stratus
#

@rough iron awesome :O thanks a lot

fleet sluice
#

@bold cedar sorry, got busy for a while. Did you: 1) use cmd with "ping ip.adress" 2) use a port scanning website/program, to be 100% certain the connections outside Unreal work fine?

red ledge
#

@rough iron just read the wiki, thank you. I'll try to turn the lobby I have into a party session instead of just having a map in the game session for the lobby and another one for the game -if I understood correctly-

rough iron
#

nice it was helpful ^^ There is still a lot pending, for example ensure to cleanup your current state when you swap from serching to hosting

#

but the idea is actually simple, you just hold two set of sessions plus beacons

#

you can even hold more but it depends how and what you are able to advertise

#

even if you destroy a session and recreate it you shoudl always publish your uniqueid, so that others are able to research for your sessions

thin stratus
#

Can you make sure, when you go over the text again, to clear up some of the later stuff about having multiple Hosts together?

#

I got the part of searching and hosting with the PartyBeacon

#

And having the (non listen) party session

#

But when you went into having Hosts join non-complete party sessions, i lost it

rough iron
#

ah ok, think of it as you just create a party session, set it state to hosting

#

the state is just data in the sessions settings

#

so other start joining

#

once the party is full we do not have any listen server set yet

#

so what you do is to start another one

#

the game session

#

and you set it to hosting too

#

so others start joining

thin stratus
#
6 Players per  Team

Host1 on Port 7777 HostBeacon | 2 Clients joined with their ClientBeacon to Host1
Host2 on Port 7777 HostBeacon | 2 Clients joined with their ClientBeacon to Host2
#

Na it's more about this stuff

#

Where you have more than 1 party

#

and combine them

rough iron
#

ensure to use different ports

thin stratus
#

And THEN join the final game session

#

The constellation above is not yet joined together

rough iron
#

7777 party, 7778 game

thin stratus
#

What I understood was

#

If you have 2 parties

#

with each 3 players

#

and you want to join then

rough iron
#

yep

thin stratus
#

Would you do that with another Host and Client Beacon

rough iron
#

that's the idea

thin stratus
#

Or is that handled by a MasterServer that just found both teams and gave them each their game session URL

#

Ah okay

rough iron
#

no, you create a new set of beacons and sessions

#

the game session

#

which all join together

#

on the previous party leaders (from the party beacon session) is set to host

#

so the other leader just send all it's clients the connection data to the new game host

#

and all travel together

#

but all have still their party beacons running pointing to their previous partyleaders

#

that way if you disconnect or finish you just go back where you where

thin stratus
#

Okay who manages this new set of game beacons

#

Like who puts two 3 Player teams together

rough iron
#

your matchmaking code does

#

that's your decision

thin stratus
#

Ah okay

rough iron
#

it may depend on the game type

#

in a Team based game every party would be a team

thin stratus
#

Well take something like Overwatch. Where you team up with 1-5 Friends

rough iron
#

in a free for all game you mix them

thin stratus
#

And it matches you with other teams of variable length together

rough iron
#

exactly

thin stratus
#

so at max it could be 3 hosts with 1 client in their parties

rough iron
#

that's on to the game to decide how to handle it

#

exacly

#

if you see it like a venn diagram it's easier to imagin ^^

thin stratus
#

Na it's more like: Let's say we have these 3 parties. Each has a Host and a Client.
We are currently at the point of them only having the party session and a Host and ClientBeacon.
The 3 teams don't yet know about each other.

Now they start searching, all 3 at a time.
How do I merge them together for the game session?

Do I let them join the game session until it's full?
Do I fuse them into 1 game session with beacons (how? Which one of the 3 parties is the host etc?) and if they are full I let the "main host" search and pass the data to everyone?

rough iron
#

ok so we have 3 parties that already made the first part of creating those right?

thin stratus
#

Yes, each party has a Host and a Client, connected to each other in a party session

rough iron
#

so they are connected to 3 different PartyBeaconHosts

thin stratus
#

Yes

rough iron
#

ok perfect

#

so all 3 hosts start the next part

#

they start searching

thin stratus
#

yes

rough iron
#

if there is nothing hosted all will fail and they will search again or start hosting

thin stratus
#

1 second

rough iron
#

there is the important part of the random, you have to make it a bit random to decide to search again or to start hosting

thin stratus
#

What kind of ServerModel do you have in mind here: Are they searching for DedicatedServers, that might have been hosted by me (similar to Blizz having their servers and Rocket League)

rough iron
#

but using a new set of beacons

thin stratus
#

Or will one of the 3 hosts end up as a listen host

rough iron
#

you will just have 1 listen server at the end, you do not need a listen server to advertise a game on your master server

#

for example you can call CreateOnlinegame without beging a listen server

#

it's just data that is in the backend

thin stratus
#

So the Search Part that the 3 indipendent hosts start, is not for the final server to play on, but for other teams to create a full group?

rough iron
#

yep

thin stratus
#

Ah :D

#

Okay, continue

rough iron
#

once you have the teams ready all hosts will start searching

#

for a new type of session

#

the game session

thin stratus
#

Alright, to team up with others

#

Got that now (need more coffee haha)

rough iron
#

^^

#

the important part in the search/hosting thingy is that is MUST be unpredictable

thin stratus
#

Yes, so one of them starts hosting before the others do

rough iron
#

so it will be difficult for the parties to all host or search

#

exaclty

thin stratus
#

so you don't end up with 3 hosting sessions and no one searches

rough iron
#

add some random delays

#

chances depending on how many player do you have

thin stratus
#

Okay, let's say HostA ends up hosting and HostB and HostC find that now

#

What exactly happens then

rough iron
#

for example if you team size is 5 and you have 4

#

just host

#

xD

thin stratus
#

(It's still all beacons, right?)

rough iron
#

yep

#

all beacons and sessions

#

not a single travel

thin stratus
#

So now you are at the point where you have the venn diagram

rough iron
#

yes we are merin

#

lets go back to the example

thin stratus
#

Where PartyA, B and C have their part and they are connected to the game session

rough iron
#

we had A,B and C

#

let's say C starts hosting

#

and A and B finds C's session

#

A and B sends a new reservation request to C (all using the new set of game beacons)

#

let us say that the game mode is for 3 teams and 3 players per team

#

and all parties have 3 players

thin stratus
#

Okay, at this point, cause our example allows it, every reservation succeeds

rough iron
#

exaclty

#

all fine an full

#

now you may just add a timer to start the travel process, it's actually prittuy simple

#

we now that C has a game session

#

so all what we need to do is that C sends an RPC to it's client beacons and to A and B to start traveling to his session

#

in turn A and B when yhey receive that request from C they just forward the request to join C to their own clients.

#

once lil note

#

when C starts hosting it's own clients have to join the game session too

#

becasue they will be always with him

thin stratus
#

Okay, one sec again. so before that RPC goes off, we only have a Beacon Connection.
After the RPC and the joining, we have a correct connection like we normally have, where (if you forget about the beacons for a second) every player is connected to the host of PartyC

#

party session stays in tact, as we want to recreated (or keep) the parties for after the game

rough iron
#

After the RPCs (C->[A,B,Cs clients] B->[clients] A->[clients])

#

exaclty

#

so just after all those RPCs every player will be in the game session of C

#

there is where you actually start the travel to C

#

for the game session

#

so for a client of A

#

it's party session host is A while it's game session host is C

thin stratus
#

And the clients of C can actually be in the game session of C AND in the party session of C?

rough iron
#

yes

thin stratus
#

That's cool :O

rough iron
#

in case of C's clients

#

both hosts are C

thin stratus
#

Steam does support having these two sessions at a time?

#

Or do they have some special cases

rough iron
#

you can create more than 2

#

but only 1 lobby session (lobby is a steam type)

#

and only one can be advertised atm

#

so have to switch between them

#

recreate stuff and so

#

but yes you can

#

xD

thin stratus
#

So only advertising needs to be switched

rough iron
#

yep

thin stratus
#

A HostBeacon can, while having clients, switch the advertising state

#

Do I actually need to name them "game" and "party" or can I have my own names

rough iron
#

the host beacon is just a socket you use to maintain the mesh

#

you should name them using those

#

they are hardcoded

thin stratus
#

good to know

pallid mesa
#

Are we on a steam enviroment or just ue4 Enviro?

rough iron
#

that's so that UE creates different session types depending on the name

#

UE4 env for now

#

every platform needs it's small teaks after it

#

for example when you start the travel

#

A travels to C

thin stratus
#

Steam only the advertisement thing or is there something that is even more important?

rough iron
#

what do you mean?

thin stratus
#

Does Steam need some more changes to the Logic than swapping the Advertisement State of your session?

#

Or would everything else of the UE4 environment apply like we discussed in the example

rough iron
#

irrc you only update your settings

#

I had some engine changes to actually swap stuff but it's just for convinience

#

keep in mind that when you search you apply filters

#

so can search for lobby sessions with state needsplayers

#

or needsplayers is the number of players needed

#

that way you can even merge them better together

#

and make the cyclkes you like

#

that's on your own imagination xD

#

for example

#

I have my party with 2 players and I host

#

I still need 8 players to join me

#

so my needplayers is set to 8

#

there may be another party with 8 players which is searching

#

so that searching party might just sort their sort result to find parties with 2 players in need

#

it finds me and booom I got a 10 player game xD

#

the basic idea remains, you group all together in search/host cycles

#

the two session system is just there to be able to go back to your initial party

#

in Gears3 (no idea if it's the same in 4)

#

you create your party host in the main menu

#

so your mates can join you there

#

and then you just search to fill up the missing spots

thin stratus
#

What kind of information sharing does the beacon system allow?

pallid mesa
#

All this stuff related (steam, party system, HTTP requests), do ue4 have plans to make it easier to Blueprints scripters So they dont need to go through C++ or you think that would not be posible

thin stratus
#

Can I easily display information of everyone in the lobby to the others

rough iron
#

You can customize it with your own RPCs, that's what UT does

#

so you can share the data you like

thin stratus
#

RocketLeague, for example, shows the cars in the main menu of your friends if they are connected

#

So it's basically the typical 3 RPCs

#

And the Server probably has events that trigger when someone joins, or?

rough iron
#

@pallid mesa no idea, making it easy is hard xD because it's advanced

thin stratus
#

It#s still an authority based system inside of the party, right?

rough iron
#

@thin stratus exaclty, while the cars in rocket legue is someting different

#

in steam you can set data per player, and others can read that xD

#

in live/psn you set extra dara in your player state

#

so you just decode/encode what you want

thin stratus
#

So the party host shares the steam ID to the clients and they download the data from there?

rough iron
#

the party host has the steam id of the owning player

#

the cars list in rocket legeue is not done using beacons

#

it's just data of the player state steam sets or retrievs

thin stratus
#

No but the BeaconClients need to know about the other BeaconClients

#

So the BeaconHost needs to share the list of Players at least, or?

rough iron
#

you know your friends so you can requst it from the friendlist

#

yes you got that info

#

every time someone enters/leaves

#

you get it upadted

#

you know each other

thin stratus
#

Does a BeaconClient know other BeaconClients without me sharing anything by hand?

rough iron
#

you get their uniqueid, you could open their profile

#

send friend reuqests

#

yes, it's there by default

thin stratus
#

Oh cool

rough iron
#

all joining/leaving error ghandling is there

#

out of the box

#

the nice thing is that's faster and saver than using UConnections

thin stratus
#

Then just one last question, Steam related:

I know Steam has 2 clouds. A Global Game one and a Personal Game one.
Where would I store the Data of the selected car so other can use the uniqueID to fetch that?

rough iron
#

I think when you advertise your player state you could set it somewhere

#

or when you connect to a host beacon you just create a new RPC to senbd that info to the host

thin stratus
#

PlayerState != the one of UE4 ,or?

rough iron
#

which then sends to the others

#

yep not the UE4 one cD

#

xD

thin stratus
#

:D okay, freaking names

rough iron
#

^^

#

it's ways better building matchmaking that way then just joining a server

thin stratus
#

Okay cool! Thanks a ton for all that information. That's enough for me for now. Make sure to pin your Wiki once it's fully build
And I will check if I can add something to it when I have time (code examples or diagrams)

rough iron
#

^^ cool xD guess a lot of the conversation can be added xD

thin stratus
#

Yes, I think a lot of this can be packed into one venn diagram (as you said) and a flow diagram, that shows the steps from searching to later combining the sessions

rough iron
#

yeah ^^

pallid mesa
#

Im learning rn

#

XD

rough iron
#

^^

#

a good matchmaking system is a lot of work

#

and a ton of logic xD

pallid mesa
#

Basically what is missing in my game rn is a party system

#

So...

rough iron
#

also keep in mind that I left a lot out, for example splitscreen

#

you may already have some players in your party

#

you may decide to make functionality to not go back to the original party

#

because your game is different in pace

#

it's a very game specific topic

pallid mesa
#

What i was thinking for the party system is having a counter for the party members and look only for matches with good to worst ping with N empty spaces in one team

#

But thats the easy part.

rough iron
#

there is a lot that you will need, and do not make too much at once

#

The random part is often left out

#

and it is a vital part to make working properly

#

there are a lot of simple things that are very good to take into account

pallid mesa
#

Im seriously thinking about building some state and sequential diagrams

rough iron
#

in our first iteration try to get the search/host cycle stable

#

using only simulations

#

an excle file should work xD

thin stratus
#

A really basic system that only matches parties and then joins a game is probably already a lot of code, but having an example that doesn't have game specific things would be usefull

rough iron
#

so you know how many players do your system need to be usable

thin stratus
#

That's why I have a private project on github with fundamental Session code

rough iron
#

I would love to be able to just pickup my previous code xD

thin stratus
#

ShooterGame is a cool thing, such as UT, but it's so much extra code that one doesn't need to start

pallid mesa
#

I always say thanks to UE4 for creating UT

thin stratus
#

Not yet looked into it, as I didn't need something from it, but yeah the open code is awesome i would think

#

@rough iron Always surprised how much freaking stuff you know about the multiplayer things

#

Epic should just put your brain online for theri documentation

#

@chrome bay Will love you for that information i would guess

pallid mesa
#

I was really impressed because is all about self researching i wish i had time to mess a little bit more with all those specific aspects of the engine, ill start building as soon as i have my ideas clear maybe i'll ask you/contact you in a while, thanks for the article It really helps out @rough iron

red ledge
#

that's a lot of informations. thanks @rough iron ! I'll look at it later as well, do you have a problem if I mentioned you later for some questions?

#

I have too many weird hidden things that I'm trying to understand how to use in the Engine right now but I'm very interested in multipler things as well.

wary willow
#

OPness has occured from 8am on here

rough iron
#

@thin stratus, @pallid mesa, @red ledge thanks ^^ atleast all those years served for something xD

#

@thin stratus or they just hire me xD just kidden xD I actually sarted all the matchmaking stuff when Phsyonix was working on Bulletstorm for the PS3 using GameSpy (RIP) and I had a lot of chats with Corey Davis which was in charge of their solution xD so we ended up sharing a ton of stuff on the old UE3 mailing list

thin stratus
#

@rough iron Awesome, should always make sure to pass knowledge on

#

Why reinventing the wheel :D

rough iron
#

yep ^^

chrome bay
#

Ah hey guise

#

Looks like I have some stuff to catch up on...

#

I was looking at party system yesterday - unfortuantely there's no default interface for IOnlinePartySystem - so I'd have to write my own, which unfortunately means direct UDP socket stuff

#

which I've a) never touched before and b) still results in disconnets when you transition to a new game. The latter could easily be solved I think but the problem is I'd have to write my own party system that supports voice etc.

#

Epic's system for UT4 actually uses an XMPP server hosted by Epic services - but that would cost and I'd be even more useless trying to set that up probably, especially given that UE4's XMPP system has no voice support built in.

#

Either way, going to be a hefty amount of work to use the Party system - which is a shame because it looks really solid.

native moth
#

Just a general question. Spawning of a pawn on session connect, which kind of blueprint would you guys handle that in? At the moment Im using GameModes but it seems like the "Begin Play" only fires on server start, and not when a session has been joined

brittle sinew
#

You'd want to use the GameMode, yes. But you should look at how the flow occurs when someone joins

#

You wouldn't want to use BeginPlay

thin stratus
#

@chrome bay Didn't really sound like you need that stuff based on what @rough iron said.
You are basically using the Sessions System for this as far as I understood

#

But instead of hosting a game session and starting a listen server directly, you are starting a party session
and work with the beacons

#

And Steam supports that out of the box

chrome bay
#

So basically my wierdness is that I want a persistent 'party' that can be set to 'Invite Only' or Private etc - that your friends etc. can join. You then join that and the party hosts chooses what the party does.

The difficulty is when is comes to 'hosting' a session - I want players to be able to host a session that other public players can then join - but this 'session' is a secondary lobby of sorts, and whoever is the host of that session chooses the gamemode, the game rules etc. Once enough public players have joined said session (all players can talk to each other here) - they then transition to the 'in game' session which is the match itself - but when the match finishes, ALL players in the match should return to that lobby.

brittle sinew
#

@native moth unfortunately, most of the functions that AGameModeBase use aren't exposed to BP. So completely overriding the default flow would be really tough only in BP

chrome bay
#

The idea being that once a game is over, then can choose to do another one if they wish

thin stratus
#

@native moth Check "OnPostLogin"

#

@chrome bay That is exactly what Moss explained

chrome bay
#

ok that may work then

native moth
#

@thin stratus @brittle sinew Thanks for the heads up. Im looking into OnPostLogin... No idea how that missed me 😃 Thanks guys

thin stratus
#

You start a party session, not with listen but only advertised. Others can find that by searching for other party sessions

#

This is done with the Beacons

#

So the connection for the party is made through beacons and persists

#

The host of that party session beacon then decides what to do

#

Searching for games for example

#

The rest is described above in our discussion

#

They bascially have thier party session and then the host of that searches for game sessions

#

If they can't find one after x tries (randomly) they will host a game session in addition the teh party session

#

And other can join etc. The join process then is the HOST joining the GAME session of another HOST

#

still with beacons but on another port

#

so the party runs on 7777 and the game session stuff on 8888

chrome bay
#

This may just work you know

thin stratus
#

It sounds really solid

chrome bay
#

I'm hoping a 'party' can do voice chat with each other etc.

thin stratus
#

That might depend on how Steam handles that stuff

rough iron
#

If you use steam you can use steam for it

chrome bay
#

YOu know what's annoying? Spending all of last night looking at the party modules and implementing stuff - only to find tghere's no default implementation lol

rough iron
#

No idea if that comes with beacons

#

But it's easy having the unique ids

chrome bay
#

for VOIP?

rough iron
#

Yep using steam voip

thin stratus
#

Yeah the players in the party session know each others uniqueID

chrome bay
#

basiclaly I wanna mimic Gears 3 system - without having to have XMPP as a go-between

#

wanna have engine handle it all

thin stratus
#

which you can use to setup the voice stuff of steam

chrome bay
#

yeah, I should build my chat into it as well since both text chat and speech persist all the way through

rough iron
#

Gears3 is exactly what I described (in essence xD)

#

You just start your party in the main menu

chrome bay
#

yeh exactly

#

that's basically where I got to last night - until I got the log error IOnlinePartySystem: No interface found

thin stratus
#

Might be that the word Party is loosely used for different things

#

I would try the Beacon solution. Sounds pretty solid

chrome bay
#

I was following from UT, but as it turns out UT uses XMPP on epics backend so that's no good for me

#

yeah definitely

#

beacons it is

thin stratus
#

Yeah they don't use steam or any other subsystem, so they need to have some server in the backend

rough iron
#

They have their own

thin stratus
#

I mean

#

You can probably learn how to create your own from checking out UT

#

although you are missing everything outside of the UE4 code

#

which might make it pretty annoying :D

native moth
#

Another funny question. Does GameInstances merge when you join another session? I have some variables stored in a game session that decides which pawn to spawn. However when my client joins my host, it changes variables to fit the servers

#

I might have to move that my playercontroller instead I guess

thin stratus
#

Nope

#

GameInstance is unique per game, not replicated and persistent

chrome bay
#

Game Instance behaves differently in PIE - it's a singleton, so both instances share the same game instance.

#

Unless you run without bUseSingleProcess checked

thin stratus
#

THAT I don't know

native moth
#

I have the same problem when running 2 instances using "Launch Game" on the project file. But that might have the same problem?

rough iron
#

I'm currently writing our own OnlineSubsystem for the company, so I hope we can start with new stuff soon xD

thin stratus
#

@native moth Depends on what the problem is

native moth
#

That would also explain why one of my instances randomly freze

#

Well.. Atm the moment when my client joins, it gets the same pawn as my server, is should however be different

#

2 sec, let me get some screengrabs for you

thin stratus
#

So you select the Pawn in the MainMenu (non connected)

#

and want to give that to the Server?

#

After connection?

native moth
#

yes

thin stratus
#

If yes, then the Server needs to ask the Client for it

native moth
#

Arhh okay. So that needs to be done with an RPC?

chrome bay
#

actually scratch my last- im not sure if that's the case with the GI anymore

thin stratus
#

Yes, with RPCs

#

You Client has that Data saved somewhere persistent

#

either in a SaveGame or the GameInstance

chrome bay
#

but there was an issue with PIE vs standalone that screwed with our instances

thin stratus
#

When PostLogin gets called, you get the PlayerController of that person

#

So you can call a ClientRPC on it

#

in that get the GameIsntance or the SaveGame

#

then call a ServerRPC and pass that data back to the Server

#

Which then spawns your pawn

native moth
#

Okay. So I just need to figure out how to reference the PlayerControllers assigned GameInstance from my server?

thin stratus
#

The ClientRPC brings you to the Client version of that PlayerController

#

if you call "GetGameInstance" in that RPC, you will get the gameInstance of that very client

#

You will then get the Class or what ever you saved in that GameInstance (still on the client) and pass that to the Server via ServerRPC

#

You'll not reference the clients gameinstance on the server :P

native moth
#

And that is what buggles my mind, as you probably already can tell, I am new to this. So the ClientRPC would be an event that is set to run on client only?

#

or a function

#

Anyways, I will fiddle around with and read up on some documentation 😃

thin stratus
#

You have a custom PlayerController class

#

In there you create CustomEvent

#

And that is RunOnOwningClient

#

And a second one which is "RunOnServer"

#

The Second one should have an input as you want to pass the class or so back to the server

chrome bay
#

Something I do, if it's any help

thin stratus
#

@native moth Make sure to read my PDF (pinned to the thread) that should help :P

chrome bay
#

I store the pawn that the locla player wants to use in the playerstate. The client basically chooses their pawn, and sends the pawn 'class' to the server via an RPC.

native moth
#

Will do @thin stratus. Thanks for the pointers! It helps a lot 😃

chrome bay
#

The server then sets a var on the player state to that pawn, and replicates that back to the client. When it spawns a pawn for a player, it checks the playerstate to see which class of pawn it should spawn - instead of spawning 'DefaultPawn'

#

all the RPC's are handled by the player state then, which also means if you want to - clients can know what other clients are spawning as as soon as 'PawnToSpawn' is replicated

#

also 'PawnToSpawn' rhymes so it's kewl

thin stratus
#

I don't use the PlayerState for this as I can't be sure it's valid (despite using its own BeginPlay) when OnPostLogin is called

#

But I know that the PlayerController the he gets passed is valid

#

that's why I have the RPCs in the PlayerController

chrome bay
#

Ah yeah in my case players are spawned latently not straight away

#

and they choose their pawns in the game rather than the lobby in my case

#

the server just picks from a list of 'allowed' pawns for the game and clients can choose from that list

thin stratus
#

Yeah then you can fiddle with the PlayerState

#

As you probably also use that to display the selection to other players

chrome bay
#

yeussss

#

well not atm, but likely at some point

native moth
#

it seems to be working. Will return shortly with results! 😃

chrome bay
#

@rough iron can you have party sessions that are 'invite only', 'friends only' and 'public' etc? i.e. advertised in different ways or is that something I'd just have to code in myself?

thin stratus
#

Guess you do that with parameters

red ledge
#

@chrome bay let us know if you could make the system you have in mind work with Beacons

thin stratus
#

I mean

chrome bay
#

Shall do, if I pull it off I'll upload sauce

thin stratus
#

Parties are kinda meant to work via inviting them

#

So I guess you only join them via invite anyway?

chrome bay
#

oooo somebody added host migration to shooter game

#

defo gonna look at that...

red ledge
#

btw guys, any idea how to make serverlist update in realtime without refreshing it on a timer or something?

chrome bay
#

I think you have to do it with a timer, I don't think you're able to poll steam servers every frame etc since it's an op that takes time

native moth
#

ohh well, didnt work.. I have will to run some additional tests when I get home. Thanks for the help so far 😃 I will remember to read your PDF cedric

red ledge
#

that host immgration sounds cool, gonna have a look at it later as well

#

saves you a lot of pain in the ass

chrome bay
#

I don't think it restores game state or anything, but then again Gears 3's never did either - just restarted the match

red ledge
#

yeah, I thought that you can kinda update at least the sessions you have results of on tick instead of asking for sessins again

fiery cedar
#

preserving score is what 99% of people will care about in any arena shooter

chrome bay
#

yeah. score / accumulated items would be enough probably. probably a way to reinitialize a game based on the last recieved gamestate condition

#

& playerstates etc

rough iron
#

@chrome bay I think in steam and live there are states for it

#

So yep

chrome bay
#

sweeet

#

man my code was so neat last night as well, hate tearing out neat code haha

#

@rough iron so the part I'm confused about... do I start a game 'session' or no? there's like five differnent beacon classes in the engine atm. Lobby, Qos, Party, Online, LAN, Test etc... not sure where to begin

rough iron
#

Qos is mainly for searches, in live there are differences

#

Lobby and party is very similar while lobby is a steam specific session type

fiery cedar
#

so for lobby migration, I've got a question

#

Is it for like, a peer to peer type of connection or from one game lobby to another?

chrome bay
#

host migration you mean?

fiery cedar
#

yeah, my apologies for not getting the terminology right

chrome bay
#

Ah ok

#

Basically it just means that if the player that's hosting the session drops - usually all players will return to the menu etc. In this case, a fallback client is chosen to be the new host, and all the clients are told 'who' it is - so in the event of a connection loss, they all try to connect to that new player (who hosts a new session).

#

the idea being you don't have to go through the matchmaking process all over again

thin stratus
#

Can we achieve the conversations of the past 24hours?

#

xD

chrome bay
#

haha :p

fiery cedar
#

Yeah, I understand that I just didn't know if it was for a p2p sort of connection. Sorry lol

chrome bay
#

Oh I see, nah no P2P in this case

fiery cedar
#

Ah

chrome bay
#

UE4 still uses server/client everywhere

#

but the clients then know what IP address to try and connect to for a session if their session suddenly drops out

rough iron
#

@thin stratus copy past the whole thing ^^

fiery cedar
#

Yeah, I'm aware of that. I just didn't know what you were referring to in this instance is all 😛

thin stratus
#

@ancient pebble Really need searchfunction and history xD

chrome bay
#

I actually did copy-pasta into a notepad doc :p

fiery cedar
#

so if you're doing host migration, I assume the new host would already have most of the data, would he have all positions or would the clients that are being directed to him have to send position, score, etc?

chrome bay
#

So long as you store everything in reploicated classes (player state / game state) - you could use that data to restore the session as close as possible

#

but clients don't know about other players, they just know about their pawns - so the client couldnt restore players to their pawns / pawn state etc easily

fiery cedar
#

so if clients don't know about other player locations (obviously a good thing to prevent cheating) would the clients upon connecting to the new host be able to send their previous data or would that just not be considered due to the fact it's probably not great to trust the info a client sends

#

sorry if I sound like I'm repeating myself, I'm honestly just really interested by this because I didn't realize that pawns out of sight weren't networked at all

native moth
#

@thin stratus YAS! Reading 10 pages of your PDF made everything clear and two simple small fixes made everything work! Thank you very much 😃

brittle sinew
#

I might be wrong here, but I believe that games like COD that do host migration only do it when the host gracefully leaves

#

So it has a chance to send info

thin stratus
#

@native moth Awesome (:

fiery cedar
#

That sounds like a good way to do it

native moth
#

now I got VR and a normal spectator pawn up and running

brittle sinew
#

Yeah, so the "exit to menu" or whatever button wouldn't do it immediately, it would handle all of the coordination for the other host

#

I was talking with someone about this a few weeks ago I think...I'm not sure there's a way to reliably handle host migration in the event of a crash or ALT+F4 or something like that

#

Without using an external master server...but then again the info would still be somewhat late

rough iron
#

Using beacons enables you to choose a new host (you could implement a two phace commit protocol) when the old one dies.

brittle sinew
#

Would that let you transfer all necessary info over though? I wouldn't trust whatever info a client has at the time of the transition

#

Especially like jooni said, if something isn't marked as relevent they wouldn't know about it

fiery cedar
#

Server/Host would know everything, clients would only likely know what's relevant as far as I know

rough iron
#

If you are worried about trolls a good thing regarding the beacon system is that you do not know who is the actual host. Of course you can know it by checking the amount of net traffic but thats another story.

chrome bay
#

when unreal crashes your PC so hard you can't restart :/ jezuz

rough iron
#

Networking ^^ windows does not handle lingering resources too well xD

#

Like not releasing a socket properly xD

thin stratus
#

Just rebind it until it works

dawn glen
#

does anyone know why when i package my dedicated server and run it if i run a standalone game client i cant move when i join it. If i play from editor and join it actually deletes and actor from my map in the editor permanently

#

if i join as the compiled game i cant move, if i run standalone from editor i can move

wary willow
#

@dawn glen that's interesting...

#

What versino?

dawn glen
#

4.14.3

wary willow
#

Good

#

it wasn't just me

dawn glen
#

i have an actor that controls day/night

#

if i join from editor POOF

#

that actor is gone forever lol

wary willow
#

This mofo thing is a bit hard to replicate, I thought it was a UMG issue

#

I'm not sure, but please post your problem there exactly

dawn glen
#

its wierd cause if i run a standalone from editor its fine.

wary willow
#

Yeah it's because of how the compilers are under the hood

#

they are completely different

#

So, I wasted over 6 hours looking over code

#

Because in editor it was fine, but packaged was not.

dawn glen
#

i made soem changes and rebuilding, will see what happens

#

no change

#

thinking its because i set uimode in the main menu level and that is persisting across to the play level.

#

that is exactly what it was

#

solved

wary willow
#

@dawn glen interesting

dawn glen
#

must be because i get player controller at index 0? everything i read said the local client is always 0

wary willow
#

Oh

#

Yeah, don't do that

#

While true, you should get it from PlayerState

#

So

#

PlayerController (0) -> PlayerState = actual player

dawn glen
#

im about to give up for the night i think. If i play in editor with dedicated server checked it deletes my day/night manager from the level completely forever then when i readd it it bugs the variables out so i cant assign the skysphere to it unless i restart. i never had these issues with 4.11

wary willow
#

You can thank Matt for that

dawn glen
#

nope even restart and the variable is broken. thanks for the help. i might be done with unreal

#

at least until the sort this crap out

wary willow
#

@dawn glen going back to Unity?

dawn glen
#

debating it

#

lost a bunch of time with 4.14.2 with imports

wary willow
#

I didn't mind deving on Unity, except for its archaic UI

dawn glen
#

i have a UI bug where when i move a widget its broken forever

wary willow
#

But, I don't know, I love Unreal too much

#

I just wish they spent more time on the engine than their games

dawn glen
#

this deleting actor that makes no sense

#

i like UE way more than unity, i just never had these issues with unity.

#

then again i never had these issues in 4.11

wary willow
#

To be fair, 4.13/4.14 were crapshoots

#

4.13 was pretty decent though

#

4.14 was shit

#

4.15...well we'll see

#

Maybe people will be too distracted by material editor reroute nodes to notice

dawn glen
#

i will just take a break on what im doing until 4.15 i guess

#

thanks for your time

pallid mesa
#

I have that problem aswell since 4.14 release @wary willow

#

I checked out in 4.15 preview and It is not happening

#

The thing with It is if i spawn +2 players on MP the third (forth, fith...) client may not move.

#

It is happening aswell in editor

red ledge
#

OnRep_**** doesn't get called on the server right?

#

c++ rep notifies to be exact

orchid cairn
#

can i ask a general question regarding multiplayer... what is considered best practice for moving data around during a ServerTravel, specifically player related data? store it in player controllers and use the OnSwapPlayerControllers event? or storing in the local gameinstance and accessing as needed (with server setters for replicated data)

rare cloud
#

@red ledge, No it doesn't call on the server side, but if you need to execute the function on server side you can call it manually after you change the variable

#

and it will be call on server side

orchid cairn
#

OnRep is great for UI stuff and things like that

red ledge
#

oh yes, I used to just set stuff manuallly, I think calling OnRep manually is much better

#

does it get called on the server if you do it on blueprints tho? saw some blueprints code that looked like it didn't call it on server but It's important for the logic to work?

thin stratus
#

There was a difference between BP and C++, yes

#

Can't recall if it was about Multicast or OnRep

#

One of the two is not called on Server in C++ but called on Server in BP

#

or something like that

red ledge
#

most likely OnRep

orchid cairn
#

multicast is called on server for BP fwiw

thin stratus
#
#

That post should explain it

orchid cairn
#

is it safe to assume that the BP event OnSwapPlayerControllers will fire before OnPostLogin? and will both fire after a ServerTravel?

thin stratus
#

OnPostLogin fires after ServerTravel

#

Never used OnSwapPlayerControllers

#

You could check the source though

#
void AGameModeBase::HandleSeamlessTravelPlayer(AController*& C)
{
    // Default behavior is to spawn new controllers and copy data
    APlayerController* PC = Cast<APlayerController>(C);
    if (PC && PC->Player)
    {
        // We need to spawn a new PlayerController to replace the old one
        APlayerController* NewPC = SpawnPlayerController(PC->IsLocalPlayerController() ? ROLE_SimulatedProxy : ROLE_AutonomousProxy, PC->GetFocalLocation(), PC->GetControlRotation());

        if (NewPC)
        {
            PC->SeamlessTravelTo(NewPC);
            NewPC->SeamlessTravelFrom(PC);
            SwapPlayerControllers(PC, NewPC); //////////////////////////////////////////////////////////////////////////////////////////////////////////
            PC = NewPC;
            C = NewPC;
        }
        else
        {
            UE_LOG(LogGameMode, Warning, TEXT("Failed to spawn new PlayerController for %s (old class %s)"), *PC->GetHumanReadableName(), *PC->GetClass()->GetName());
            PC->Destroy();
            return;
        }
    }

    InitSeamlessTravelPlayer(C);

    // Initialize hud and other player details, shared with PostLogin
    GenericPlayerInitialization(C);

    if (PC)
    {
        // This may spawn the player pawn if the game is in progress
        HandleStartingNewPlayer(PC);
    }
}
#

Put /// across the line where it gets called

#

And HandleSeamlessTravel gets called after PostSeamlessTravel

#

So I assume it gets called after ServerTravel

#

Let's see if it gets called before post login

#

Ah, of course it's a bit more brainwork to see where the calls go

#

-.-

#

Seems like PostLogin gets called by the LevelActor

#

HandleSeamlessTravel and PostLogin both call GenericPlayerInitialization
Can't say a lot more. Doesn't seem like it's directly visible what's getting called first

#

Might need you to simply test :x

orchid cairn
#

i'm doing that now 😃 one thing i did notice, for connecting to my dedicated server build i'm just using "open address:port" as a console command... it looks like OnSwapPlayerControllers doesn't get called there at all, as it's not seamless travel

thin stratus
#

Hm, isn't Seamless Travel a Server thing anyway?

#

I really need to setup test scenarios with it..

#

And with "Server thing" i mean isn't that more for travel while already being on the Server?

glad wharf
#

if I'm not mistaken seamless travel allows server to tell client to change map without disconnecting them

#

On my side I'm struggling with voice channel ticking rate, I don't know how to increase its rate to reduce latency

red ledge
#

@glad wharf VoiceNotificationDelta=0.2 in DefaultEngine.ini?

#

under [OnlineSubsystem]

#

I saw @nocturne token use it in his guide, might be it.

glad wharf
#

@red ledge : Mmmm, from what I saw in sourcecode it's used for the firing of delegates "Start/Stopped talking"

#

There is also NetServerMaxTickRate and PollingIntervalInMs but I'm not sure it does what I need, because it does not seem to impact on VoiceChannel packet sending rate (but maybe I misunderstood something in the code)

#

What puzzles me is that the TickFlush() method of the NetDriver is called by UWorld::Tick() so for me it means that it's tied to framerate, but it seems unlikely that it is the case. Would be very strange if net speed was tied to framerate !

#

So I will continue testing these variables but it would be better if I could understand the process behind, if someone knows it 😄

orchid cairn
#

@thin stratus yeah, it's after you're connected to the server

#

so say for example you load the dedicated server into a lobby map, you have all clients connect, choose settings/weapons etc, then seamless travel into the game map

native axle
rough iron
#

If you need just biped movement use the base CharacterMovementComponent or just ensure your Pawns are base don ACharacter

#

ahhh ok for abilitties xD the tutorial is a goof starting point

native axle
#

I had huge issues on client-side when dashing at high speeds (~800 walk speed) with 200 ping. I think this is the correct way to fix it? As in having to use a custom movement component and movement abilities.
Might write a tutorial if this works well, since I've found nothing on this until today.

rough iron
#

Using a custom MovementComp and custom simulation is the way to go

#

but it requires also skill and good amount of work ^^

#

a vital part is prediction (for the client side simulation) and network optimizations

#

what do you really need to send over? How can you compress it? etc

native axle
#

Currently I am playing an anim montage with a custom curve. The character will move forwards based on the curve value. Not sure if this was the right way to do it, so I'll try doing the boost dodge in too.

#

Gonna have to think about compression a bit too, never had to deal with that.

native axle
#

Hmm seems a lot more complicated than I thought, better start with sprinting 😆

rough iron
#

ok, if you use a montage you got kind of a special move

#

and you have to sync the whole animation

#

and simulate it

#

what you do normaly in that part is to drive the main animation and the action in the server, while playing the animation in each box separatly but syncing the time in chunks

#

so you might get out of sync but not that much

#

if you need some precise ability movement such as in a fighting game it all get's more complicated

#

you have to predict a lot more, you have to know at which rate the server will play it, and compensate round trips

#

even then you still have to add sync steps that will just refresh all that

#

too many sycn steps will increase bandwicth while to less will produce hitches

#

xD

eternal anchor
#

how do I get blueprint graph (UBlueprint*), from UObject ?

dawn glen
#

open the object in the editor and click the open full blueprint editor

brittle sinew
#

@eternal anchor does something like ClassViewer::Helpers::GetBlueprint(MyObject->GetClass()) not work?

eternal anchor
#

@brittle sinew idk, I didn't know something like this even exist (;

#

thanks

#

hmm

#

that's only partially helpful

#

it's decalred in cpp file ;/

#

but I can copy code, thanks (;

brittle sinew
#

Yeah I didn't try to build, just saw it

eternal anchor
#

ok

#

it actually does not work

#

because ClassGeneretedBy is never setup during blueprint creating

#

it's not setup for the actually class like UMyClass

#

idk if that is intended behaviour or just bug

#

ok

#

it's not that simple it seams

#

you have to cast your UObject

#

UBlueprintGeneratedClass* Class = Cast<UBlueprintGeneratedClass>(OutVal);

brittle sinew
#

Yeah I saw that, but is there any way to get the actual UBlueprint* from that?

#

I was wondering why you needed it, because AFAIK it's mostly just used for editor stuff

eternal anchor
#

after you cast to it ClassGeneretedBy is actually populated with UBlueprint*

#

i need it because I'm wirting custom blueprint editor

#

which will be embedded within other editor, I it just to edit properties

brittle sinew
#

Ah, okay. Good to hear it works, didn't really pay attention to that 😮

eternal anchor
#

oh damn

#

now i have to resolve linker errors

#

because some headers are private..

#

SDetailsView <- does anyone know what I need to use it in my module ?

eternal anchor
#

nevermind i need to export some classes from property modules

thin stratus
#

You should only need to include the slate and unrealed modules etc

#

Check out the UE4 Stream where Michael Noland explains stuff

#

there is also the project he shows inside of the youtube commands

worthy wasp
#

Hey guys - quick question... anyone else having issues with 4.14 STEAM integration? I have a 4.13 project that steam works fine - i can see available sessions when i use FINDSESSION() node, but in 4.14 i'm having no such luck.

FWIW - all the DefaultEngine.ini is the same for both versions, and yes SteamOnlineSubsystem is enabled in project. When we launch the STANDALONE GAME playmode, we can both see eachother come online in steam API and playing SpaceWar - but the session is not viewable in our created game. Again - this is workign no problem in 4.13 LAUNCHER but not 4.14 SOURCE

#

I've tried both AdvancedSessions plugin as well the engines default CreateSession and FindSession nodes

native axle
#

@worthy wasp I had issues with the AdvancedSessions plugin in 4.14 but the default nodes worked fine. Perhaps try a blank project without the plugin?

worthy wasp
#

@native axle were looking at some AV on the other end (mine works fine for the 4.13 so i'm going to rule mine out - even though i've disabled it temproarily)

I'll give a test project a go here shortly if this doesnt work! Thanks for a quick reply

wary willow
#

@native axle what issues did you have with Advanced Sessions plugin in 4.14? I was going to use it for my school project, but if it's bugged, I can just use the regular nodes.

native axle
#

@wary willow For the create and join session nodes, it has the success / fail out exec. I would get failure when using the plugin but not when using the default nodes. I can't remember if it was join or create session but one of them was bugged.

worthy wasp
#

No dice on the AV - and we removed the plugin all together.... i'm making a new project (4.14.3 SOURCE) and testing very basic connectivity with Steam

#

create session (for me) worked fine - it was the FIND SESSION that wasnt returning results

gaunt kestrel
#

^ create session also works for me

#

but find session wasnt returning results either

worthy wasp
#

this was both for Standard BP Nodes + also the AdvancedSessions plugin nodes

#

again - works fine in 4.13

native axle
#

Hmm I'll give a go on 4.14, been working in 4.13 too just to be safe.

worthy wasp
#

@gaunt kestrel are you successfull with the engine standard CreateSession() and FindSession() nodes?

gaunt kestrel
#

Yes

worthy wasp
#

hmmm - wonder if AdvancedSessions left behind a trail in my project....

#

i currently DONT have any c++ in it

#

but the engine standard nodes wont work either

gaunt kestrel
#

I tried getting the length

#

wasnt working

#

the console command "open IP" works for me

worthy wasp
#

likewise

#

getting length from FINDSESSIONS return result right?

native axle
#

Were you testing with steam?

worthy wasp
#

steam API works fine - i can see each of us login to SpaceWars

gaunt kestrel
#

not testing with steam

#

just local network

worthy wasp
#

its the FindSessions() return node

#

no shit

gaunt kestrel
#

all ethernets plugged into switch

worthy wasp
#

so your NOT on steam - and still getting the same thing

gaunt kestrel
#

yeah

worthy wasp
#

definitely an OSS bug internal to engine maybe?

gaunt kestrel
#

maybe? maybe were just doing it wrong

worthy wasp
#

no - cuz this same practice works fine in 4.13

gaunt kestrel
#

try a for loop with break, then print each result

worthy wasp
#

i literally JUST tested it a few hours ago - i'm in a 4.14 BLANK project now and creating up the project to test again WITHOUT the AdvSessions plugin

native axle
#

Hmm I think mine works without the plugin

#

want me to send u the code?

worthy wasp
#

that would be awseome FPWong

gaunt kestrel
#

Nah I have a multiplayer test project

#

just not working

#

open IP is working though

#

thats why I haven't been too stressed about it

native axle
#

You may want to put something into TestMap so you can see when you join it

worthy wasp
#

ty sir got it

native axle
#

@gaunt kestrel what do you mean by open IP though?

gaunt kestrel
#

the console command used to open levels

#

but instead as long as your map has the ?listen option

#

it can be used to join

native axle
#

ahh

gaunt kestrel
#

Hmm

#

well its working in editor right now

#

but not in package

#

Also how do we used Get Controller Player ID?

worthy wasp
#

@gaunt kestrel what do you mean by how do we use GetControllerPlayerID() ?

#

in multiplayer - controllers arent replicated - only yourself & the server knows of your controller

#

server knows of EVERYONES controller

#

so you can safely use GetPlayerController(0) and it will ALWAYS return yourself

gaunt kestrel
#

When my player grabs an object (VR, so they literally grab it) it spawns and has them possess a pawn.

worthy wasp
#

unless you are in p2p (LISTEN) server mode - which will return the SERVER controller if you are the host

gaunt kestrel
#

It's just making the server possess the pawns

#

yeah

worthy wasp
#

which you would have to use GetPlayerController(1) as the server to get your PLAYERS controller - not the server

#

its a bit confusing - but nothign hard to grasp

gaunt kestrel
#

really?!

#

so the client is always Player Controller 1?

worthy wasp
#

should i set PUBLIC CONNECTIONS to anything?

gaunt kestrel
#

@worthy wasp I think it should be >1

fossil spoke
#

Public Connections is basically your MaxPlayers

worthy wasp
#

thats what i thought too

#

but changing it made little difference in my original project

#

i'm almost done with this implementation now on a blank TPS template

gaunt kestrel
#

@worthy wasp mine is working in editor?
I'll share pics once done making food

#

doesnt work in packaged game tho :c

native axle
#

Mine is working in packaged, not using the IP thing though

#

I cant see what nodes ur using with that btw just says latentonlinecall

gaunt kestrel
#

weiiird

worthy wasp
#

create session - you have 0

gaunt kestrel
#

Hmm well

worthy wasp
gaunt kestrel
#

.-.

worthy wasp
#

from what i've read - ExecuteCommand doesnt work in packaged game

gaunt kestrel
#

it does, just a little hackishy

#

I did the test project a while ago before going to the open IP commands

#

so don't know why that is

bold cedar
#

When connecting via IP, the clients all need to port forward 7777 (Or the default port)? Or just the host?

worthy wasp
#

jus tthe host - but thats LAN only

bold cedar
#

What about public hosting? Say a game jam, where I wanted players to join my session

worthy wasp
#

as far as I know port forwarding 7777 is for dedicated servers only

#

i'm sorry - might be some misleading information from my first reply

bold cedar
#

I can confirm that it is required for a player host, not only (if) dedicated servers

#

I'm mainly just wondering about players on the other end, if I am hosting it as a player.

worthy wasp
#

i'm right now testing this - i'll confirm it in a minute

#

and let you know

#

@bold cedar

bold cedar
#

@worthy wasp Thanks

worthy wasp
#

@native axle you alive?

#

@bold cedar - i'm UNSUCCESSFULL with 4.14.3 project - showing sessions

#

LENGTH = 0 EVERY TIME

#

yes port forwarding is turned on 7777-7778

#

everytime - length = 0

bold cedar
#

But if you were to now port forward on the client too, it would be successful?

worthy wasp
#

i'm going to safely say it doesnt matter

#

port 7777 is for dedicated servers

#

has nothing to do with OSS - especially steam

#

i know for a fact because i've developed a few games & launched to my brother for testing - and he has 0 port forwardign turned on

#

and can both host & join games successfully

bold cedar
#

What do you mean for dedicated servers?

worthy wasp
#

i mean - the port is for dedicated servers

#

not peer to peer

bold cedar
#

I'm not so sure

#

I was unable to connect for testing with someone peer to peer, until we both port forwarded, and then it worked flawlessly

worthy wasp
#

i'm confirming htis now

#

let me put my foot in my mouth in a few minutes....

bold cedar
#

:p

worthy wasp
#

@bold cedar tested both ways - from me hosting & also him hosting..... 0 sessions returned

#

port forwarding is turned on both sides

#

7777 & 7778

bold cedar
#

You're using null subsystem?

worthy wasp
#

steam

#

for shits & giggles - i'll turn it to null

wary willow
#

Yo

#

You newbies

worthy wasp
#

hey VB

wary willow
#

Hello

#

So

bold cedar
#

Null will only work with LAN :p

wary willow
#

Check this out

worthy wasp
#

i'm checking

wary willow
#

This is some stupid bug

#

Or intentional

#

But I ran into this issue awhile ago

worthy wasp
#

#AllEars

wary willow
#

So, i fixed this by...

#

Shit, let me just get on my laptop

#

actually, think it's on my desktop

#

lalalala

#

So yeah

#

If this is intentional. no idea.

#

But, whatever

worthy wasp
#

do you think its a delay issue then?

wary willow
#

No idea

worthy wasp
#

because youre delaying right off the bat on begin play

#

but not on the RETRY function

wary willow
#

And mine is a little funny looking because I know I am only needing two players

#

So, one is either hosting or joining

#

Doesn't matter to me who is who

#

The delay is because it takes some time for Steam Session to come

#

Well, Steam to start up

#

You ever notice that delay for that window?

#

It's not instantaneous

#

But tbh, I am pretty sure it had nothing to do with the delay, but can't remember right now, it's 3am

bold cedar
#

What exactly is the problem?

wary willow
#

I just left it for safe guarding

worthy wasp
#

putting in a delay before the FindSession() node does nothing

bold cedar
#

@worthy wasp So in your case, with it not working with port forwarding, how would you connect peer to peer?

wary willow
#

Well

#

I am doing it this way for my own project, because it works

#

As far as why you can't find a session

#

Wait..

#

Is that inside an UMG?

worthy wasp
#

again @bold cedar - i cannot in 4.14.... but USIN GHTE SAME EXACT SETUP in 4.13 I can

bold cedar
#

Oh

wary willow
#

Have you tried moving this to like Game Instance or something?

#

Not sure what your exact requirements are

worthy wasp
#

in my actual project (not a test blank 4.14) yes its setup properly using GameMode, GameInstance & PlayerControllers

wary willow
#

But I ran into an issue with HUD class

worthy wasp
#

replicating GenericShooter example for functionality

wary willow
#

in 4.14.3

worthy wasp
#

i dont use HUD class

wary willow
#

That did not allow players to get control in packaged builds

#

but it worked just fine in editor

#

Your tests are all in packaged?

worthy wasp
#

Standalone playmode

wary willow
#

Why?

worthy wasp
#

which is supported + tested to work fine

wary willow
#

Have you tried packaged?

worthy wasp
#

why not? it works

wary willow
#

Because it doesn't always work...

bold cedar
#

^

worthy wasp
#

dont really want to waste the time packaging to test iterations

wary willow
#

...

worthy wasp
#

its not like unity where it builds fast

#

.... all you want

#

it works fine in Standalone

wary willow
#

So your game works fine now?

#

In Standalone?