#multiplayer

1 messages ยท Page 566 of 1

jagged olive
#

and my IP is static

#

1 sec

winged badger
#

note that if server received a connection request in its logs

#

its not port forwarding, other things can go wrong too

jagged olive
#

I'd been just forwarding ports using some port numbers from this https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
then checking the port with this https://www.yougetsignal.com/tools/open-ports/

This is a list of TCP and UDP port numbers used by protocols of the Internet protocol suite for operation of network applications.
The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) needed only one port for full-duplex, bidirectional traffic. The Stre...

#

I can't get it open at all

#

like 10 different tries at this point w different ports

winged badger
#

yeah, im not reading through that

#

paste your logs, server, starting with opening the networked level

#

or just drop the entire log file here

jagged olive
#

I can't get the port open, the server/client is perfectly fine

#

so I can't get an incoming connection from the dude who I'm developing with to test

winged badger
#

logs, "server/client is fine" tells me nothing

strong vapor
#

@winged badger Im at optimization.. im trying to ship in a few months

winged badger
#

listen or dedicated server?

#

@strong vapor

strong vapor
#

dedicated

jagged olive
#

it's a port issue holy.. but here you go

winged badger
#
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection
bNeverApplyNetworkEmulationSettings=true
MaxClientRate=25000
MaxInternetClientRate=25000
bClampListenServerTickRate=true
NetServerMaxTickRate=30
MaxNetTickRate=30
#

thats our network config in DefaultEngine.ini

#

listen server

strong vapor
#

oo nice man thank you

#

everyone always beats around the question of numbers

#

and says "deeeepeeends on your gaaaame" but come on.. like whats a good upper limit to keep in mind... what can an Xbox handle? whats gonna make the game playable and accessable in that regards ya know

#

?

#

sweet

jagged olive
#

I built the server from scratch

winged badger
#

not in editor logs @jagged olive, the server logs since it opens the level until the client attempts a connection

strong vapor
#

@winged badger and you put that in the Game.ini???

winged badger
#

in any case

strong vapor
#

orrrr engine...

#

lol

jagged olive
#

hte server logs are the black

#

when my friend tries to connect the server never even sees a request

winged badger
#

yeah, that doesn't look like LogNet logging

jagged olive
#

yeah I built the server

#

it logs in command promt

#

no saved log files yet

winged badger
#

i have no idea why would anyone ever do that

#

time messing around server architecture is time not developing the game

jagged olive
#

I mean I know how to build a server now so

#

and write packets

winged badger
#

and there are plenty of solid, working tested solutions out there

jagged olive
#

anywho.. I can't get ports open on my router. That's it

winged badger
#

@strong vapor DefaultEngine.ini, out net profiler suggested that our client up rate was higher then the limit at times

strong vapor
#

thanks man

#

your client up rate as in like Rpc's to the server?

winged badger
#

there is plenty of RPCs flying around

#

yes

#

but that also increased the max what server can send per client from 10k to 25k

#

which is fine unless your server is using ADSL

strong vapor
#

the default is 10k? got it

#

lol that makes sense

#

im an idiot.. and was multicasting my health changes

#

instead of having htem as a replicated property

#

and so any time there was damage done it was multicasting a float.. 2 floats

winged badger
#

we invested quite a bit of effort into reducing a number of replicated actors

strong vapor
#

i think i like the idea of dummy projectiles

winged badger
#

made network manager actors, 16 of them do the replication for 2000 interactable actors

strong vapor
#

oh cool

#

do a lot of dormancy and flush and stuff?

winged badger
#

no, fastarrays in network managers

strong vapor
#

nice. how hard is it to set up a fast array

#

the serializer thing that they talk about in that livestream from about a year ago right?

winged badger
#

that depends on how handy you are with c++

strong vapor
#

i can do c++ but it takes a lot of looking shit up and reading

#

i wouldnt say im super fluent

#

but i spent a year doing C# in unity first before i came to unreal

#

and my game uses the gameplay ability system

#

so i definitely get my hands dirty in c++

#

im tryin to get this attribute change async task thing to work right now

#

lol it works in teh GasShooter..

winged badger
#

FFastArraySerializer is a custom serialized struct that holds an array of FFastArraySerializerItems

#

it replicates only changed, but is capable of individual per item callbacks on clients for Add/Remove/Change

strong vapor
#

sooo I can make a struct.. that inherits from one of those.. and just kinda do my thing right?

#

but i'd have ot make it in C++ obviously lol

#

which is FINE!! lol

#

lolol

winged badger
#

so the FastArrayItem is in our case, a struct that holds the replicated data from InteractionComponents + CustomPayload, a boolean that is bitpacked

#

and a pointer to the Actor which the data belongs to

#

so instead of replicating they update fastarray in networklmanagers

#

which replicates for them

#

then client side callbacks handle the client side updates

strong vapor
#

is networkManager a class i can make a blueprint of and just kinda get my hands dirty with it?

#

it sounds like i want to

winged badger
#

its just an Actor we called NeworkManager

#

read NetSerialization.h header

#

all delta serialization documentation is in it

strong vapor
#

oh

#

cause there's actually a c++ base class

#

righ right i remember him saying that in the livestream

#

thank you again

winged badger
#

there is even an implementation example

#

its generally bad if server hits the time limit for evaluating considered actors for replication

#

so we did much more optimizations to save server's CPU then actual bandwidth

strong vapor
#

whats your target framerate?

winged badger
#

it should run on 60 on low-mid end gaming laptop

strong vapor
#

cool cool

#

i think im just gonna go for 30 for now lol

#

this is my first real project in multiplayer

#

its nothin super fancy

winged badger
#

if you did networkign in blueprints

strong vapor
#

third/first person medieval rpg brawler kinda game

winged badger
#

its kindofa wonder the game works at all

strong vapor
#

lololol

#

welll

#

LUCKILY

#

the gameplay ability system is pretty sweet

#

it kinda handles most the networking stuff

winged badger
#

i found GAS too complex for the size of the design team

strong vapor
#

and other than that im just tryin to set reasonable settings

winged badger
#

so i implemented my own, with 10% complexity and 70% functionality

strong vapor
#

gotchya

#

yea i've thought a LOT about ditching it

#

things would be simpler

winged badger
#

but then again, no game will ever use entirety of GAS code

strong vapor
#

but theres times where im thinking of how somethings gonna work.. and then im like "oh wait.. i can just put a tag in this box and it'll just work"

winged badger
#

having 4 different rules on how buffs stack would be a UX suicide

strong vapor
#

but like you said you could just make something lke that

#

lolol yea

#

i generally keep it to one

#

im tryin to make my game feel like an RTS that you play in third/first person

#

so im really tryin to milk the Ai's pull on replication

#

cause i want there to be a lot of Ai.. as many as possible

#

if there's a 2k * 2k map.. and 100 total characters.. i think that could be fun.. only like 8 of them have to be clients .. but you can talk to the Ai and get em on your side.. they can get locked in jail and you gotta break em out.. kinda like kids playing on a playground

#

simple

#

lol... not simple!

#

It could be as low as 30 and be fun probably

winged badger
#

replication is rarely a problem

#

or should i say, main problem

#

with that number of AI

#

CMC is problematic

#

checking for Overlaps, Transform updates

#

they become significant drain when you multiply them by 100

#

hell, just deleting an empty Tick event from a BP component we had 800 instances of saved us 0,5ms on game time

strong vapor
#

right on ill remember to do that

