#multiplayer
1 messages ยท Page 302 of 1
yea, you'd have to make your own nosql data base and query it etc i assume, im looking into that next year
Found a thread in which james said that hosting etc works with just the session nodes
i think as of 4.13 android can do LAN session stuff but theres no google play integration
if there is id love to no, I'm currently making my own custom nat punch system right now
GooglePlay has a MasterServer for their users, or?
i dont think so
I mean, is that a thing or not. Because if yes, then it only needs to be connected to the UE4 subsystem
hm
i think most unity games use raknet or whatever
hence why i suggest someone makes a hosted service, could make a lot of biz off us ue4 devs
Stores participant and room state information on the Google Play games services servers during the lifecycle of the real-time multiplayer game.
That sounds like they have a master server for your rooms
could you link me please?
reimplementing the wheel as usual
Their sessions are called "Rooms" as far as i understood
but have no time to further dig into it
I'm already at the finish line with my custom solution, if anyone gets this google play way figured out I'd love to know how they do it
You can use GameSparks @vivid siren
And use their GooglePlay authentication
Which also provide achievements and such
oooh game sparks
has anyone gotten this going yet?
Hello there,
Anyone tried this out yet, or got experience with this yet?
Please share your opinions. I'm interested what everyone thinks about this.
"GameSparks is essentially the authority in the equation. You have to communicate with it directly to make things happen. The Unreal replication and session features do not work with Unreal."
that sounds really bad
dahell
I am using GameSparks in one of my projects and I find it fantastic
It does what you need of it
And much much more
@wary willow is that true you can't use unreal replication with it?
@thorn merlin you should try something before following gossip
๐
To answer your question a bit more directly, it does not replace OOS'
As we use it on Steam
So, I can successfully host a listen server on my pc and have players who downloaded the app via Google Play Store connect to the listen server and play with each other
but the thing is, I need a pc to host this listen server, and then that's only 1 session that the android clients may join
What would you guys say is the easiest way to scale this up?
Is it OK to replicate my gamemode variables to my gamestate? I want to be able to display stuff like max players etc to the user. But ofc the gamemode is server-only ๐
Yes.
ty ๐
@loud sage Yeah, you can, on beginplay of the GameState, query all the data from the GameMode (Switch Has Authority !)
@vivid siren Hm, the ideal way would be not having the need of a PC to host a session
Are you doing that on LAN?
And what are you using now?
You should look into a way where your ListenServer on the Phone can register his Server at some master server
and where the clients can request the server list from that
Wait you dont even need an execute on server event in the gamestate? ๐ฎ
@vivid siren If your in need of an easy master server plugin for ue4, This one has worked perfectly for my needs.
This is a plugin for Unreal Engine 4 that adds super simple server registration, deregistration, etc with a master server.
This is not mean't as a complete Online Subsystem, just as a way for people with a need of getting an up to date serverlist they can serve up to clients and adapt it to their own needs (I am open to suggestions of functionality you want included by default!).
Once the plugin has been installed you will be able to use this to receive server lists of all active servers
@thin stratus I have it working online, I used port forwarding on my home pc and then my friends could connect with "open [my ip]" and then I would do the same to have both of our androids connected
the listen server is on my pc while the androids are all clients
i have no clue how to get a server list though, theres no online subsystem that i know of for me to use
or in other words, i just have no clue what i'm doing, lmao
@regal relic how does this work? if i implement this, and someone with my app searches for a game, it will give them a list of everyone who is hosting?
it would make my day if you said "anyone who hosts a listen server has their IP automatically entered into the master server's list for all other clients to choose from"
but i'm assuming it's going to be more complicated than that ๐ฆ i cant look into right now, it's 5:26 am so i have to head to bed
i'll check it out in the morning though, thanks!
@wary willow I don't have time to grok every technology marketed to me, I relay on the opinion of people I respect, hence I validated that claim with you - I don't understand the "OOS" statement, but it sounds like it doesn't provide the same level of service steam does (I am interested in multiplayer browser AND NAT)
@vivid siren my solution i sent you basically handles your next step, it uses http so the server broadcasts to a web application, which stores its ip on a list to offer to clients when they want a server browser - then they essentially use the "open ip" command to join
Well the Plugin is a Master Server, yeah
It simply connects to the Server and checks if the GameID etc matches afaik
And for the Clients, it simply retrieves the IPs etc
No idea how solid that plugin is
if there are things in it that could be done better
but it's a solid start for android i guess
Would need you to host that server somethere though
But then again, no costs for subsystems like Steam
i think I'll play around with it, it does seem worth checking out
Hello everyone, i'm new to Unreal Engine 4
I want to learn how to use UE4 with WebSocket. Is here any solutions?
@subtle wolf you mean send messages to a http server with unreal engine? there are multiple ways you can do this
@subtle wolf there are blueprint only plugins you can buy on the marketplace, or if you are comfortable with c++ you can just use the fhttp interface to send messages yourself
I mean build connection with WebSocket server
I am trying to make a nat punch through system for unreal, do I need to send punch messages from both tcp AND udp? I'm using the examples you can find on forums and answer hub and it doesnt quite seem to be working - I have all the master server bits done, I just can't seem to open the connection for the join command
Okay... i had an plan, make client connect to websocket server, and make one client to be master client(calc physic for every NPC)
Exposing that to Blueprints is a different story but that's just utility
Buy i don't know how to get start
I can simply use NodeJS to build an WebSocket server in minutes.
Hm, you want to replace the default network system of UE4?
I use C++ on this.
Well, nice, but that doesn't answer my question :D
So normally, you have a Server (Dedicated or Listen Server) and he has the authority
So he defines what the physics do
and replicates that to the clients
Yeah, also not really necesarry
depending on what you want to achieve with it
So what is your plan with the socket system?
I don't see yet how this would make any difference to the authority version
Use NodeJS with available websocket package could up-speed server development
and this server use for persist data
but here get an question
How to implement NPC movement & AI
WebSocket server could only do some simple validate
Uff, that goes beyond my knowledge. I stick to what I have in most of the times :D
Okay...
reasking my question - has anyone used sockets in unreal engine to punch through NAT? could use some help, my master server is sending the information to my clients, just not sure if im doing the correct work on my client to punch to the other client
fyi will pay if someone can help me with this NAT punch solution I'm trying to build on android - I need this working ASAP - please contact me directly if need be
If I would know how to properly do this, I would have told you already hehe
โค thanks man
@subtle wolf I know little about it, but I think the html5 version of unreal uses websocket, and I've just stumbled across UWebSocketConnection in my own adventures in unreal source code
So, can it use in native client(Like mac or win)?
Unreal Engine 4 Networking over Websockets Plugin
Provides websocket transport layer for unreal engine 4.
Uses libwebsockets for the server side and client side for non HTML5 clients.
HTML5 clients use emscripten's sockets abstraction.
Ok i got it, thx @thorn merlin
wish i could be of more help
I have a TimeRemaining variable which is the amount of time left in the match. I want to play audio on the client when there is 30 seconds left. Would you guys use an OnRep for that or just check to see the value of TimeRemaining? in tick or something I'm not sure how much overhead OnRep has.
I guess it's a balance between server and client cpu load
Why not just do a replicated function/RPC and call it for all clients once
E.g. move all of the logic to server
Yeah that's an option. I normally keep as much load of the network as possible tho
Hey guys, someone as an idea of how I could make the authentification work for Azure with Unreal, I can make call to Azure, but I'm not able to make the auth (with C++) part
Honestly I would put that on just the client personally, you can set a timer for it when the round starts, and it eliminates the need for a reliable RPC to guarantee it occurring
Assuming you have a static-type timer where you're not adding time in the middle of it ๐
Is it possible to open bound tcp sockets in general with unreal? or even a bound tcp socket on one thats already in use? port 7777?
@regal relic Hey you here?
I was wondering..
If a player on pc wants to host, they open a map as a listen server and others can connect, but the host HAS to have port 7777 forwarded for others to join as clients
Does this master server plugin handle that? so if an android user wants to host a game, they dont need to worry about ports or anything, right?
@vivid siren When the server/dedicated server initializes its connection with the master server, The ip address, and port number are given to the master server by the server/dedicated server.
Personnally i put all the all master server logic in my GameInstance, But i dont do a listed server style setup, My servers are all dedicated. But it should'nt be a problem to do listen servers as well.
IE client servers.
anybody know how to replicate anim montages? it doesnt seem to be working
Wish i get tell ya Bren, But i have'nt played alot of anim, or montages for that matter much in replication.. Are you using a replicated custom event for the trigger though?
yes i am. haha its weird
What kind of replication are you using?
server to client
No prob.. Hmm.. My guess is to set a break, and make sure its firing.
it is
@regal relic also, can you help me out here
says its playing but just not showing
my ip goes there, right? the example showed the default ip but idk if thats what i use or if use my actual one
@vivid siren yes, either your internal IP for lan testing, or perhaps your external IP for WAN testing.
Dont forget for WAN testing you will need to port forward or whatever the ports you need open.
yup i have them opened, i used the default 8081 they had
If i see, I answer. ๐
๐
I dont pay attention all too often though. Multitasking happens.
that's alright, i can wait ๐
@regal relic is this variable supposed to be Master Server Functions Class?
also do what IP do I place inside the Make ServerInformation ?
This is worrying me, please don't say that the user has to know their own IP to host a server
@vivid siren Yes the create class looks right.
Awesome
You can leave the gamemode blank, Or just whatever... And your IP is obviously the IP to your new server .
so, for my master server then, if I host it on my own pc, i use my own ip in the Initialize node
and then i use the same ip in the Make ServerInformation?
Like, just hard-coded in there?
You can hardcode it in for testing.
You could also make it variable pulled from elsewhere, An Ini or whatever.
@regal relic Sorry I still don't quite understand. Will the Ip in the Make ServerInformation always be my ip since I'm hosting the master server? Or will it have to change to other things when, say, someone tries registering a server on my master server
Because I don't know what or how I could ever fill that with anything other than my own IP
Well in the future if for instance your making listen server (IE Client Servers) then you obviously want to get their WAN Ip and the port to forward address.
@vivid siren The bottom side to this system. Will be that you would need to probably set up port forwarding on each hosts individual router. A pretty major caveat for some.
I'm definitely not going to be able to do that @regal relic
So I don't think this plugin can help me then
I thought the purpose of the master server was to provide a link between people who want to play together?
Without having each person trying to host require to port forward
sorry to interrupt. just a little question
how to quite a Dedicated server from code?
i am using quite node from blueprint.
it is working fine on listens server and client build.
but nothing happening in Dedicated server build
any thoughts?
@tribal oyster Quit? Are you talking about closing a dedicated server terminal? Try Ctrl-C
Sounds like he wants to be able to shut one down through code
@vivid siren the purpose of a master server is to give clients who only know one place to go (the master server) to get a list of available servers elsewhere. The clients need no such forwarding. They can connect without any setup necessary. However for the servers forwarding would be necessary without some kind of NAT punchthrough
@fossil spoke I dont think there is a way to actually call commands from a dedicated server terminal. One would need to work out creating a client which could log into the server, and have access to a pre-coded set of console commands, or something of the like.
@regal relic so if I wanted to let a user on my android app host a 2 player lobby for a game and have a second user join that lobby to play, what should I do?
Well you could for instance have PC dedicated servers located somewhere waiting to host these such rooms.
I imagine a half decent dedicated server should be able to host quite a few dedicated server threads. If the rooms are just 2 people.
For a complete noob with dedicated servers, how long do you think it would take for me to learn and set that up? I have no clue about threading a server, but it sounds about right
So your clients could connect, get a list of available (Rooms), Log into one, Which is effectively a dedicated server thread being hosted in the cloud somewhere.
Does it have to be on the cloud or could I have a dedicated PC to just hosting?
It can anywhere you like.
Just depends on how many people your trying to support simulatenously, and what their going to be sending/transmitting in their sessions.
this is just a small project for an app prototype that maybe a dozen people at maximum would be using at the same time
it's not going to be a fully deployed game or anything
by the time it becomes an issue, Im willing to bet you'll know how to solve it ๐
@regal relic So just so I can try to imagine this: I'll have a dedicated server hosted on my PC, (a command prompt window, nothing else) and I will have this command prompt running several different "rooms" simultaneously (and separately) for others to join?
And then when someone wants to join a room, they will connect to my PC (through my IP which is hardcoded in) and then select which thread/room they would like to join?
Pretty much.
Proper server environments have ways of extrapolating away the graphical undesireables, such as terminal windows and such. Lots of cloud frameworks for this sort of stuff when you wanna get serious.
It cloud setups for the most part you have VM's running server OS's, handling server threads like our OS handles services.
Interesting, alright, I will try to take this route then, thank you
hi sorry.i was taking with my CEO about it
our master server setup done and dedicated srver is hosted on aws
but problem is dedicated server keeps ruinning even when all the players quites
so what we did is counting player number and when player number is 0 then it will quite automatically
but quite node is not working on Dedicated server build
"@quiet vale Quit? Are you talking about closing a dedicated server terminal? Try Ctrl-C"
thats why ctrl+c is not an option
we are looking for an automated way instead of manually closing iy
it
we tried to use quite button in different places but none of them working
I don't think you understand how dedicated servers work. They are not suppose "quit" when everyone leaves. One of the points of using a dedicated server is so it can run even if no one is currently connected. If you have to have shut down after someone leaves then use a listen server. @quiet vale
Okk
But our server gets created dynamically
On demand
Basically we want to save resources
I was pretty sure that there is a way to quite it out of the box
Otherwise i have to implement it myself
@stiff wasp are u sure there is no way to quite it from code ?
There is
But i want you to ask yourself why you are using dedicated servers.
From what you are describing you don't need to
Shouldn't use dedicated servers unless you have to. They are not cheap
Heh.
Not sure what you are trying to spawn, but it does not matter. The point is, you shouldn't shut a server down just cause there are no players in it. You'll just end the current session and create a new one
Don't shut the whole server down
That would use more resources, not save any
Ok. Still i am interested on quite() method
Not to derail this, but what's a quite() method?
Quit and Quite are two different words
Yeah, I'm just assuming he is making a typo
It's pretty obvious it's a typo tbh
^
Not sure if he is talking about EQuitPreference or destroying a session. He wants help but does not really give me the info to help him.
Welp I'm going to bed. Nighty night ๐ด
Dammit. I was literally closing discord
Is your session logic in bp or C++
I will look into the defination of EquitePreference
We are not using ue4's session syatem
System
We have built our external system
Ahhh well that would have been nice to know before I wrote all that
Session syatem is too heavy for our simple task
Sorry
One man handiling so many things at once
@stiff wasp thank you so much .
I will dig into engine code
I'm grasping at straws with this whole multiplayer thing and it's really getting me stressed.
Can I just host a bunch of listen servers on my home pc and let players connect to those? Honestly I don't care I just need something that works
I have less than a week to develop this whole app and I don't want to start it until I know how to get it multiplayer
Multiplayer is pretty hard concept just by itself, and then add the complexity that UE4 adds to it... @vivid siren
or any engine
If you are "hosting a bunch of listen servers", you are essentially doing dedicated servers, so you might as well do that instead
I don't know how to host a dedicated server though and everything I find online requires me to edit the engine's source code or something which I'm not comfortable doing at all
There's a plugin
That fixes the dedicated server issue present if memory serves me correct
Pretty sure we were just talking about it a few days back
Where would I look for this plugin?
Is anyone here familiar with GameSparks?
I use it
Would that solve my problem?
I just want to be able to have several 2-player rooms available for players to join
Gamesparks is not an OSS
I don't get where everyone is getting this info from
Gamesparks is like PlayFab
Both just provide backend services
Oh, well I need something to handle the actual systems
It's an app
So I caved in and decided I would try to do the whole nonsense with downloading and coding stuff for a dedicated server
but what do you know, the github for the ue4 repo is down
My entire weekend has been wasted on unreal engine to get nowhere because of terrible documentation and poor support for mobile games
Github UE4 Repo is up for me.
Well I guess I'm just failing at using github then
Turns out I messed up when linkin my github on my ue4 account
applaus
Well, wish me luck I guess.
I'm about to learn about dedicated servers and hopefully I can get this unecessarily difficult project finished before the deadline
@vivid siren how long have you used UE4 for?
about two years
And how long have you been using Networking in UE4 for?
about 2 months
When's your deadline?
this saturday
Hi I am using the official multiplayer on steam project from epic forums, anyone knows why when I use seamless travel on a project with steam why dont keep playerstates, gamemodes and characters selected when I switch from Arena01 to Arena02. When I go from Lobby to Arena01 or Arena02 it keeps the information (player selected and everything)รง
I bet @thin stratus would love to answer this, but he's probably sleeping
I don't know anything about replication and seamless travel
thank you anyway I will try to ask him
The Lobby to Arena though, that's probably because gameinstance hosted all those umgs
From Arena01 to Arena02, is that something you implemented?
Or was that part of the series?
yes
I wanted to switch maps after time is over
If you are switching maps
I tried servertravel but dont move the clients
You need somewhere to carry over the information
tested with some friends
when I use seamless travel they all move but it doesnt carry over the information
Right
So, mainly GameMode, GameState and PlayerState are the major things to look out for. GI/PC can be used as well, but rarely. Unless in that MP BP, where all the UMG are getting called.
GameMode only exists on the Server
I wonder if there is a way to keep those things away from resetting
I'm going over my notes;)
One sec
GameMode always resets when travelling
So, this is probably what you are experiencing
You need somewhere to keep that information persistend
persistent
Traveling to new level s*
This happens in SP also
Which is why we use Gi
GI for saving info from one level to another usually
mmm so load the gi information
after the map load?
I tried to search for a tutorial on youtube but didnt find anything
you should read this
Yeah
Looks like GameState is where you will want to keep your info
I will try to look into that thank you!
No problem
@split plank
Go to page 79 on the link I just gave you
79-83 will give you what you want
Supposedly GameMode does persist
I'
I'll have to get used to that when dealing with networking
reading right now
didnt know servertravel disconnected clients from server then tried to reconnect
AGameMode::GetSeamlessTravelActorList' what is this?
...
read ๐
it tells you exactly what it is in the name
and if it doesn't the pdf does
Cpp only afaik
@split plank Lobby to Arena keeps information as that is what you programmed after all. Thr series isn't that great though so I don't blame you if you didn't understand where and why that happened
Arena to Arena won't keep the information as you never programmed that
Seamless travel means it keeps everything alive that you specify during a map change
Including gamemode
So that's not useful for lobby to arena
And is only useful for arena to arena if you want to keep stats and the gamemode etc is the exact same
Means you can't use that if you go from team death match to capture the flag
A normal ServerTravel with seamless travel off should bring your clients with the server
I mean the same happens when you leave the lobby
You just need to make sure that all the data
That you stored and passed from lobby to arena is also stored for arena to arena
Otherwise you character etc won't get spawned as the information is missing on the new map
While it's true that you can use seamless travel to keep data alive (my network compendium has info about that in the PlayerState chapter) this will only work if you keep the gamemode and is most likely better supported in c++
So your task is to use normal ServerTravel and pass it the data you need
How you do this is up to you though :x
Hi Exi thank you for your reply if I want to use servertravel on steam my clients disconnect to main menu you have idea why? server travel fine and store everything
but clients seems to dc
I would need to see the logs of the server and the client
how can I enable those logs?
There should be a Saved/Logs folder if you have a development build
and of course if you just run it as standalone
ok thank you will test tonight
or if you're launching from the editor, add -log as an argument to launch
or from a buil d(that isn't shipping) just run cmd or make a batch file with
Game.exe - log
Hi all, I'm pretty noob in these unreal things and my questions might sound a little simple, but... I'm trying to make a multiplayer test game with camera rig not being attached to any actor (kinda like in rts), but a camera that follow all pawns
I know that to force a player to look through that camera I need to SetViewTarget(camera rig actor) on PlayerController, therefore I tried these things already:
- Placing CameraRig actor in the map, then finding that actor in PlayerController::BeginPlay(); I don't like that solution, because that camera rig actor should be transient, and placing such an actor in a map just doesnt seem right for me
- Spawning CameraRig on PlayerController::BeginPlay() and setting it as view target; the issue with that solution I have is that I don't exactly know where that actor is being spawned (on a server? on a controllers client?) and whether it is being replicated; that actor, because it is a camera anyway, and I feel that it does not need to live anywhere on a server
The questions I have are: - what is the proper, valid, epic way to do that kind of thing?
- how (and when) to spawn client-only actor?
Hm
You are not possessing any Pawn, right?
You only want the View to change, or?
So spawning the Camera on BeginPlay is fine.
If you do that in the PlayerController, it's called on the Server Version of it and on the Client Version of it.
Each Client has one Controller Instance and the Server has all of them
That results i nthe Client getting one version and the Server getting one for each
You can limit that with an authority check before calling the code
Though I haven't used Cpp for network in a while so I would need to check what the command was
Then you would limit the spawn to Client
And make the Camera Actor not replicated
That SHOULD do what you want
@proven jolt
Ah ,here we go
if (Role == ROLE_Authority) ; // Will always mean server version.
if (Role == ROLE_AutonomousProxy) ; // Will always mean the client that 'owns' the actor.
if (Role == ROLE_SimulatedProxy) ; // Will always mean the client(s) that are just copying the actors data from the server.
So you would do it when Role != ROLE_Authority
actually I do possess the pawn, because each player has its pawn
one pawn per player I mean
Ok, then you might want to do the Set View after possessing
Cuase possessing might override the view target again
there's bAutoManageActiveCameraTarget that I think will prevent setting view after possessing, but I'll double check that
ok, i'll check that role and see what happens ๐
Hey. I have two phones connecting with lan through the ue4 session nodes and whatnot but this only works on my home wifi. When I try on another wifi, they won't connect....
I have ue4 ports opened at home, but I don't think ports should be the issue since it's lan...
What other wifi are you trying on?
My work's wifi
Alright, there's a good chance they have something called AP isolation on
Where you can't see other devices on the network
Not guaranteeing that, but in work settings that's often on just for security reasons
I haven't done anything with bluetooth, it might be possible but I haven't tried
Though it seems you might have to do it yourself if so
So you're saying the blueprint session node stuff won't work with Bluetooth?
Judging by what I see on answerhub questions, no
Damn, I don't know what to do then
6 days left @vivid siren ?
Yup...
Not sure why you waited so long ๐
It might work if it tries to connect via sessions, maybe it would like go to the outside and back?
Not sure D:
His work ports are probably not opened
Though actually there would be nowhere else to go on P2P
Not hard logic
Unless he gets access to them and forwards the ports, nothing is going to happen
Even with discovery?
@wary willow I didn't wait, I started working on this asap
And I can't touch ports because this needs to work anywhere
Well, it's not going to just "work" anywhere
Even hosting on steam requires some work on the player's part
The amount of time you'll be running into AP isolation is pretty much 0 on home networks, but if you need it specifically in that setting I think you're pretty much out of luck
You can try to run something like nmap to see if that's the issue, if you see other devices then it's something else. But if you see no other devices, not much you can do :/
this is what ive been rambling about recently - i was investigating the nat punch through technique
https://answers.unrealengine.com/questions/532889/how-to-nat-punch-manually-for-android.html I have a link in this to a blog post describing the technique
I cannot get a SimpleMoveToActor node to work. Prints before and after it work and the event is called on server. Is there something else I'm missing?
Do you have a navmesh in your level?
That's the biggest thing I see people forget ๐
....it appears the navmesh i had in the level was broken or something...i added another in and it solved it.
Is there an event called when a player leaves a session/game?
is it just end play?
a playerstate event that is
@drowsy zodiac OnPostLogin and OnLogout are events on the Gamemode that notify of a connection/disconnection of a player controller.
Good to hear mate.
i'm having a little trouble getting a locally networked game to run. i'm using 2 pcs which are connected by ethernet to the same network. i'm running the server using this command: ""C:\Program Files (x86)\Epic Games\4.13\Engine\Binaries\Win64\UE4Editor.exe" "Z:\Unreal Projects\base_vr 4.13\BASE_VR.uproject" Default?listen -game" and the client with this: "C:\Program Files (x86)\Epic Games\4.13\Engine\Binaries\Win64\UE4Editor.exe" "Z:\Unreal Projects\base_vr 4.13\BASE_VR.uproject" Default -game
the client cant seem to connect, it just sits there frozen
(timing out i assume)
any ideas?
@thin stratus i'm using BP nodes create session and find session/join session
@dull river Normally you should Create the Session and then open a new Level with ?Listen
Maybe the order is wrong
Start the Server normally
and handle that in the menu
@thin stratus currently im just doing that on key presses
i can get 2 players to join the session now
though in one of my windows i seem to be a spectator
i can see both players (one of which moves if i press movement input buttons)
(that BP is in the character pawn)
That looks fine
The stuff about the spectator etc, i don't know, that's mostly your own code on the new map i guess ?
if i play it single player it works fine
im having an issue with my playerstart though, it doesnt put the right pawn in the map
it actually doesnt put a pawn in the map at all
I know you were asking about OnPostLogin a couple days ago, are you overriding that?
@dull river
i think youre thinking of someone else
ive never even heard of onpostlogin before haha
D"
Sorry haha
So I guess that wouldn't be the issue then, I'm not exactly sure why no pawn at all would be spawned if your defaults are correct. If you depossess after spawn, is there anything there?
nope this is all i get
Is there a collision possibly happening preventing it from spawning?
Since you said the DefaultPawn worked
๐
Hey does anyone know about using google play's online subsystem? it supports realtime multiplayer but i dont know how to utilize it
Is it possible to get public leaderboard stats via BP (Steam and Oculus subsystems) ? From what I can tell, only player stats are supported.
@dawn linden yes
So, there's two caveats to that of course
One, it's currently bugged, and needs a engine code fix
Two, you need to fix that little thing that Epic doesn't want to, to do it
But there's a PR somewhere, that again, Epic does not want to take
There are also other Leaderboard solutions available to you. Such as @crimson jetty 's Epic Leaderboard and GameSparks, and I am sure a few others.
TBH, I am surprised, no one's done a plugin to fix the issues and just sold it on Marketplace
(I use GameSparks for leaderboards) and find it pretty awesome myself
Thanks a lot, I'll look into those options.
game browser and nat punch are needed big time for android - are there any big multiplayer unreal engine games on Ios? do they have this problem solved over there?
so does anyone know how I can implement this?
https://developers.google.com/games/services/android/realtimeMultiplayer
I still can't figure out how and there's absolutely nothing online about it
it says the user must be signed into the google api client
which is this: https://developers.google.com/android/reference/com/google/android/gms/common/api/GoogleApiClient
so I guess I need to implement that as well?
@vivid siren 5 days left and you're still messing with this?
....i kind of have to. i have 5 days left.
rofl... my point exactly
You need to cut your losses
take a step back and figure out what your MVP is
If you can't have realtime MP, then do async
aka turn-based
I have no clue how to do that either
so...like...why again did you wait until the last week to learn MP?
I didn't. I started it as soon as I was told to.
So, what exactly do you have done with your multiplayer setup ?
Are all your variables replicated properly?
Nothing. People give me a suggestion, I try it, and then I find out what they said is irrelevant and I cannot use it
Um
So, is that a no?
What I am asking you, is what you have done
In regards to multiplayer
Anything?
There is nothing
I am using blank templates
I can easily make the game in 2-3 days for this prototype but the multiplayer is what I need to figure out first
So, why not just follow the MP BP series and call it a day?
Because that doesn't help, I need this to work for android
There's the google play subsystem, but I can't find any docs on how to implement it with ue4
You mean other than enabling it in plugins?
And using the same damn thing as any other tutorial?
Since it's just an interface
There's a google play subsystem plugin??
There isn't one
All there is is this: https://developers.google.com/games/services/android/realtimeMultiplayer
Well shit
Back to what I was talking about
All you need to do is use the same damn nodes that every other OSS uses
Since all it really is, is a generic interface that ties into whatever OSS you enable/put into your configs settings
Feel free to laugh at me, but I have no clue what you mean by that
Oh, nevermind
@wary willow Okay so anyway, now that I have that plugin enabled, I can use the normal blueprint session nodes to join players?
Don't I have to do some kind of google sign-in thing or whatever?
I changed the OOS in the ini as well, then enabled the plugin, but I'd assume there's more to it than that
Well
If I were you
I would just download and use gamesparks and use their authenticaion
But
If not, you can just use Advanced Sessions Plugin
But I don't have much experience with that
And once again, no idea about mobile dev
So no idea how hard it is to get authentication/player stuff with GooglePlay
But I don't see how much it could differ
Okay, I have both in my project
its been a while since i've tried but i dont think the google play online plugin offers multiplayer functionality
trying to check github code right now but its crashing on me
:\
nice thnx, unreal did update its google play services lib in 4.12 i think.. might be worth revisiting this
No idea, probably not going to get done in a week though
yes I've read that, it doesn't explain how you would set it up
and neither does the video
or 5 days
anyone know if i can just call IOnlineSession::Get() and then use the JoinSession function and just input the necessary variables
or do i have to setup the delegates too
@wary willow if all it took was the normal session nodes then i would have the entire app built with full multiplayer functionality and proper distribution on the app store within 2-3 days
hopefully @thorn merlin is right and they may have updated it, but even still, i won't know how to implement that anyway because surely there's some api required to be integrated for the authentication to work
i doubt google would just let me connect to them
i was looking at the source code for the google play vs the steam online plugin - i didnt look for as long as i wanted but based on what i saw i dont see any session stuff
i'd love to be proven wrong but really i dont think you can do it out of the box, if anyone other than me has a multiplayer game on android game i wish someone would chime in and help out
I think that's the problem @thorn merlin
Not many people have done one
Or would
๐
Technically, documentation for just Steam was lacking
There were a few community tutorials though, which helped
because I'm going to steam next I really wanted to keep my network replication uniform, other wise id be using gamespark like you
Well, GameSparks has nothing to do with replication...
thats my point
gamespark uses a different method of networking
GS is just what I use for everything other than Connecting to players
I do use Achievements though, since that's easy to implement
it looks like a good service, just too late in the game for me to use it
The Leaderboards are bugged
And require a source code change
But that's documented
So, if you are on source, easy fix
Otherwise, you'll need GameSparks
or something similar to host your leaderboards
But I love GS because it's just so much MORE than Leaderboards
Like, you could essentially implement a prestige system
full inventory
yea the cloud db and all that looks great, im holding my breath for a google firebase plugin tho
who owns gamesparks btw?
im trying to connect to a LAN game through BPs with one PC acting as a listen server and one as a client
my client cant find any sessions though
how do i get my client to be able to find the listen server?
Can you connect directly via IP?
has anyone ever tried a setup like this?: within a LAN environment a few players start a game and automatically start a map as a listen server. then they look for other existing sessions and join them if they were created at an earlier time than their own, eventually all ending up in the same session. I have it working more or less but it qualifies as buggy at best. :/ @thin stratus maybe?
to add to the level of difficulty: needs to run on android and preferably with BP
So you want to automatically join all LAN Players together?
Wouldn't it be easier to say "Are there any Sessions available? NO? Then let me start one and wait."
And if "YES? Let's join it"
yeah, that would work as well I suppose
And if you want to make it more bulletproof you go ahead and do "Hm, started a Session and I'm waiting for 2 minutes now, lemme check if someone else has a Session"
And then maybe join that
as my brain feels like it has completely melted down by now, how would you about implementing it? store the create and find session events in the gameinstance and then run the checks from the player controller/game mode?
right now I'm constantly running into the issue that even though two sessions exist it would not always find any. or only after a substantial (and varying) amount of time
and a lot of these: "LogScriptCore:Warning: Script Msg: FindSessionsCallback - Invalid player state"
Yeah, GameInstance is a good place to put host/find session functions
What checks do you want to do?
@cinder talon I mean basically from where to call those find/create session events/functions
I have a mainmenu widget and a HostGame button which calls the host function
I've been running in circles with this for a while now and I just feel like I'm doing some really stupid miskate that I just can't see anymore. hence I'm starting to ask stupid questions to verify my level of insanity and maybe get some good pointers in the right direction ๐
A menu is specifically not what I want to do here. that worked just fine for me in other projects but unfortunately is not feasible in this case.
I see
it pretty much has to be a solution without any user interaction...
Level Blueprint's BeginPlay, Controller's BeginPlay
When exactly it should be called?
right when you start the app
the user should not need to do anything but click the app icon. as soon as anybody else does the same in the same WLAN they need to end up together
The one that open's first has a timer that every 0.25 seconds checks if everything's ready and starts a game
Previously there should be a check for existing sessions
If none found -> host session
The second player does the same but should be able to find first session
*opens
Yeah, the first Level you open
Let it be "InitialLevel"
Put the call in the BeginPlay of the LevelBlueprint
And the actual function in the GameInstance
That InitialLevel also doesn't need any GameMode or so
You can also add a Widget through that function
Seems like it should do the trick ๐
I'm just thinkin about order of BeginPlay calls
So it would be:
- Icon Pressed
- App Starts
- App opens "Initial Level"
- LevelBlueprint of "Initial Level" calls "BeginPlay"
- That calls a "Check for existing Sessions" in the GameInstance
-- That is a simple FindSessions node that checks if the returned Array has a length > 0 - Then, based on that, either Create a new Session or Join one.
I wonder if the widget will be added from Level's beginplay if the controller hasn't had his beginplay yet
Creating a new Session needs to have "OpenLevel" with the GamePlay Level" and "listen" as an option
Otherwise the joining etc will not work
OpenLevel node of course only if the CreateSession node succeeds
@cinder talon It should. Doing the same in my Lobby project of the Marketplace
Sweet
sounds pretty much like what I tried a while ago except for doing it from the level BP. will give it a try, thanks guys
how would you then handle the case of two or more people doing it at roughly the same time and maybe ending up with multiple sessions as a result?
No way to stop people from launching at the same time so I'd do additional ingame check after a few seconds.
Something like "An existing session has been found. Join?"
right now I'm storing the creation time of the session as an extra attribute and compare it, but it doesn't seem to work too well yet
i could probably just check every once in a while and if there is a session that has more players than the one you're currently in then join the other one
That could be a popup message on the right side of the screen with text showing the number of players and JOIN or DISMISS options
I guess it's up to you from this point
it would definitely be a forced join in this case but yeah, once I'm at that point it should be easy enough... ๐
Who cares about user experience? Force people to play together ๐
sometimes it's the only way. ๐ it's corporate clients for this project, so every button they need to click is one too many. they're not the usual computer savvy-gamer-type of people who want a choice ๐
yo, is it just me or do the Packet Simulation Settings not work anymore? (4.11.2)
@cinder talon @thin stratus : magically seems to work at first glance. still need to iron out some things, but the basics look good so far, thanks guys!
You're welcome ;d
also, anyone here work with the steam API?
when the host crashes, clients then just get "can't join a session, game in progress" or something along those lines when trying to join a new session
there must be a timeout value somewhere? might also check if the crashed-host-session has 0 players, exclude 0 player ones from showing up in a list?
just random workaround ideas
When is the proper time to destroy a session, and where should it be done? I had it setup to Destroy the session on the exiting controller within a gamemode blueprint using Event OnLogout, but it seemed to destroy the session for the entire server rather than the exiting controller (it would no longer be found when searching for sessions).
@knotty frost are you calling PlayerController::Logout?
@knotty frost i dont think you want to destroy the session, do you mean the player state?
I was using the gamemode event OnLogout, I'm trying to figure out where to end the session for a disconnecting player so that they can join other sessions
ah, i typically do a log out, then return to my main menu, so perhaps the map change destroys it for me
@knotty frost I destroy a players session when he gets into the MainMenu
cause there he 100% does not need or want to have a session
And then I only need to do it at one point
Hm, can anyone tell me why in shootergame, epic have it set up that when the state switches to firing, it runs the firing function on both client and server, but only seems to refire on the client (automatic) and then the client sends an RPC to the server after each following shot to tell it to use ammo etc
Im wondering why they don't just have the server refire as well
@heady delta less for the server to process, I assume.
@fresh saddle I would have thought the same, but it's just a function timer it has to run, the firing function get's called by the RPC the client sends after they run it anyway.. I'm going to take a stab in the dark and presume it might be so that when the client calls to stop firing, the server does not refire an extra shot because of latency.. that's the only reason I can think of
ยฏ_(ใ)_/ยฏ
I am playing the same build on two computers, one loads the steam overlay, the second doesn't. I haven't had any issues with this computer before, and I did the usual restart/check for updated drivers etc. I can see the two accounts in their respective friends list, so I'm definitely online on both... I'm out of ideas
@twin juniper Oh, check your steam settings
Make sure the one that's not playing overlay doesn't have it disabled
Well, not all good. But on the overlay settings part.
Wtf, steam now shows the purchase button for my game, something must be very wrong
Yeah I logged in with this account on the other comp and I own it there
Apparently steam thinks I play my game so much that I have to buy it.
Reinstalling didn't work, I actually had to register a new key
i'm failing to find any sessions over LAN after creating one on another PC, any ideas why?
@thin stratus i saw you suggested connecting directly via IP, how would I do that through BPs?
It's more a debug step. I want to see if maybe your firewall or what not stops the whole fun
You do that either vis console (if you can still access it in your development build)
Or you use the "Execute Console Command" node
Host uses it to do "Open MapName?listen" (or uses the OpenLevel node) and client does "open IPADDRESS"
No session creation for this one
Client and Server don't have the same programm
hmmm
just read the latest replies on exi's thread
This will include more review on our end, but may also involve the community experts in one way or another.
wouldn't epic have any experts on that matter?
feels odd to try to get community to do that
I mean, they've designed it, they should know how it works
Can someone recommend docs/tutorials (relevant to current UE4) for Steamworks in BP ? Not looking for matchmaking or MP yet. Looking for achievements, leaderboards, player ID, Cloud, etc. Thanks
@thin stratus they're both running the same version of the vr editor
I wouldn't be trusting a PIE instance to have the exact same files, if you need to test MP I would package.
Even separate from that, MP is somewhat shaky in PIE @JTLR
PIE is shit, yes, but you don't need to package
You might want to from time to time
But you can simply start the game as a standalone
Either from PIE or rightclick the Uproject file and hit "LaunchGame"
I just meant to package since generated files might differ on each, not sure if it's necessary
So, can someone help with my question about Steamworks please ?
@sly kernel no
TBH, If you are already on steamworks, all the documentation is already there ๐
That's something that I can't fault Valve on
But you are also asking about different parts of Steamworks and for BP
And that's not going on happen
Only reliable thing that's accessible straight from BP is achievements
And there's already a tutorial on that
PlayerID should already be accessible though?
nope
so, does it mean there is no way to do Leaderboards from BP ?
Because Epic broke it and never fixed it
I see
well, as much fun as it might sound, people on Steam want Leaderboards on Steam.. That's just how it works.
by people I mean players
for my old game we wanted to go non-Steam route for Leaderboards (since we used GPL engine we couldn't use Steamworks). Players rejected the idea.
isn't there a way to make a plugin for Steamworks, so that project can remain BP project ? Or is it just easier to have BP + CPP project ?
Well no , not the dumbest
that's something you can tell to gamers ๐
You are wasting your breath and fingers
and then see how your userbase shrinks significantly
Okay
Then they don't play your game, next.
No one cares about Steam Leaderboards
They really don't
what makes you say that?
Experience
Players will be content with any type of leaderboard implementation if it is inside the game.
I am curious, because I've been on Steam since 2011 with my game and while I don't care for Steamworks as a gamer, my experience says that a lot of people do.
you can't link inside-game leaderboard to anyone.. How will you brag about it to your buddies ?
and apparently it's a chore to open browser nowadays and look at leaderboards outside of Steam
I am not pulling this out of my ass, I am talking out of experience.
maybe I got "lucky" with my userbase, I don't know
anyhow, point about steamworks in BP is taken
well
I wouldn't want to mix another service for leaderboards only either
using steams would make a lot more sense :p
also
I care about leaderboards
not for global ones
but ones where I can try to beat my friends scores
I know some of my friends do that same too :p
@wary willow ^
and I mean in-game leaderboards
?
You arne't making any sense either
I never once said I was against leaderboards
All I said, is that Steam Leaderboards themselves, as a service, is irrelevant
If you use another Leaderboards implementation
Your players will not know or care
and then you'd have to rely on yet another service which may go offline
And if he can only do a BPonly project, or one with plugins, he's not going to get Steam Leaderboards, so he might as well go shopping
Nah
You don't know what you're talking about lol
I do
If everyone had that same logic, nothing would ever get done
you don't just respect that opinion ๐
Everyone would be afraid to use new things
And that's a horrible way to dev
You're missing out on new and awesome shiny new toys
You didn't state an opinion though
That's my point
And you are not also taking into account his or her difficulties with the engine
my opinion is that it's better if you can keep minimal amount of external services that may go offline from time to time or altogether
that's just common sense
If they cannot or will not want to make the engine change
They will have to ultilize a plugin
End of story
well, I am gathering info at this time
I am cross checking what my old game has (or should have had) and what UE4 already has working, and what will require to be added
so at the end of the day, if I have to do a small tweak to the engine before release, I might do that. It just depends. Maybe it would be wiser to hire someone ๐ to make a plugin for missing Steamworks functionality, or a template C++ / BP project..
now that I think about it, I wonder what happens with plugins if I have to tweak and rebuild engine :/ Would I have to recompile plugins too ? (if they have source code available) Would plugins work with non-launcher build if UE4 ?
Hire @thin stratus he is cheap and for hire @sly kernel
I heard he takes bananas as payments, cannot confirm though
Ha, don't say I'm cheap :D
@thin stratus I ended up destroying the session on leaving, on network error, and before attempting to create or join a new session, due to having trouble detecting a server host disconnecting. It seems dirty, but its working.
Hm weird
The thing is, when an Error appears
I send the Person back to the MainMenu anyway
So there they get their session destroyed
I had an issue where if the listen server host opened console, and ran disconnect, the gamemode's Event OnLogout wouldnt fire and detect the server leaving and cleanup/destroy that session
I destroy the session in the BeginPlay of the LevelBlueprint of the MainMenu
Destroying the session before attempting to join/start a new session is working, just not sure if that will cause problems later down the road
I was kind of bummed out there is no way to get the active session in Advanced Sessions / Epic's online library so I can't really use the OnFailure event to log any inconsistency
do people just store the session result they are joining in the game instance and reference it later? not sure how to go about it
since all the session functions take a PC the active session probably lives in there somewhere, just got to find it
Well there is a "GameSession" Class
That's where I do my stuff in C++
It's barely to none exposed to BPs
Though that's also a Server thing
Anyone know if you can do client side prediction and the other things Blizzard talked about in their netcode video in unreal? Only thing i know how to do is stop cheating by running it on the server, wondering if there is a way to do some of the things they talked about.
@thin stratus @stiff wasp
Blizzard, if I got that correctly while playing Overwatch, does some checks and then decides who is correct and who not
Other then that, no idea
Simple example is the Roadhog hook. If Client A hits, but Client B was behind a wall on his screen (on Client As not yet cause of Replication delay), the Server favors Client As hit
I guess there is a simple threshold that is like "yeah that's still in the limits"
@proud wren In simple terms, yes that is what they do. I should probably watch that video myself, as you are not the first person to ask me about it. You could do this in UE4 yes, it would take a bit of work, but its do-able. In my 1v1 arena game I am making, one thing I do is keep track of the delay between abilities. So an example would be with my character Floriaa vs Lucy. Floriaa has a lot of roots and stuns, and Lucy has a ability that makes her imune to roots and stuns. So lets say Floriaa throws her Gas Bomb (2 second stun + DoT) at the same time Lucy uses Overcharge Generator (her immunity). As of now the way the system works, it would ignore the stun. It always favors the DCD vs the OCD. Now, after the server compared the amount of time it took for those abilities to come in it might update this decision. I plan on changing this in the furture because right now on the Floriaa player's screen they would see the Lucy player get stunned for maybe 4-6 ms depending on the RTT then it drops as the server updates. This is rare, but it happens. So doing these kinds of predictions are very hard, and I am far from the greatest programmer. If I can do it, I know any networking dev could do it. Even Blizzard is not perfect, there are mistakes in their own system. So if you are thinking you could just make a fool proof system that would never get it wrong, than you may want to lower your goals. I was using simple terms there but I hope you get what I was going on about.
Hmm, okay. Is this something I could do in blueprints? Or would I have to learn C++ for this? I am using the advanced sessions plugin is that helps.
Heh, tbh you need to learn more about networking and programming as a whole before you try to do something like this. Not saying I am special cause I did it, I am not. Anyone could do it, but there is a lot you need to learn before you would be able to even start on it.
And no, you couldn't do something like this in BP only. There are multiplayer classes that are not even exposed to BPs.
This is a good video on Overwatch networking https://www.youtube.com/watch?v=4lAawhkIBH4
mainly about update rates, but I think it has info on correction too
as far as things like player controls go (things that you want to feel responsive), is it generally right to do the move on the client and then the server?
e.g. when my player presses "Block", in my playercontroller client copy I'll run the "Set IsBlocking" function on the pawn straight away, then use an RPC to run the same thing on server side
This seems to work well - I'm just wondering if that's how it's generally done
Now if I want to rotate my player to match their aim target, I plan on doing the same thing - on tick in the playercontroller client copy, interp smoothly from current rotation to desired rotation (to aim at target), then do the same thing on the server
I suppose I'm better off not replicating that kind of movement each tick though, and instead sending an updated rotation target every half second or so, and doing the rotation in the local copy
Yes, do your movement on client then check with the server to make sure they can actually move. However never replicate something on tick
Show me a screen shot of the stuff you have on tick
that's currently in the character, now I'm just fixing stuff up so it works properly in network
so I guess I'll just update the desired rotation periodically via controller, and leave that tick logic in the pawn
Why are you not using an axis event for your rotation?
you mean rotate in the input direction?
I have it auto-orient for normal walking around (which replicates by default thanks to the Character class), but I turn that off when aiming, because they "lock on" to a target and I need their rotation separate from their movement direction
(the screenshot is missing the IsAiming branch)
Okay, so have a custom event that fires when you aim instead of having something on tick
the aim target location is often changing every tick
Uh huh. Alright, but you said it's when the player aims right?
Is when you fire that logic
well, "while" they are aiming, keep smoothly tracking the target, i mean
Okay. Well that did not talk matter right now. Main thing is you want to make sure you never have an RPC on tick. Very bad idea. But back to your main question. Rule of thumb: You want none gameplay changing actions to be client based, then ask the server if the action was correct.
so if the server is like, "nuh uh" (you can't do that move you just did), they won't move on the server, so the client will get automatically corrected anyway?
Pretty much. Unless the player is lagging really bad that usually won't happen in large enough amounts that you'd notice it
thinks back to my days playing UT from NZ to Germany
The main things out checks for is things like, is the player dead? Is there something another player did to prevent this player from moving?
Most of the time of nothing happens the server wing have anything to change.
I'm quite glad that I'm attempting co-op rather than versus.. seems a little more forgiving
Forgive the typos, can't edit your messages on the mobile app
Heh yeah. I guess, at least your don't have to worry about the other team calling hacks cause the player lagged out :P
yea and in general, they seem less likely to want to cheat
Well, when you are playing against AI, only person you are cheating is yourself
hey guys trying to debug some hitching I'm getting while moving
I'm using the ShooterProject as a base and some aspect of the code I added just makes the game unplayable at anyting above 10ms
so I simulate lag and recorded with netprofile
this is what my All RPCs looks like http://puu.sh/sJdx9/123a45e03f.png
I just don't know what to make of it
it all says 0 ms?
Anyone know how to get friend invites working these days? Does it still require custom C++ code?
Yes unless you are using advanced sessions like a blueprint skrub
Only thing that bothers me is that visual studio is just slow with ue4
I use atom but not having linting can be annoying for some people
With alot of work you could get clang-linter to work with UE4 and atom though
@stiff wasp any idea on View Game Info?
On a listen server multiplayer is there a way to run a function only on the clientside of the host ?
http://puu.sh/sJwdz/33ba5684fd.jpg I am trying to set clientside visibility of skeletal meshes like this and it works, however when this function runs on the host and hides something it hides for everyone in the server
@carmine parcel you could check for a HUD instance + is authority boolean check
@carmine parcel or perhaps just is authority check
@thorn merlin If I say execute only if you don't have authority, won't it never execute on the host ?
so it does the exact opposite of what I am trying to accomplish when I say do only if you don't have authority, and interestingly it does the correct thing when I bool check true for has authority but now it only works for the host since it is the only one with authority
sorry I don't have the time to get into the mindspace to understand your issue, I'm simply saying there is authority checks, as well as checking if the hud exists, i think new nodes have been expanded to see if something is being controlled remotely or not
Thanks I will check what I can do from there ๐
an additional tip tho the great Mr. Michael Noland told me this on twitter - if you don't care about the locations of your bones/animations - disabling the animations of your characters will save a lot of cpu on your server
also if this is something on your remote clients, you could play with your replicaiton ranges to have them not show up (if all of this is for performance)
Thanks for the tips but this is a gameplay issue, I don't want online clients to see each other unless they are in a frontal cone of each other (it is a top down 3rd person game)
mmm thats a interesting problem, keep in mind one day you'll have the problem of simply just hiding them will be hackable, maybe playing with replication types is the key
Yes, I thought about hiding them on clientside being hackable but couldn't come up with a better approach
@thorn merlin Just FYI, I solved it ๐ Made 2 skeletal mesh for the player characters, 1 only visible to owner and 1 not visible to owner and did the exact same thing I did for the mesh owners can't see.
Yooo
anyone here use steam for their multiplayer?
if so could you please try the find sessions node?
Depends on what setup you have
Without Source Changes, Steam might only work with Presence based Listen Hosts
@wise depot
How do I get materials changes to update from the server <---> client?
Or for instance a door moving to update? The force update node isn't working
i typically use some kind of flag, like a replicated enum, or a client call with that enum as the param to indicate this should happen on a client
replicated vars work better tho with relevance etc if its like a door
right, so I got it to update on both screens, however I've lost the ability for the client to interact with things, how would I go about fixing that?
what's going on there? can't really tell cz of the quality / what are you tryna do?
@flint hedge
Hey, I'm trying to allow the client to open the door and have the actions from the server and the client replicated to each other. Currently the server is the only thing that is allowed to open and touch things apparently, the client seems to lose the ability to interact with things.
Also if you click the picture it should make it bigger?
dunno, prolly phone embedding issues
I guesd you have a RPC on the server that the client then calls?
Well I haven't been doing any coding in C++, I've been sticking entirely in blueprinting, am I required to code RPC's and the like to set up basic multiplayer interactivity?
Yes you need to make RPCs for multiplayer, even in BPs. http://cedric.bnslv.de/unreal-engine-4-network-compendium-released/
Awesome! Thank you so much!
Yea I'm newish to UE4 and entirely new to networking
I learned networking basics by 'following' a video series iirc
that compendium is much better tho, whatever you like the most
@flint hedge tbh, if you are new you shouldn't be doing networking. It is a very complex topic, and not something you should be worrying about while you are trying to learn the basic framework of the engine. I'd suggest making a walking sim, or a simple puzzle game. Something along those lines to learn how the different classes work with each other. Also check this out https://www.youtube.com/watch?v=EM_HYqQdToE
I'm doing Arch Viz and want to try to be able to program functionality to allow two or more people to be in the building at the same time in VR, all I really need is the ability to drop people in the same space and have them be able to interact with the things in the map and have those interactions replicated
learn about basic networking and replication
there are few good tutorials on youtube from epic
Unreal networking is conspiring to melt my brain
all of a sudden my characters pawn is a simulated proxy instead of autonomous proxy on my client and I have no idea why ๐ฆ
is there anyway to get a simulated character from a player state?
ahhhh didn't call Super::GetLifetimeRepProps
My pawn has a child actor component, is there a nice way to have the actor that is that child actor be ROLE_autonomous proxy on the pawn it belongs to when that pawn is role_autonomousproxy? Essentially on the pawn that belongs to the local player I want that pawn to call things on its children that call server functions that belong to them
to give a more concrete example Im making a VR game and i have child actors under the motion controller to represent hands, when the user pulls a trigger the pawn tells the hand "hey grab something if you can" and to do that logic the hand calls Server_DoGrab...
not sure what role is what from the top of my head rn, but I can tell you the child actor component itself has to be set to replicate too
and well, created server-side
so, a simulated client's playerstate doesn't have an owner because the player controller isn't replicated to it. does that mean there is no way to go from PlayerState -> Character for simulated client's?
hey so guys Ive been reading this tutorial
i got it to host a session
but how do i join a session>
guess that's a no @jolly siren
@twin juniper he goes over that in there
uh?
@modern fable hmm okay, but the character is replicated. so it's there, i just can't get to it from the playerstate
so like
when u call FindSessions()
why doesnt it return an array of sessions
or something like that
where are the sessions stored
lol
that's in there too
SessionSearch
They are stored in the "SessionSearch" variable we created. "SessionSearch->SearchResults" is an array with all found Sessions.
is there a Get Player Character function? @jolly siren
but i already am calling both... im calling findsessions() in my begin play and then im calling joinsession after
I can get it on owning client/server obviously. but can't figure out how to on simulated
you can add a custom variable as a reference to player's character, which is kinda lame but does the job
@twin juniper are you tellling it which session to join?
debug it
Im not sure exactly
how the
FindSessions function is finding a session
like what is it finding it by
an id?
no problemo ๐
filter as in ..?