#multiplayer
1 messages ยท Page 566 of 1
note that if server received a connection request in its logs
its not port forwarding, other things can go wrong too
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...
The port forwarding tester is a utility used to identify your external IP address and detect open ports on your connection. This tool is useful for finding out if your port forwarding is setup correctly or if your server applications are being blocked by a firewall.
I can't get it open at all
like 10 different tries at this point w different ports
yeah, im not reading through that
paste your logs, server, starting with opening the networked level
or just drop the entire log file here
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
logs, "server/client is fine" tells me nothing
@winged badger Im at optimization.. im trying to ship in a few months
dedicated
it's a port issue holy.. but here you go
[/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
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
not in editor logs @jagged olive, the server logs since it opens the level until the client attempts a connection
@winged badger and you put that in the Game.ini???
in any case
hte server logs are the black
when my friend tries to connect the server never even sees a request
yeah, that doesn't look like LogNet logging
i have no idea why would anyone ever do that
time messing around server architecture is time not developing the game
and there are plenty of solid, working tested solutions out there
anywho.. I can't get ports open on my router. That's it
@strong vapor DefaultEngine.ini, out net profiler suggested that our client up rate was higher then the limit at times
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
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
we invested quite a bit of effort into reducing a number of replicated actors
i think i like the idea of dummy projectiles
made network manager actors, 16 of them do the replication for 2000 interactable actors
no, fastarrays in network managers
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?
that depends on how handy you are with c++
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..
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
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
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
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
its just an Actor we called NeworkManager
read NetSerialization.h header
all delta serialization documentation is in it
oh
cause there's actually a c++ base class
righ right i remember him saying that in the livestream
thank you again
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
whats your target framerate?
it should run on 60 on low-mid end gaming laptop
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
if you did networkign in blueprints
third/first person medieval rpg brawler kinda game
its kindofa wonder the game works at all
lololol
welll
LUCKILY
the gameplay ability system is pretty sweet
it kinda handles most the networking stuff
i found GAS too complex for the size of the design team
and other than that im just tryin to set reasonable settings
so i implemented my own, with 10% complexity and 70% functionality
but then again, no game will ever use entirety of GAS code
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"
having 4 different rules on how buffs stack would be a UX suicide
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
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
right on ill remember to do that
How did it have that much of an effect on performance?? An empty tick?
ive definitely turned tick off on a bunch of actors that dont need it
Did you disable Ticking?
i watched that optimization stream a while back
Altogether
I know they do, thats why im confused.
the logic is still in there "bCanEverTick"
As to why simply deleting the Nodes would improve performance that much, if at all.
as long as thats' on.. its gonna keep updating
oh you're saying the engine should implicitly know
it did, and component TIcks in c++
right.. i bet in another 5 years it would
Savings on virtual function calls maybe?
it could not find a ReceiveTick implementation on the BP class
right yea.. thats what i mean.. they would have to code that in the blueprint scripting editor
so it didn't do the entire call to BP event part
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!!
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
do components tick if the actor doesnt tick?
for example, HealthComponent will turn off its Tick (doing regeneration) if you're at max HP
in GAS there's a tag for that LOL
uhhhh well thats good to know lol
i've been wondering if i have too many tags
lololololol
and i apparently dont
@fossil spoke blueprint event is called ReceiveTick, - UFUNCTION(BlueprintImplementableEvent) its not an override of Tick/TickComponent function
Yes i understand that, i suppose given the number of instances your working with it makes more sense.
removing WidgetComponents from Actors and putting it on the PC (for mouseover info) - so there is only one - was one of the biggest saves
One WidgetComponent?
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
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
Interesting approach.
simple as in small health bar, indicators and such
So im guessing then that you dont display Text elements?
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
Unfortunately we dont have a Tech Artist ATM ๐ฆ
that sucks
Yeeeep
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
What is the game btw?
8 player co-op tactical shooter with isometric camera
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
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
you're stuck with a pretty tiny levels with that approach
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..
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...
[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
@strong vapor Where is "should advertise" thing ? I tried with standalone, viewport and new editor window none of these work
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?
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
yeah
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
@strong vapor "should advertise check" was already checked by deafault
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?
it runs like a normal function on the server.
it runs like a normal function on the server.
@gleaming niche Normal function = locally without any weird route?
yes
oh thanks
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 ''
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...
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.
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?
is it the same map?
Yes
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)
But it still needs to load the travel map right?
idk how travelling works yet
Good afternoon. Can I always count on an array to retain its order as it's passed around via RPC?
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
@waxen socket yep, full array is sent when using RPC so will retain order
Great. I was dismayed that maps don't replicate but with this I can cope.
Has anyone already replicate two bones ik?
anyone very stron gin ik anim replication here ?
Not something you would usually replicate tbh
Players should handle all IK themselves locally
you should definitely not replicate IK
how you do to make a driving multiplayer game where player have a body then ?
yeah
i agree
but there
the client doesnt even
as long as the player is running and in correct position
it doesn't matter one bit if client sees it with right or left foot forward
@cold lynx Check out the ShooterGame in the learn tab.. they handle replication, aim offset, all that stuff
also! http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf this is amazing if you're not super savy on replication
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
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
yeah i agree of course
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
yes the ik is in the anim bp
are you just tryin to do a foot ik?
but the weird thing that i cant undestrand
or hands on guns? orr?
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
mmmm
it is working in offline mod
so you're using some location or transform from the steering wheel
yes
make sure that is getting replicated
so the wheel turns on the clients but the hands dont follow?
yes
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?
anchors.... hmmm im not familiar
i know about like.. widget blueprint transform anchors
billbloards
hmm yea i dont know exactly what you're talking about
i would use a socket on the steering wheel mesh i think
well its a class in unreal
two sockets.. one for left hand and one for right
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)
so you have a static mesh of a steering wheel somewhere though
yeah
put two sockets on that static mesh asset
attatch to my car
open it up in the editor
oh, you think that would be better than scene component ?
yea i think its cheaper, not sure though
yeah well good to know
i was told at some point to use sockets instead of scene components i dont know if its actually a huge deal
i wouldnt say super strong but i've got a working Multiplayer RPG build that im working on
yeah
optimizing right now.. tryign to figure out how many characters i can really fit in the game world at once
i have made a multiplayer shooter
lol shit
the socket thing is nice cause it already exists on the asset.. so nothing needs to get replicated
each client is gonna have the same static mesh with the same sockets.. so those hands will go right to em
i havent done this super recently but i've done it a few times
so im pretty confident that approach will work
ok
im gonnna try
if its not working would be ok to help me again or its to strange to ask maybe lol
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
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
yeah but i think the weird part here is that I am posssesiong that vehicle
something i like to do is just make a fresh project and try to implement ONLY the thing that's giving me problems
cause ya like you just said.. maybe osmething weird is happenign cause of how your doing things
i dont think that should matter though?
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
man i wish we could do a call where i share you my screen
i think that would be fast
you seems decent
lol!
all good
its not easy trying to understand complex things in another language im sure
gotta be hard
yea i know man
well.. im gonna go
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
well you can add me
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
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
Hey. has anyone done replication of the trailer on the network?
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 -_- ...
Can i send a struct over RPC functions? It gives me error so I believe its not so simple
@novel hemlock whats the error?
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
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:
-
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?... -
where and when should I handle team assignment?
I was thinking on doing it in the game mode before the match start -
what do I do when the game end?...
just disconnect all the players?...
how does a dedicated server suppose to handle that?...
Oh i have been using struct MySruct to declarate it but it needed the include aswell
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!
100? >.>
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).
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 ^
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
when u package ur game it ask you where to put it
the win64 folder is the editor version I think...
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.
it doesn't include almost any of the game files
it's just the executable and some config
Yeah thatโs it
just package ur game
I have
Was just wondering whether thereโs a specific folder my friends needs to copy to their end.
prob not
Strange. Once they have the exe and I host do I still need to invite via steam? Thatโs the workflow I was expecting.
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
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.
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
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 Thanks for helping. Back to the drawing board!
you could always test by asking them to connect via console
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.
@hollow bane yeah but how long, because for me it's like 5 mins and nothing appears
@vagrant grail it's only about 10 seconds
well for me nothing after 10 sec
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
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
Anyone knows how to replicate a variable in the GameState? Or should they replicate always?
@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
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
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?
man, beats me
uh
I'm not super savy on C++ though
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
yeah, but that won't cause a runtime error
wouldnt gamestate parent class already have that included?
It should, but that solved the runtime error
I remember I had to put it somewhere else tho
thats not how includes work
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
if you include a header, you also include everything that header includes
yesss
but thats it
Yeah, didn't had it in the header either
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
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
Any idea how the RPC's are used in C++?
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
Ok thanks, I'll take a look
I think it involves making a function.. and then having it replicate
check pinned messages on this channel
there's no like.. event logic
there is a network compendium link
oh.. right yea.. the cedric compendium
Ohh cool!
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
cant send a server rpc on gamestate
GameState is owned by server
you need to do that in your player controller.
So I call the RPC from the controller? Or I make the whole call from there?
Ok, I'll take a look at it. I finally made it work, you were right. Thanks!
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
install engine symbols, will help
I am wondering how I can have my game go through steam but run off of a dedicated server?
Similar to Rust
@vagrant grail when you install engine from epic launcher, it gives you an option to install engine symbols.
@rich ridge what's its purpose and why that thing will solve my problem ?
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
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.
but I already have unreal versions installed how can I instal the symbol thing without redownloading all the versions
27 Gb ? ๐ฎ
Is it really that much, last time I tried it was around 9 GB.
for me it's 27 Gb
Ok did you try what @gleaming niche told.
downloading symbols ?
GameMode stuff
If you download the engine source and build engine locally then you don't need to download 27GB
wut ?
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
@gleaming niche I just downloaded the thing, what should I do now ?
@vagrant grail #multiplayer message
@gleaming niche what ?
: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
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
so I have to delete it ?
open that blueprint and fix it
fix what in that blueprint, I have no error
@gleaming niche Creating a new GameInstance and deleting the old one fixed it for me
How to assign a team automatically when player joins the lobby
@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.
depends on what you mean by lobby.
@gleaming niche Like when you join the match, at character selection screen before the match begins
but this is after actually connecting to server, right?
yup
yeah, that's easy.
just modify postlogin in your game mode
and auto-assign a team.
Character selection is on different map, how to keep the team data when u travel to different map
depends on how you save it
What would be the best way to save it
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
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
yw
@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
you have a label?
child of the button?
if you do, set it's visibility to HitTestInvisible
label probably blcking the click.
I have this
Why is ur horizontal box child of a button?
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
Ahh I see now
@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
@vagrant grail set the horizontalbox to SelfHitTestInvisibleIncludingchildren or whatever it is.
@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
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.
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?
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?
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.
Can you point me at a documentation or something in that regard would love to read into that
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
I will have another look at that, thanks
@hollow bane Is the camera shaking on the client side?
@hollow bane Is the camera shaking on the client side?
@vagrant grail Itโs more like the camera is offset for the person joining.
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)
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
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.
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
what's the right way to handle input events when there is no pawn ? for instance esc for pause men when pawn died.
๐ค
@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
@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
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
Yeah thanks, it's actually a lot cooler than i thought! So i can basically "load" maps without actually changing maps
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
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
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
yeah but say you have 4 people in the game you would need all 4 to be moved at once no?
oh? gonna have to look into that too then
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
yeah i wouldn't use that either tbh
i watched some videos on this stuff a while back
yea i think its the oldest way of doing things in unreal
but in my case i think world comp is better. I'd rather if all the players were independant
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
well diablo 2 had only one instance of a dungeon per run
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
and everyone was technically on the same server
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
wait world comp starts a new instance?
ok then yeah it's the same as diablo 2 then
its all still getting loaded on one server
i am.. only really familiar with diablo 3?... sorry.. lol.. im a scrub lol
diablo 2 only had 1 instance of everything per server
i think 3 is like that too
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
but its like.. when you warp to the desert level.... there is no Old Tristam anymore
truuue
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
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
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
yeah but then i'd need multiple servers wouldn't i?
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
hmmmmm
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
ah that's true you can't have different skybox and whatnot for world comp can you
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
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
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
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
I'll check that one out too. Thanks for the ideas! Catch ya later!
@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)
@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?
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?
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?
@plucky crow are you trying to count how many players are dead?
yes
or do you wanna know WHICH players are dead
have an int.. and increment it in the body of your foreach there
so when a player dies i and there is only one left i can send an update to the gamemode
if "isDead" is true.. incriment the Integer
nice.. and then on completed.. you can see what the ints'
value is
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
thats the equal
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 "+"
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
like this?
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
Any tutorials in listen multiplayer because I cant get the clints to join ๐ฆ
well it doesnt let me get the lenght =))
buut
i can just compare to see if its bigger than 1
@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
since yk i only need one player to be alive
the array
the array of players that you're doing the foreach on
drag off of it
and type "length"
like this
uhh
nevermind what is aid
you dont wanna compare it to the length of the players
im done
dumb
yeah yaeh
but idk if its right tho
you just need it to be bigger than 1 lololol
you definitely dont want it to be greater than the amount of players
that wouldnt make ANY sense
yeah
and it would never be true ever
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
but ya... for just making sure there's atleast one player alive you're good
Which One is better third party for multiplayer handling in ue4? Photon?? or other?? Like shooting game realtime....
also
you think this would work fine?
like if the casting is right (i dont get errors on casting)
yea
its in gamestate so run on server but im not sure
yea the gamestate is owned by the server
same with gamemode right?
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
i see
can you vc a bit?
i have a question since im seeing like 20 versions of sending damage
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
no he has a property
called Players in GameMode
iirc default GameMode does not have that
oh
let me remember
its just a variable YOU made on your custom game mode
yeaaa.. thats redundant isnt it
yeah i think i make it when spawning the players in the server
i gotta go guys! peace!
for the "waiting players"
yeah but your doing additional book keeping for no reason tho
cya @strong vapor
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.
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
but i saw others casting the rays in characterBP and then telling the server to damage to that location
idfk
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.
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
i also recommend using Not
IsDead -> Not -> Branch
and putting it on the true pin
it makes the graph easier to read
also why is that a Server RPC
you can't call Server RPCs from GameMode/GameState
what call's that function?
after a player dies
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
so a timer by event after event begin play?
well you should start it when the match starts and every player is alive
Can anyone direct me to a patch that will fix the bug where Android cannot find Sessions on LAN?
not made yet but i will add an automatic "shop" deleter after 30s , should i put this after that?
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
@dull lance im running two clients inside editor not built game.
For testing it faster
https://www.thegames.dev/snaps/UE4Editor-Win64-DebugGame_8LCoQvwekD.png @plucky crow this is fine
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
Wait, now it works. Gimme a sec
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
When I run two in editor instances, sessions work. But with built game it does not
is your host opening the level
Ye
or are you trying both to connect
One is the host and works
your host should not be opening any ips
One client works as host, creates the session and joins perfectly. The other one finds a session and joins
If you have sessions, no IPs are involved
Im trying both, sessions work when I run the clients in editor but not with built game
That's probably not true because editor disables session support
Somehow it workd
Start simple and test your sessions with standalone unpackaged builds
Basically right click uproject, launch
Yeh thats how Im testing it also
If you're using Steam don't forget the game in Shipping package requires to be started from the Steam app
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"
Yeah I guess you're doing a shipping build and didn't add an appid file
@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
@bitter oriole sessions exclusively uses dedicated servers?
No
So I can make the same approach of one client being the host?
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
Transition map should be empty?
What is your problem here ?
Clients cant join session
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
Im not going to use steam atm, im just testing
@strong vapor still doesnt work
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
What do you mean with started from the steam app?
From your Steam library
But I dont have my game published on steam
@plucky crow try restarting your computer?
So either use a Development package only, or add an appid.txt file next to yopur game binary with the steam ID
Yeh atm I just use developemnt build, no shipping
So add some logs and check what happens on that client
Im doing so
lol!