fossil spoke
#

How did it have that much of an effect on performance?? An empty tick?

strong vapor
#

ive definitely turned tick off on a bunch of actors that dont need it

fossil spoke
#

Did you disable Ticking?

strong vapor
#

i watched that optimization stream a while back

fossil spoke
#

Altogether

strong vapor
#

those blueprints still tick

#

even if its empty

fossil spoke
#

I know they do, thats why im confused.

strong vapor
#

the logic is still in there "bCanEverTick"

fossil spoke
#

As to why simply deleting the Nodes would improve performance that much, if at all.

strong vapor
#

as long as thats' on.. its gonna keep updating

#

oh you're saying the engine should implicitly know

winged badger
#

it did, and component TIcks in c++

strong vapor
#

right.. i bet in another 5 years it would

fossil spoke
#

Savings on virtual function calls maybe?

winged badger
#

it could not find a ReceiveTick implementation on the BP class

strong vapor
#

right yea.. thats what i mean.. they would have to code that in the blueprint scripting editor

winged badger
#

so it didn't do the entire call to BP event part

strong vapor
#

and thats probably work that they'd rather spend on other shit but in another 5 years they'll have it super user friendly

#

its just getting better

#

i think it was... zach parrish.. he said turn that shit off!!

winged badger
#

when you have a 100, or 1000 instances of something, every miniscule detail matters

#

none of our components Tick when they don't have to

strong vapor
#

do components tick if the actor doesnt tick?

winged badger
#

for example, HealthComponent will turn off its Tick (doing regeneration) if you're at max HP

strong vapor
#

in GAS there's a tag for that LOL

winged badger
#

yeah, with good reason

#

Fortnite apparently uses a crazy amount of tags

#

7000

strong vapor
#

uhhhh well thats good to know lol

#

i've been wondering if i have too many tags

#

lololololol

#

and i apparently dont

winged badger
#

@fossil spoke blueprint event is called ReceiveTick, - UFUNCTION(BlueprintImplementableEvent) its not an override of Tick/TickComponent function

fossil spoke
#

Yes i understand that, i suppose given the number of instances your working with it makes more sense.

winged badger
#

removing WidgetComponents from Actors and putting it on the PC (for mouseover info) - so there is only one - was one of the biggest saves

fossil spoke
#

One WidgetComponent?

strong vapor
#

yea i like doing stuff on the HUD like that as well

#

just have an image and some text that moves to the right location on the canvas

#

instead of a bunch of widget components on all these different actors in the world

winged badger
#

we replaced simple widget components that actors had with material billboards, and there is only one detailed widget component for when you hover over something, and its on PlayerController

fossil spoke
#

Interesting approach.

winged badger
#

simple as in small health bar, indicators and such

fossil spoke
#

So im guessing then that you dont display Text elements?

winged badger
#

well, that was version one, since then our tech artist made that part of the mesh on the actors

#

not for those we replaced with billboards

fossil spoke
#

Unfortunately we dont have a Tech Artist ATM ๐Ÿ˜ฆ

winged badger
#

that sucks

fossil spoke
#

Yeeeep

winged badger
#

but when our monster transform updates profiled at over 3ms

#

Kaos went on a bit of a cleanup

#

literally nuked every mobile scene component we could so the game is still fucntional

fossil spoke
#

What is the game btw?

winged badger
#

8 player co-op tactical shooter with isometric camera

stray crescent
#

I want to load the map, split the players into 2 teams and start the first match
when the match is over...
reload(or reset) the map, flip the teams and start the final match

the map is procedurally generated and it need to be different for each match
where do I put this logic and how should I go about restarting the match?

I was thinking on putting it in the game mode and just relaunch the map thing is it will reset the game mode as well
the other solution is to delete all the procedurally actors and regenerate the map which will keep the game mode
thing is both solutions seems janky is there a better way to do it?

#

it should run on a dedicated server btw

strong vapor
#

The game mode seems like a good option to me.. im not super educated but i think thats what i would do if i was you

winged badger
#

you're stuck with a pretty tiny levels with that approach

stray crescent
#

the level geo isnt changing, only the props do

#

I'm using some kind of prefab to randomly place them, when the game start I randomize the seed and construct the props

#

mmm

#

removing them and regenerating actually seems less janky than I thought..

vagrant grail
#

I'm following this tutorial, same problem I host a game but with the second window when I try to find a server nothing appears, any help please ? https://www.youtube.com/watch?v=9qrjmwJBKiY&list=PLwmGmCVti_dDl8CMa_91FdwgZ0W010d5v&index=8

UE4 / Unreal Engine 4 Multiplayer Playlist:
In this collection of videos, we will cover setting up a project for both local and networked multiplayer projects.

This Video:
In this video, we add the functionality to our lobby widgets to allow players to host and join online se...

โ–ถ Play video
strong vapor
#

[Help] anyone good with the network profiler? how do you know exactly what RPC's didnt send

#

do you have "should advertise" checked? @vagrant grail

#

on the "create advanced session"

#

and also

#

when you'r doing this.. i think you want to do it in a stand alone

#

not pie

vagrant grail
#

@strong vapor Where is "should advertise" thing ? I tried with standalone, viewport and new editor window none of these work

strong vapor
#

you can see it on the "create advanced session" node at the bottom in the video around 7:38

#

what version of unreal are you using?

vagrant grail
#

4.25

#

they fucked up everything in this version

#

Every tutorial I do doesn't work

strong vapor
#

yea i think they did switch a few things

#

in multiplayer settings you can still mess with single process its called osmething differnet

#

one sec

#

man ya 4.25 is weird

#

you can still mess with the process thing its called "run under one process" in advanced settings

#

but i dont think thats your issue

#

are you making sure the LAN settings are the same as what he's got in the video? if you're hosting a game via LAN but your search doesnt use the LAN property it wont find anything

vagrant grail
#

yeah

strong vapor
#

it might seem like a lot of work.. but try following the tutorial in a project fresh on a version of the engine thats closer to what hes using

#

just to get a grip and make sure you're not crazy.. idk.. i do it sometimes

#

the Tomatoes guy on youtube always sets up little control experiment projects

vagrant grail
#

@strong vapor "should advertise check" was already checked by deafault

novel hemlock
#

Do I introduce overhead if i call a server rpc from the server or there is a check under the hood and it just gets execute locally on the server?

gleaming niche
#

it runs like a normal function on the server.

novel hemlock
#

it runs like a normal function on the server.
@gleaming niche Normal function = locally without any weird route?

gleaming niche
#

yes

novel hemlock
#

oh thanks

cold lynx
#

Hello

#

Has anyone already replicate two bones ik? I'm on pain ๐Ÿ˜…

#

In pain*

limber gyro
#

got a bit of a weird issue, that i am not sure if it is network related, i am drawing a niagara bam FX with 2 replicated values (begining and end), if i raycast with those exact same values it works properly, going directly to the midle of the screen BUT when i use those values to draw the FX, the FX is slightly moved to the positive Y

#

niagara beam ''

hollow bane
#

I'm following this tutorial, same problem I host a game but with the second window when I try to find a server nothing appears, any help please ? https://www.youtube.com/watch?v=9qrjmwJBKiY&list=PLwmGmCVti_dDl8CMa_91FdwgZ0W010d5v&index=8
@vagrant grail It can take a little while for the session to appear.

UE4 / Unreal Engine 4 Multiplayer Playlist:
In this collection of videos, we will cover setting up a project for both local and networked multiplayer projects.

This Video:
In this video, we add the functionality to our lobby widgets to allow players to host and join online se...

โ–ถ Play video
#

it might seem like a lot of work.. but try following the tutorial in a project fresh on a version of the engine thats closer to what hes using
@strong vapor I have followed this in 4.25 and it all works fine, so I don't think it's an engine issue.

final thicket
#

What do you guys think would be the best way to give clients joining a multiplayer game the illusion that they didn't reload the map?

#

Ultra seamless transition?

unkempt tiger
#

is it the same map?

final thicket
#

Yes

unkempt tiger
#

some kind of transition where the camera looks at something that wont change - like up at the sky or down at the floor

#

(if I understood your question correctly that is)

final thicket
#

But it still needs to load the travel map right?

unkempt tiger
#

idk how travelling works yet

waxen socket
#

Good afternoon. Can I always count on an array to retain its order as it's passed around via RPC?

zenith wyvern
#

I keep reading people complaining about having trouble turning off replication of level streaming in multiplayer. I'm running into the opposite, and my level streaming (multicast) isn't replicating

chrome bay
#

@waxen socket yep, full array is sent when using RPC so will retain order

waxen socket
#

Great. I was dismayed that maps don't replicate but with this I can cope.

cold lynx
#

Has anyone already replicate two bones ik?

#

anyone very stron gin ik anim replication here ?

chrome bay
#

Not something you would usually replicate tbh

#

Players should handle all IK themselves locally

winged badger
#

you should definitely not replicate IK

cold lynx
#

how you do to make a driving multiplayer game where player have a body then ?

#

yeah

#

i agree

#

but there

#

the client doesnt even

winged badger
#

as long as the player is running and in correct position

cold lynx
#

have his arms

#

in first person

winged badger
#

it doesn't matter one bit if client sees it with right or left foot forward

cold lynx
#

ther is somehting i do wrong

#

do you know well replication in unreal @winged badger ?

strong vapor
#

@cold lynx Check out the ShooterGame in the learn tab.. they handle replication, aim offset, all that stuff

cold lynx
#

thank you man

#

the crazy thing

#

is that i already set up aim offset replicated and all those stuffs

#

but here whit the vehicle possess i think it makes it more complicated

#

and the ik i use is two bone ik

#

never relpicate that before

#

and i think my main problem ithat its even nopt working on client side

#

i never experiienced this

strong vapor
#

well IK is in the anim blueprint right? and that's going to exist on the server and all the clients

#

so like they said before you definitely just wanna let each machine handle the IK of what the characters doing.. you wanna replicate as little as possible.. every variable adds bandwidth

cold lynx
#

yeah i agree of course

strong vapor
#

maybe there's some properties that you would like to replicate on the character.. so that each anim blueprint can have access to the correct version of that property

#

like aim offset

cold lynx
#

yes the ik is in the anim bp

strong vapor
#

are you just tryin to do a foot ik?

cold lynx
#

but the weird thing that i cant undestrand

strong vapor
#

or hands on guns? orr?

cold lynx
#

is that even on client side, i dont see my own ik happeing

#

no , its hands on a steering whel

#

that follows the steeringg wheel

strong vapor
#

mmmm

cold lynx
#

it is working in offline mod

strong vapor
#

so you're using some location or transform from the steering wheel

cold lynx
#

yes

strong vapor
#

make sure that is getting replicated

cold lynx
#

in the bp of the car

#

i did

#

the wheel turns

strong vapor
#

so the wheel turns on the clients but the hands dont follow?

cold lynx
#

yes

strong vapor
#

what are you getting your IK target from?

#

a scene component? or a socket? orrr.. just like a location offset from the steering wheel location?

cold lynx
#

off some anchors on the steering

#

they are bilbioards

strong vapor
#

anchors.... hmmm im not familiar

#

i know about like.. widget blueprint transform anchors

cold lynx
#

billbloards

strong vapor
#

hmm yea i dont know exactly what you're talking about

#

i would use a socket on the steering wheel mesh i think

cold lynx
#

well its a class in unreal

strong vapor
#

two sockets.. one for left hand and one for right

cold lynx
#

its just work like scene

#

lets say its scene component

#

on the wheel

#

n

#

(not sockets on the wheel because I dont use a skeletal mesh for my car, i use a staic mesh, and add a steering wheel on it)

strong vapor
#

so you have a static mesh of a steering wheel somewhere though

cold lynx
#

yeah

strong vapor
#

put two sockets on that static mesh asset

cold lynx
#

attatch to my car

strong vapor
#

open it up in the editor

cold lynx
#

oh, you think that would be better than scene component ?

strong vapor
#

yea i think its cheaper, not sure though

cold lynx
#

yeah well good to know

strong vapor
#

i was told at some point to use sockets instead of scene components i dont know if its actually a huge deal

cold lynx
#

:)

#

man, are you strong in replication ?

#

i swear i am so pissed off

strong vapor
#

i wouldnt say super strong but i've got a working Multiplayer RPG build that im working on

cold lynx
#

yeah

strong vapor
#

optimizing right now.. tryign to figure out how many characters i can really fit in the game world at once

cold lynx
#

i have made a multiplayer shooter

strong vapor
#

nice, so if you did some gun IK

#

just .. do that lol

#

on the wheel

cold lynx
#

yeah

#

well weirdly enough

#

thats just not owrking this time

#

:o

#

working

strong vapor
#

lol shit

cold lynx
#

yes

#

:/

strong vapor
#

the socket thing is nice cause it already exists on the asset.. so nothing needs to get replicated

cold lynx
#

i even did some crazy shit like wepon sway

#

oh

strong vapor
#

each client is gonna have the same static mesh with the same sockets.. so those hands will go right to em

cold lynx
#

haha

#

have to try

strong vapor
#

i havent done this super recently but i've done it a few times

#

so im pretty confident that approach will work

cold lynx
#

ok

#

im gonnna try

#

if its not working would be ok to help me again or its to strange to ask maybe lol

strong vapor
#

im leavin in a sec but im still here

#

tryin to find a decent video or reference material for you

#

shootergame might have it

#

cause they have guns and they hold the guns with the left hand, not sure if thats an animation or if they use IK though

#

i also think that if you googled or youtubed "ue4 static mesh socket ik" you might get some good stuff to come up

#

some combination of those words idk

cold lynx
#

thank you mam

#

man

strong vapor
#

so yea.. im lookin at ShooterGame (which is in the learn tab or free on the marketplace cant remember which)

#

and they do some hand on the gun stuff in the anim blueprint, in the anim graph

#

i dont think i know enough about your current situation to give you an accurate read on your problem

cold lynx
#

yeah but i think the weird part here is that I am posssesiong that vehicle

strong vapor
#

something i like to do is just make a fresh project and try to implement ONLY the thing that's giving me problems

cold lynx
#

i had no problem client side before

#

yeah

strong vapor
#

cause ya like you just said.. maybe osmething weird is happenign cause of how your doing things

cold lynx
#

yeah

#

i didi the cokect thing

strong vapor
#

i dont think that should matter though?

cold lynx
#

socket thing

#

its working but just like before

strong vapor
#

the actual character skeletal mesh.. and its anim blueprint.. should be able to get a reference to the steering wheel mesh somehow from your character having a ref of it or something

#

make sure those are replicated

cold lynx
#

man i wish we could do a call where i share you my screen

#

i think that would be fast

#

you seems decent

strong vapor
#

that could happen later maybe

#

im on here a lot lately

#

googlehangouts

cold lynx
#

yeah

#

man that would make my day

strong vapor
#

lol!

cold lynx
#

(im sorry for my english tho, im not english but im alright)

#

haha

strong vapor
#

all good

#

its not easy trying to understand complex things in another language im sure

#

gotta be hard

cold lynx
#

yea i know man

strong vapor
#

well.. im gonna go

cold lynx
#

yea alroight

#

alright

#

np

strong vapor
#

its 2 pm where im at.. and i probably wont be back on for a while.. like later tonight

#

but.. lets see how do i save your name

cold lynx
#

well you can add me

strong vapor
#

i just sent youa private message i think?

#

added friend

#

lol

cold lynx
#

yea

#

thank you man

strong vapor
#

try a clean project for real though

#

that shit helps me so much

#

and then i look at my project.. and find the shit that's ruining everything lol

cold lynx
#

yeah

#

i m gonna try

#

u right

strong vapor
#

which is basically what im doing in myu project right now cause my characters are wayyyy too heavy on the rep properties and gameplay abilitiies and effects and shit

cold lynx
#

yea i know

#

its a pian to do this tho

#

pain

gentle iris
#

Hey. has anyone done replication of the trailer on the network?

shadow arch
#

Does anybody have any idea why "Play montage" doesn't act over the network the same as "Play anim montage"? As in play anim montage works over multicast but play montage doesn't ( and i need to know when the animation ends :/)

#

NVM i'm dumb, forgot to reference the mesh -_- ...

novel hemlock
#

Can i send a struct over RPC functions? It gives me error so I believe its not so simple

stray crescent
#

@novel hemlock whats the error?

novel hemlock
#

error C2079: 'RTSClientManager_eventServer_MoveGroupCharacter_Parms::Order' uses struct 'FOrderGroupMove' non defined

#

error C2079: 'Z_Param_Order' uses struct 'FOrderGroupMove' non defined

#

and others deriving from the struct

#

the struct its just a USTRUCT with some property inside

stray crescent
#

its a declarant error, shouldn't be related and I'm pretty sure that you can replicate structs

#

try the cpp channel tho

#

--------------HELP V--------------------------
I'm trying to understand multiplayer in UE4 but I cant find proper info on it...
here is the main bits:

  1. do I need a lobby?
    every tutorial I've seen has one tho I don't see a reason as to why I should have a lobby...
    can't I just go from main menu to the game?...

  2. where and when should I handle team assignment?
    I was thinking on doing it in the game mode before the match start

  3. what do I do when the game end?...
    just disconnect all the players?...
    how does a dedicated server suppose to handle that?...

novel hemlock
#

Oh i have been using struct MySruct to declarate it but it needed the include aswell

twin juniper
#

Do you want a lobby ?

#

@stray crescent check out kitty tutorials series on nazizombies lobby

#

It also answers all your questions.

#

Its about 100 videos have fun!

stray crescent
#

100? >.>

hollow bane
#

Iโ€™ve set up hosting and joining a session using the advanced session plugins and blueprints and have copied the steam stuff into the engine ini and packaged the game - when I run the exe Steam is hooked up and I can send invites for Steam friends to play. However, when they download the Spacewars app the file size is way smaller (which makes me think itโ€™s not my app) and they only have the option to watch or remote play. Newbie question: whatโ€™s the expected flow when you invite a friend to play (itโ€™s using the Space War 480 app ID).

stray crescent
#

the space war game isn't ur game, its some game that steam uses it's app id for devs

#

if u want to invite ur friends they will need ur packaged game files

#

@hollow bane ^

hollow bane
#

if u want to invite ur friends they will need to ur packaged game files
@stray crescent I did send my friend the packaged game but strangely he couldnโ€™t run it. Itโ€™s everything in the Win64 folder right? Is there somewhere specific they need to copy it? Thanks for the info. Also Iโ€™m not on steam works yet as not paying the $100 atm

stray crescent
#

when u package ur game it ask you where to put it

#

the win64 folder is the editor version I think...

hollow bane
#

the win64 folder is the editor version I think...
@stray crescent Itโ€™s fine my end and itโ€™s not the editor version. Runs fine for me.

stray crescent
#

it doesn't include almost any of the game files

#

it's just the executable and some config

hollow bane
#

Yeah thatโ€™s it

stray crescent
#

just package ur game

hollow bane
#

I have

#

Was just wondering whether thereโ€™s a specific folder my friends needs to copy to their end.

stray crescent
#

prob not

hollow bane
#

Strange. Once they have the exe and I host do I still need to invite via steam? Thatโ€™s the workflow I was expecting.

stray crescent
#

depend on how u set it up but it should work like that by default I think...

#

tho they do need to be in the game so it wont send them to spacewar

hollow bane
#

Yeah thatโ€™s what Iโ€™d anticipated too.

#

From the vids Iโ€™ve watched, the app ID 480 says itโ€™s space war but itโ€™s your game theyโ€™re invited to.

stray crescent
#

if they aren't in the game when steam try to launch the spacewar game it wont find it on ur pc so it will send u to the appstore to get it thats why they need to be in the game before joining

hollow bane
#

As Iโ€™m not signed up on Steamworks so donโ€™t have a unique app ID.

#

if they aren't in the game when steam try to launch the spacewar game it wont find it on ur pc so it will send u to the appstore to get it thats why they need to be in the game before joining
@stray crescent Not sure what you mean by in the game - I have a basic lobby - do you mean they need to launch the exe before I invite them?

stray crescent
#

yes

#

game as in like the application

hollow bane
#

@stray crescent Thanks for helping. Back to the drawing board!

shadow arch
#

you could always test by asking them to connect via console

fossil zinc
#

Hello guys. Im trying to make a game where 3 players play in multiplayer with a different pawn class each. Now I'm trying to assign the pawn class for each controller and been following this guide:
https://unreal.gg-labs.com/wiki-archives/networking/spawn-different-pawns-for-players-in-multiplayer

However, for some reason my code is only spawning the pawn class for the server, not the clients which receive a null class. Have any of you tried this before?

#

The idea is that you decide the class in the client and then notify the Server, but for some reason is not working.

vagrant grail
#

@hollow bane yeah but how long, because for me it's like 5 mins and nothing appears

hollow bane
#

@vagrant grail it's only about 10 seconds

vagrant grail
#

well for me nothing after 10 sec

shadow arch
#

is there a way to set server event priority?

#

like say i was spamming a movement command to the server (on tick basically) and then i needed to send a item pickup and had to make sure that pickup was received even through the spam

strong vapor
#

you can set them to Reliable

#

i think thats about it

red sand
#

Which server is better for the game
AWS Gamelift or SpatialOS
Someone said that SpatialOS is not what they recommend, but I still can't figure out why is that

fossil zinc
#

Anyone knows how to replicate a variable in the GameState? Or should they replicate always?

strong vapor
#

@fossil zinc you have to make it replicated yourself

#

the gamestate Itself is replicated.. but the variables you make on your child gamestate will have to be set to replicate

#

the theme is always to try and minimize how much gets replicated

fossil zinc
#

Yeah, any idea how to replicate them? I using C++ and for some reason the DOREPLIFETIME sends an error in the game State

#

Was trying to replicate them as usual buts not working

strong vapor
#

I dont know about replicating on the gamestate specifically.. but as far as i know it should just work the way any other replicated variable in C++ works

#

whats the error?

fossil zinc
#

Give me a sec I'll show u

#

@strong vapor

strong vapor
#

man, beats me

winged badger
#

uh

strong vapor
#

I'm not super savy on C++ though

winged badger
#

that is the most interesting networking bug in unreal

#

you don't have a Super call on your GetLifetimeReplicatedProps

#

which means among other things, GameState won't replicate match state

#

so your clients will never BeginPlay

fossil zinc
#

Oh

#

I get it

#

Also, I was missing an include "#include "Net/UnrealNetwork.h""

winged badger
#

yeah, but that won't cause a runtime error

strong vapor
#

wouldnt gamestate parent class already have that included?

fossil zinc
#

It should, but that solved the runtime error

#

I remember I had to put it somewhere else tho

winged badger
#

thats not how includes work

strong vapor
#

well.. if i inherit from a class.. dont i get everything from its parent?

#

im glad you're telling me this cause i totally thought htat's how they worked lol

winged badger
#

if you include a header, you also include everything that header includes

strong vapor
#

yesss

winged badger
#

but thats it

fossil zinc
#

Yeah, didn't had it in the header either

winged badger
#

you don't need it in the header

#

the UnrealNetwork.h

fossil zinc
#

Yes

#

It's only in the Cpp

#

Thanks guys, I took a while solving that one

#

Now the thing is, the variable is not being replicated in the server, only on cliens

#

Clients

#

Like they get the info from the server but no the other way around

strong vapor
#

well.. yea setting a replicatied variable from the client does nothing basically

#

its a one way street

#

you use RPC's to have the client tell the server to do something

fossil zinc
#

Any idea how the RPC's are used in C++?

strong vapor
#

for example.. i use an RPC to the server to tell it what my LookAtLocation is

#

there's lots of youtube stuff on that

#

I followed a tutorial a while back but havent done much in C++ since then

fossil zinc
#

Ok thanks, I'll take a look

strong vapor
#

I think it involves making a function.. and then having it replicate

winged badger
#

check pinned messages on this channel

strong vapor
#

there's no like.. event logic

winged badger
#

there is a network compendium link

strong vapor
#

oh.. right yea.. the cedric compendium

fossil zinc
#

Ohh cool!

fossil zinc
#

Guys, I made the RPC call but doesn't seem to be working. The idea is to have a common array that should be filled by all clients and stored in the Game State. My idea was to do the RPC from the clients and ask the Server to add a new entry to the array and, since that array is replicated, everyone will see it.

#

This is an Idea of what Im doing

meager spade
#

cant send a server rpc on gamestate

#

GameState is owned by server

#

you need to do that in your player controller.

fossil zinc
#

So I call the RPC from the controller? Or I make the whole call from there?

meager spade
#

well the rpc needs to be in the controller

#

its in the compendium

#

read it

fossil zinc
#

Ok, I'll take a look at it. I finally made it work, you were right. Thanks!

vagrant grail
#

I keep getting my unreal crashing, when I'm trying to select the world settings of my map, I'm just trying to change the gamemode for it but keeps crashing each time

#

Yeah it's definitly selecting the world settings of my level that makes it crash

gleaming niche
#

install engine symbols, will help

mellow stag
#

I am wondering how I can have my game go through steam but run off of a dedicated server?

#

Similar to Rust

vagrant grail
#

@gleaming niche engine symbols ?

#

What's that ?

rich ridge
#

@vagrant grail when you install engine from epic launcher, it gives you an option to install engine symbols.

vagrant grail
#

@rich ridge what's its purpose and why that thing will solve my problem ?

rich ridge
#

I can't say whether it will solve your problem you not, you were asking about engine symbols, so I told you how to get it

gleaming niche
#

whatever gamemode you keep selecting, doesn't have a valid class set for DefaultPawnClass, it's probably pointing to something you deleted, and is overriding the base class.

vagrant grail
#

but I already have unreal versions installed how can I instal the symbol thing without redownloading all the versions

gleaming niche
vagrant grail
#

27 Gb ? ๐Ÿ˜ฎ

rich ridge
#

Is it really that much, last time I tried it was around 9 GB.

vagrant grail
#

for me it's 27 Gb

rich ridge
#

Ok did you try what @gleaming niche told.

vagrant grail
#

downloading symbols ?

rich ridge
#

GameMode stuff

#

If you download the engine source and build engine locally then you don't need to download 27GB

gleaming niche
#

INSTALLED size is 27gb

#

download isn't that big

#

it's like 4

#

or 5.

vagrant grail
#

wut ?

shadow arch
#

Compression is a helluva invention tbh ;P

#

Quick question: when you delete an actor that had replicated variables do you need to do any garbage collection? or is that automatic

vagrant grail
#

@gleaming niche I just downloaded the thing, what should I do now ?

gleaming niche
vagrant grail
#

@gleaming niche what ?

gleaming niche
#

:sigh:

#

whatever game mode you ekep trying to select, in your world settings

#

has INVALID settings on DefaultPawnClass

#

according to your error paste

#

it's probably pointing to something you deleted

#

and never fixed

vagrant grail
#

I can't access the world settings

#

like at all

gleaming niche
#

okay well then it's Failed to find ClassProperty DefaultPawnClass in BlueprintGeneratedClass /Game/System/GameModes/GI_Multiplayer.GI_Multiplayer_C

#

GI_Multiplayer

#

is the problem

vagrant grail
#

so I have to delete it ?

gleaming niche
#

open that blueprint and fix it

vagrant grail
#

fix what in that blueprint, I have no error

#

@gleaming niche Creating a new GameInstance and deleting the old one fixed it for me

red sand
#

How to assign a team automatically when player joins the lobby

rich ridge
#

@red sand engine doesn't provide any functionality to do this kind of stuff while you are in lobby. This is more of tha OSS level implementation logic.

gleaming niche
#

depends on what you mean by lobby.

red sand
#

@gleaming niche Like when you join the match, at character selection screen before the match begins

gleaming niche
#

but this is after actually connecting to server, right?

red sand
#

yup

gleaming niche
#

yeah, that's easy.

#

just modify postlogin in your game mode

#

and auto-assign a team.

red sand
#

Character selection is on different map, how to keep the team data when u travel to different map

gleaming niche
#

depends on how you save it

red sand
#

What would be the best way to save it

gleaming niche
#

well you have a couple ways. if character selection doesn't need any real validation, you can just make something like persistent user, using USaveGame, and just store the selection locally

#

and then after they join, just send it down

#

ie: in one of my vr projects, I just had the server send an rpc from postlogin to client, to request character data

#

and then client responds sending body, boat, etc

#

and then server spawns them

red sand
#

I see

#

And what if character selection requires validation

gleaming niche
#

i do that on join to the server.

#

lol

#

i mean you can still validate, even the other way

#

if they send bogus data, default it

red sand
#

gotcha

#

Thanks @gleaming niche

gleaming niche
#

yw

vagrant grail
#

@gleaming niche are you there ?

#

I'm watching this video, he wraps the horizontal box with a button and did some code on the graph editor, I did the same but my button isn't clickable and can't join the session like he showed on his video https://youtu.be/x9S2YttksKY?list=PLXBIyoKwiri1NxwGouMS5w7ziCoT7Yx7b&t=271

If you have any questions, write ask them in the comments. Let me know how hard it is to follow these tutorials.

As always, thanks for watching

โ–ถ Play video
gleaming niche
#

you have a label?

#

child of the button?

#

if you do, set it's visibility to HitTestInvisible

#

label probably blcking the click.

vagrant grail
red sand
#

Why is ur horizontal box child of a button?

vagrant grail
#

Because in the tutorial it's like that, and more precisly, is to be able to press anywhere in the widget to join the session

red sand
#

Ahh I see now

rich ridge
#

@red sand there is full engine support for setting default pawn for every player who joined the session.

Basically you need to set the pawn class and GameMode will automatically spawn that class for every player when match starts.

#

I assume character selection is kind of draft pick. That time must be doing some sort of RPC to server to validate and let your server set the pawn class inside of respective PlayerController. And when game starts the GameMode will pick that pawn class automatically from every PlayerController

gleaming niche
#

@vagrant grail set the horizontalbox to SelfHitTestInvisibleIncludingchildren or whatever it is.

vagrant grail
#

@gleaming niche same problem

#

Ok problem solved, I had to remove the canvas panel from the widget because I was clicking on the canvas panel

hollow bane
#

Finally got hosting and joining working on steam (hooray). The main issue is that the person joining has a weird camera offset. Anyone know what might be causing this? Many thanks in advance.

wicked nimbus
#

hello,
Can someone point me into the right direction on the following topic: I need to implement a social hub area for a game. The idea is to have the players start the game connect to a hub via a matchmaking service see other folk running around and interacting in some form. Then form a group and connect to a p2p steam/eos connection to play the actual game (1-4) players.
From what I know, I can't have multiple sessions running at the same time, so I have to a) know the peers that want to connect to a session, b) close the dedicated connection 3) switch over to the new session using the group leader with some form of connection-process.

Is there anything I can use that helps me achieve that? I looked at Online Beacons but they seem to not be what I need?

winged badger
#

dedicated server?

#

you can do that with steam lobbies

wicked nimbus
#

As far as I know I can't? Its two separate servers (one dedicated for lets say 50 to 100 people, 1 one hosted on the players pc as p2p) and I can only have one Unreal Session at a time, can't I?

gleaming niche
#

if you use session names properly, instad of the default NAME_GameSession, you can have multiple sessions.

#

alternatively if you just use steam directly, you can also just do it that way.

wicked nimbus
#

Can you point me at a documentation or something in that regard would love to read into that

winged badger
#

with lobbies, docs are on steam API

#

you could have everyone join one large lobby in social area, make a new one when party is ready to go out

#

and use the lobby to send the url

wicked nimbus
#

I will have another look at that, thanks

vagrant grail
#

@hollow bane Is the camera shaking on the client side?

hollow bane
#

@hollow bane Is the camera shaking on the client side?
@vagrant grail Itโ€™s more like the camera is offset for the person joining.

wicked nimbus
#

Ok, I was able to create two sessions by doing a CreateSession(*Helper.UserID, NAME_PartySession, Settings); and CreateSession(*Helper.UserID, NAME_GameSession, Settings);
Is it true that my players would first connect to a dedicated server (the hub) using a new Game Session. Then potentially form a group using Party Session. Then disconnect from the hub. Then use the Party Session to exchange data and connect to a new game session (the actual mission or whatever)

winged badger
#

its why i prefer lobbies, makes it a little bit simpler

#

and also, the chat then goes through steam, taking that bit of load off my server

wicked nimbus
#

Assume, I'm not able to use steam; Do you refer to Lobbies as in SteamLobbies?

#

At the moment I try to grasp the involved concepts, for example: atm, I don't know how to initiate a new game session from a party session. Notifying all peers to connect to the planned host and initiating a travel.

shadow arch
#

Conceptual question: If one were to try and make an act system like in diablo in a networked game. What way would there be to implement that?

#

The only ideas i have so far is creating a new server that loads a specific map for every "area" or just having a giant map that the player gets teleported around in

rose egret
#

what's the right way to handle input events when there is no pawn ? for instance esc for pause men when pawn died.

#

๐Ÿค”

strong vapor
#

@shadow arch world composition is pretty sweet.. you can have a massive world that isnt all loaded at once.. and it works in multiplayer.. but your AI's will lose their navmesh if your players walk away far enough from the Terrain.. so you kinda gotta be cool with just destroying any Ai's that arent near the players current loaded area

#

@rose egret playa controlllaaaa lol

#

ahem.. in the player controller script

shadow arch
#

@strong vapor yeah i don't mind AI being destroyed if players get too far and them not having navmesh when not close to players isn't an issue since they just idle in place anyways. So is this in the docs of unreal or is it just an assumed thing where if your world is giant enough and no players are near it just won't load

#

because that makes my life a lot easier than having to make some mmo style instances

strong vapor
#

its in docs

#

and on youtube

#

if you just youtube or google "World Composition UE4" you'll find what you're lookin for

#

there was a live stream

shadow arch
#

Yeah thanks, it's actually a lot cooler than i thought! So i can basically "load" maps without actually changing maps

strong vapor
#

well.. yea

#

you have a bunch of map tiles

#

its for open world

#

and you're only loading the map tiles that you're near

#

so if you wanted to load everyone into like.. a completely different realm

#

then idk

#

world compmight not be best for that

shadow arch
#

Well i'm making a diablo style game (for shits and giggles) so i assume if is set the different maps far enough from each other it'll work fine

strong vapor
#

yea true

#

but you can also do seamless travel i think

#

which isnt related to world comp

#

seamless travel is another good google search for you too

shadow arch
#

yeah but say you have 4 people in the game you would need all 4 to be moved at once no?

strong vapor
#

no

#

you could have people be on opposite sides of the map

shadow arch
#

oh? gonna have to look into that too then

strong vapor
#

it'll load anything a player is in

#

ya seamless travel is just some map loading stuff

#

its where you bring everyone on the server to a new map

#

like going back to the lobby after a game of halo

#

and then into another map for next game

#

the opposite of seamless travel i think.. is where it literally disconnects everyone from the server and reconnects them to another map... and i dont think anyone uses that .. idk

shadow arch
#

yeah i wouldn't use that either tbh

strong vapor
#

i watched some videos on this stuff a while back

#

yea i think its the oldest way of doing things in unreal

shadow arch
#

but in my case i think world comp is better. I'd rather if all the players were independant

strong vapor
#

yea world comp is sweet for open world

#

s

#

but i think if you were doing like a classic diablo style

#

it would just be seamless travel

#

the thing about world comp is that.. no matter how far anyone is away from eachother.. they're still on teh same server

shadow arch
#

well diablo 2 had only one instance of a dungeon per run

strong vapor
#

there's only one group of people on one server.. not like modern mmo's where you warp to a different zone and you might see new faces

shadow arch
#

and everyone was technically on the same server

strong vapor
#

yes exactly one instance per dungeon.. but if you had guys in world comp.. going to different dungeons

#

those dungeons would all still be on the same server

shadow arch
#

wait world comp starts a new instance?

strong vapor
#

no no

#

thats what im saying

#

it doesnt

shadow arch
#

ok then yeah it's the same as diablo 2 then

strong vapor
#

its all still getting loaded on one server

#

i am.. only really familiar with diablo 3?... sorry.. lol.. im a scrub lol

shadow arch
#

diablo 2 only had 1 instance of everything per server

strong vapor
#

i think 3 is like that too

shadow arch
#

yeah no worries. Diablo 3 they did more like path of exile where you can get out of a zone and restart the zone in a new instance

strong vapor
#

but its like.. when you warp to the desert level.... there is no Old Tristam anymore

shadow arch
#

truuue

strong vapor
#

but if you did in world comp.. players could totally still be hangin out in old tristam

#

but its gonna drain your CPU if you wanna have tons of shit going on

#

cause its all on the same instance

#

world comp wasnt designed for multiplayer but it works ok with it

shadow arch
#

but that might just be a gamestate thing where if you say have bool FinishedAct3 = true then instead of teleporting to act1_first you teleport to act1_second

strong vapor
#

right, but diablo is never gonna teleport some guys to a new level and leave some of them where they are

#

that level you're on gets destroyed and everyone gets brought to the new level

#

and btw.. you could have multiple maps that have world comp

#

so like.. multiple big open world levels

shadow arch
#

yeah but then i'd need multiple servers wouldn't i?

strong vapor
#

i dont mean loaded at once

#

i mean you could have a giant 10x10 km map that only loads small tiles of itself in world comp

#

but then.. also have an entirely other world thats 10x10km that people get loaded into later

shadow arch
#

hmmmmm

strong vapor
#

if you wanted super different atmosphere

#

and post processing

#

i feel like you would right? cause.. there's not really a way to make old tristam look like heaven or kreat

shadow arch
#

ah that's true you can't have different skybox and whatnot for world comp can you

strong vapor
#

right exactly

#

cause in world comp there's always the "persistent" level

#

and thats where your skybox would be

#

definitely check out hte live stream on world comp

#

its on youtube pretty easy to find i think

shadow arch
#

yeah i will, because so far it seems like the most doable of all the alternatives

#

short of hosting 1 server for each instance in the game

strong vapor
#

yea.. modern MMO's usually have multiple servers that hold different levels of the game world

#

and so you warp.. and all the sudden you see players you didnt see in the last level

#

but that's not stuff unreal does for you

#

you gotta implement that stuff yourself

#

idk how it works

#

lol

shadow arch
#

i have a pretty good idea of how it works but i think it's just too complicated for a simple game like i'm making. Not trying to make an mmo

#

For a game with like 2-10 people max mmo infrastructure is overkill, so yeah worldcomp is what i'm gonna go with. Thanks. Gonna go look up the videos

strong vapor
#

no problem dude, also remember Seamless Travel

#

peace out!

shadow arch
#

I'll check that one out too. Thanks for the ideas! Catch ya later!

plucky crow
#

@sweet heart Do you know how can i count all of the players that have a certain variable off?

#

I need it for an elimination gamemode

#

(round reset stuff)

novel hemlock
#

@sweet heart Do you know how can i count all of the players that have a certain variable off?
@plucky crow I think you could just get the list of player in your gamestate and get their playerstate or where you stored that variable?

plucky crow
#

The variable is stored in the player character

#

so i added it in a test player state

#

and it looks like this

#

how do i...count it?

fossil zinc
#

Hey guys, anyone knows why would my Steam configuration is not working? Just followed a bunch of tutorials, downloaded the pluging and changed the Engine.ini, also when I open the engine the plugings say that they are enabled. However when I run as Stand Alone is not working. You guys what could I try to know why isn't working?

strong vapor
#

@plucky crow are you trying to count how many players are dead?

plucky crow
#

yes

strong vapor
#

or do you wanna know WHICH players are dead

plucky crow
#

only how many

#

or more exactly, how many alive

strong vapor
#

have an int.. and increment it in the body of your foreach there

plucky crow
#

so when a player dies i and there is only one left i can send an update to the gamemode

strong vapor
#

if "isDead" is true.. incriment the Integer

#

nice.. and then on completed.. you can see what the ints'

#

value is

plucky crow
#

wait let me check

#

increment like add?

#

for every time?

strong vapor
#

i think there is an actual Incriment node

#

++

#

its like.. the variable followed by ++

#

and it actually adds 1 and sets it again

#

super nifty

plucky crow
#

thats the equal

strong vapor
#

and then i guess at the end you'd compare it to the length of your player state array

#

make an Int variable

#

and then put it on your graph.. and drag off it and press "+"

plucky crow
#

like this you mean?

strong vapor
#

ohh yeauuhh

#

๐Ÿ˜Ž

#

oh also set it to zero right before the foreach

#

and like.. that could evne just be a local variable instead of a member variable.. if you put that in a function

plucky crow
strong vapor
#

yessir

#

and then on completed.. get the length of your player state array (the one you're doing the Foreach loop on) and compare it to the value of that int

naive shell
#

Any tutorials in listen multiplayer because I cant get the clints to join ๐Ÿ˜ฆ

plucky crow
#

well it doesnt let me get the lenght =))

#

buut

#

i can just compare to see if its bigger than 1

strong vapor
#

@fossil zinc i dont know if this would help you but it never hurts to delete the binaries and intermediate files and stuff.. let your project rebuild.. might make shit work.. works for me sometimes depending on the issue

plucky crow
#

since yk i only need one player to be alive

strong vapor
#

the array

#

the array of players that you're doing the foreach on

#

drag off of it

#

and type "length"

plucky crow
strong vapor
#

uhh

#

nevermind what is aid

#

you dont wanna compare it to the length of the players

#

im done

#

dumb

plucky crow
#

yeah yaeh

strong vapor
#

you were right

#

lol

plucky crow
#

but idk if its right tho

strong vapor
#

you just need it to be bigger than 1 lololol

plucky crow
#

well yea

#

THATS WHY

#

haha

strong vapor
#

you definitely dont want it to be greater than the amount of players

#

that wouldnt make ANY sense

plucky crow
#

yeah

strong vapor
#

and it would never be true ever

plucky crow
#

obviously

#

thanks for the help

strong vapor
#

if you wanted to know if a percentage of players were alive then that would help

#

you could get the playerstate length, and then divide it by 2 or something

#

and make sure theres more players alive then that

plucky crow
#

@naive shell you can use the tutorial they have

#

like the unreal people

strong vapor
#

but ya... for just making sure there's atleast one player alive you're good

zinc owl
#

Which One is better third party for multiplayer handling in ue4? Photon?? or other?? Like shooting game realtime....

plucky crow
#

also

#

like if the casting is right (i dont get errors on casting)

strong vapor
#

yea you're good i think

#

how often are you checking this?

#

just when someone dies?

plucky crow
#

after a palyer dies

#

yes

strong vapor
#

cool

#

yea that seems pretty solid

plucky crow
#

also

#

should it be run on server or what?

strong vapor
#

yea

plucky crow
#

its in gamestate so run on server but im not sure

strong vapor
#

yea the gamestate is owned by the server

plucky crow
#

same with gamemode right?

strong vapor
#

so.. im not sure, i'd have to experiment.. but im pretty sure theres no such things as client functions on gamestate

#

yea

#

gamemode DEF is just on server

#

the gamestate replicates to the clients though

#

where gamemode.. does NOT do that

#

a client can get the gamestate, and get repped variables off it

#

but i think if you were to just call a function on the gamestate from a client without doing a server event first.. nothing would happen

plucky crow
#

i see

#

can you vc a bit?

#

i have a question since im seeing like 20 versions of sending damage

strong vapor
#

you'll wanna hit a server event in your player controller or character or whatever you're mostly using

#

i can't voice chat right now , im hangin out with my girlfriend and she's already givin me nasty looks lolol

meager spade
#

what is Players

#

in GameMode ?

strong vapor
#

maybe later though

#

ill pm you

plucky crow
#

where do you think i should do the shooting?

#

ok

meager spade
#

that doesn't seem like a UE4 property

#

@plucky crow

strong vapor
#

there's nothing called a player

#

there's player controllers

#

and player states

meager spade
#

no he has a property

#

called Players in GameMode

#

iirc default GameMode does not have that

strong vapor
#

i think its player states

#

cause he's getting it from the gamestate

meager spade
#

no

#

its from the GM

strong vapor
#

oh

plucky crow
#

let me remember

plucky crow
#

i think it has all of the player controllers or something

#

not sure

meager spade
#

but why tho

#

some stupid tutorial told you to do that?

strong vapor
#

its just a variable YOU made on your custom game mode

#

yeaaa.. thats redundant isnt it

plucky crow
#

yeah i think i make it when spawning the players in the server

meager spade
#

why tho

#

GameState has PlayerArray

strong vapor
#

well.. the gamestate already yea

#

what he said

#

lol

plucky crow
#

i think its used while creating the tags

#

or the names

#

oh yeah the names i think

strong vapor
#

i gotta go guys! peace!

plucky crow
#

for the "waiting players"

meager spade
#

yeah but your doing additional book keeping for no reason tho

plucky crow
#

cya @strong vapor

meager spade
#

you shouldn't need to do that either

#

waiting players can just wait, once NumTravellingPlayers is 0, then you start the match

#

(if you use Server Travel)

#

but anyway any logic to do with how the game flows, should be in GameMode

#

so your above thing should be in the GameMode not the GameState

#

GameState is literally just for "State"

#

also shooting depends on what you need, but ultimately only the server should Apply Damage/Kill a Player.

plucky crow
#

ok so im moving stuff to the gamemode

#

also shooting depends on what you need, but ultimately only the server should Apply Damage/Kill a Player.
@meager spade some people do it from the gamemode , like they cast the rays there

meager spade
#

no

#

that is terrible

#

why would GameMode do shooting?

plucky crow
#

but i saw others casting the rays in characterBP and then telling the server to damage to that location

#

idfk

meager spade
#

what purpose has GameMode to do with Weapons?

#

this is what you need to think about

#

in my game, Weapons handle the stuff themselves (they are independant actors)

#

all RPC's everything

#

all the traces, hit detecting, applying damage, etc is all encapsulated in the weapon itself.

#

people who don't understand or new, and make these god awful tutorials, do things terribly wrong. Especially for Blueprint.

plucky crow
#

GameState has PlayerArray
@meager spade so i tried to put this into the for each loop but then i cant get the player state

#

people who don't understand or new, and make these god awful tutorials, do things terribly wrong. Especially for Blueprint.
@meager spade yeah i get it

meager spade
#

GameMode has GameState

#

all PlayerStates in the game.

plucky crow
#

i mean without the thing down

#

just the first lines

meager spade
#

i also recommend using Not

#

IsDead -> Not -> Branch

#

and putting it on the true pin

#

it makes the graph easier to read

plucky crow
#

how about this?

meager spade
#

also why is that a Server RPC

#

you can't call Server RPCs from GameMode/GameState

#

what call's that function?

plucky crow
#

after a player dies

meager spade
#

why not just have it on a timer tick

#

like mostly every game

#

all games like Fortnite/UT4 etc, have a timer that runs every 1 second

#

called GameTimer

#

this should check all players if they are dead, then just call Next Round

plucky crow
#

so a timer by event after event begin play?

meager spade
#

well you should start it when the match starts and every player is alive

peak star
#

Can anyone direct me to a patch that will fix the bug where Android cannot find Sessions on LAN?

plucky crow
#

not made yet but i will add an automatic "shop" deleter after 30s , should i put this after that?

peak star
#

I think this has been a bug since 4.19 but I would rather not lose some of the features I am using on the newer versions with no guarantee that older versions do not also have the problem

naive shell
#

@dull lance im running two clients inside editor not built game.

dull lance
#

why

#

what's the point of that

naive shell
#

For testing it faster

meager spade
#

then you can just start the timer on BeginPlay or w/e and no RPC's or nothing is needed

#

this is as simple as it can be

naive shell
#

Wait, now it works. Gimme a sec

plucky crow
#

ok, thanks

#

very good information

#

one tiny problem thats been bugging me tho

#

"The asset '/Game/FirstPersonBP/Blueprints/FirstPersonGameMode' (FirstPersonGameMode.uasset) cannot be saved as the package is locked because you are in play on PC mode.

Cancel: Stop saving all assets and return to the editor.
Retry: Attempt to save the asset again.
Continue: Skip saving this asset only.
"

#

this fucking error

naive shell
#

When I run two in editor instances, sessions work. But with built game it does not

dull lance
#

is your host opening the level

naive shell
#

Ye

dull lance
#

or are you trying both to connect

naive shell
#

One is the host and works

dull lance
#

your host should not be opening any ips

naive shell
#

One client works as host, creates the session and joins perfectly. The other one finds a session and joins

bitter oriole
#

If you have sessions, no IPs are involved

naive shell
#

Im trying both, sessions work when I run the clients in editor but not with built game

bitter oriole
#

That's probably not true because editor disables session support

naive shell
#

Somehow it workd

bitter oriole
#

Start simple and test your sessions with standalone unpackaged builds

#

Basically right click uproject, launch

naive shell
#

Yeh thats how Im testing it also

bitter oriole
#

If you're using Steam don't forget the game in Shipping package requires to be started from the Steam app

naive shell
#

This in my engine.ini ```[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
AppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

bitter oriole
#

Yeah I guess you're doing a shipping build and didn't add an appid file

strong vapor
#

@plucky crow that happens sometimes if you compile and then save too quickly.. its actually better to save and THEN compile

#

when that happens to me i just DONT save.. close the editor

#

open it back up

#

write the code again

#

and then ... SAVE ... then compile

plucky crow
#

i see

#

will try (im in a match now)

naive shell
#

@bitter oriole sessions exclusively uses dedicated servers?

bitter oriole
#

No

naive shell
#

So I can make the same approach of one client being the host?

bitter oriole
#

Sessions are unrelated to the UE4 multiplayer system

#

They're owned by Steam or whatever platform you're on

#

The only time they're actually linked is when you join a game

naive shell
#

Transition map should be empty?

bitter oriole
#

What is your problem here ?

naive shell
#

Clients cant join session

bitter oriole
#

Did you read my message here :

If you're using Steam don't forget the game in Shipping package requires to be started from the Steam app

#

In case you're doing Shipping packages

naive shell
#

Im not going to use steam atm, im just testing

plucky crow
#

@strong vapor still doesnt work

bitter oriole
#

You are using Steam, so

#

Per your config file

#

So you are using Steam sessions

#

You're asking why it doesn't work, I'm suggesting a possible answer

naive shell
#

What do you mean with started from the steam app?

bitter oriole
#

From your Steam library

naive shell
#

But I dont have my game published on steam

strong vapor
#

@plucky crow try restarting your computer?

bitter oriole
#

So either use a Development package only, or add an appid.txt file next to yopur game binary with the steam ID

naive shell
#

Yeh atm I just use developemnt build, no shipping

bitter oriole
#

So add some logs and check what happens on that client

naive shell
#

Im doing so

plucky crow
#

it works

#

the ue editor was opened 3 times @strong vapor

strong vapor
#

lol!

naive shell
#

The Join Session node returns OnFailure, so smt is wrong

#

Wait, if im using steam and I have two clients, they are basically using the same account, right?