#multiplayer
1 messages · Page 305 of 1
Thanks I'll check it
I'm pretty sure that must be another better way 😀
@twin juniper
Getting 0 will return the servers player controller
You can use game state to call an event as well. Say, when X players have joined, tell gamestate to call event "initiate clients" or similar
I make a mistake that branch to check IsServer always return true because this event only call in server ... I must check the new controller to see it's server or client ... Is it possible? @twin juniper
@wet oriole You can call an event on the players controller to see if he's server/client, since the playercontroller exist on both server and owning client
Yes i did same 😋
How ue4 let us test steam multiplayer without external steam agreement or some sort of pay for steam?
Information specific to the Steam Online Subsystem
if you start the game, it will appear as Spacewar
@compact oyster doest this mean that steam allow developers test steam multiplayer without publishng game in steam?
yes
it will actually give you the access of steam that you need
e.x steam overlay, name, id etc
that suprising
Hi guys, i'm having a bit of trouble from within a Widget Blueprint.
On my server pops a Start Button ( working ). When I click it, it should disappear and call a multicast showing a text ( "Loading" ) on all my clients. BUT, it only is called on the Server. What am I missing ?
Debug messages on screen are "Server : < Who am I ?" and "Server : Hi i'm multicast".
That's because widgets are local only; the widgets that exist on the server aren't the same object that exist on the clients @supple musk
In contrast to a normal object like an actor—those exist on both the server and client and are the same object (if it's replicated, of course)
Thank you @brittle sinew .
So to work around that, should I get the start button press event in my widget C++, call a Multicast RPC on the HUD class which will in turn call the Show Loading Text on the local widget ?
Have anyone had the destroy session issue and been able to fix it on their own? The issue has been backlogged, but there must be a solution: https://issues.unrealengine.com/issue/UE-38897
It seems to work well once all clients has successfully left session
do i have to do anything special to properly host a dedicated session? from the command line if i launch my packaged project with MapName?Listen everything works fine. but if i try to launch it using -server it doesn't listen on port 7777, the log doesn't really say anything
@Etienne#0067 you need to make the owning player call it, make the host have a a function thaat multicats and makes the other players show the loading screen
you just get the owning client from the widget, cat it, and call the multicast event
Anyone got good suggestions for hosting a server? (besides the mainstream ones like AWS or Azure)
digital ocean droplet
doesn't have the crazy advanced features, but you would never use those with UE4 anyways
@hollow bear, did you succeed to communicate through a socket ?
this wiki is a good ressource to achieve what you want : https://wiki.unrealengine.com/TCP_Socket_Listener,_Receive_Binary_Data_From_an_IP/Port_Into_UE4,_(Full_Code_Sample)
(erf don't forget the ')' in the URL)
Thanks, I've seen Rama's implementation but I haven't gotten it to work. I can't test it as I can't find something that is easy to use to send a message over TCP. I've never done networking before, even though it is just routing everything to localhost.
Is it ok to use AddForce AddImpulse, etc. inside PerformMovement based on a custom movement flag (in mycase whether a jetpack is running)? will it get all the state rewind, server correction, etc.?
I see other examples of jetpacks use AddVelocity, and AddForce says it queues all forces until the end of the frame and then combines them
didn't know if that (queuing for the end of the frame) conflicts with anything in the way PerformMovement works
Hm i don't know how exact you need that, but for my Grappling hooks, networked, i just set the velocity directly, on server and clients
Any tips on doing a dodge roll in multiplayer? I want to run it on the client-side first so there's no delay for the client and then send the roll input the server. I can't figure out a nice way besides disabling Unreal's movement replication and writing my own replication for movement since Unreal's replication snaps me back into place when I roll.
does ue4 smooth out movement for you in multiplayer or do you need to handle that yourself?
@boreal bay movement is smoothed on the CharacterMovementComponent for you yes. Any custom movement that doesnt use this components smoothing will need to be smoothed manually.
Hey guys, I have a project that was using blueprint networking (I think I got some of the behavior from Shooter Game). I want to convert the networking behavior to c++ so I used the tutorial @thin stratus put up to try and do that. I completed it and tried to connect to games playing on the same computer and it can't seem to find any games when I try and find games. I'm using 4.14.1 and the OnlineSubsystemNull subsystem to do this (will switch to Steam once I get things working)
So I'm wondering if there is something that was added in 4.14 that is required to do this sort of thing or if connecting 2 games on the same computer isn't possible to test this sort of thing. Thanks!
if you're working from blueprints, is it possible to get access to OnRep for movement, or would i need to up cpp for that?
(for the purposes of smoothing movement for an actor, not a character class object)
@thin stratus you did a MP tutorial?!
@gray crag check your log files and make sure subsystem booted up properly
in Paladins they use GlobalTimeDilation I think
when the match ends everything fades to black and the time slows
but you can still move etc
I guess it works if you use it correctly on the server? @gaunt kestrel
time dilation works fine as long as you fire it as a server function, it'll replicate across to the clients
good luck 😃 word of advice, dont forget that if you're going to use a timer for when the time dilation ends, remember that the dilation will effect that as well 😉
@wary willow Hm?
@thin stratus nothing, someone said you did an MP tutorial. He probably meant the comp.
@fresh saddle just checked the logs and it said "Loaded Plugin OnlineSubsystemNull, From C:/Program Files/Epic Games/4.14/Engine/Plugins/Online/OnlineSubsystemNull/OnlineSubsystemNull.uplugin" so it seems to have loaded it correctly
That means its loaded the plugin but it might not have started correctly.. send me your log? @gray crag
So I have a question about a few multi-player things I'm having a hard time wrapping my head around. First off is how to preserve security of logins. For example I have a php set up and a lobby map. You log in and the username and encrypted password is sent to the php server and Json comes back with success and a few basic variables like account Id, username and password used. It then puts that info into storage and migrates to the game map. The server then through Json requests all of your persistent data and applies it. The issue I'm worried about is that encrypted password is sent and could be intercepted. Then a person could hook the client and paste the encrypted password into the network stream and hijack an account. Is this something that I should be doing differently?
I was thinking of storing the salt locally so it would encrypt off a unique salt but then if the player reinstalled they would loose the salt
does anyone know why my projectiles don't show up on client when I'm really close to something when I fire? I spawn the projectile on the server and replicate it. But when it hits something I'm not destroying it right away. I'm setting it's lifespan. So I would expect to see it on the client and server. But it's only on the server
SetLifeSpan is really basic and just starts a timer. So it shouldn't be stopping the replication
Are you spawning it to ignore collision on spawn? It might be spawning collided and not actually spawn
I thought of that but SpawnActor logs if that is the case and I don't see anything in the logs there. I'll add a breakpoint just to make sure
hmm I see it in the world outliner for the client
oh weird
it's bouncing off the object it's hitting and flying off super fast in a different direction lol
but only on the client
💣
these aren't projectiles that should bounce either
wtf
That's on the client^
the client/server projectile velocities
I am spawning the projectile on the server only and replicating it to the client. So I don't understand how that could be possible.
my projectile has an initial speed of 5000
if anyone else every runs into this, zeroing out the velocity on the projectile movement component fixed this
Anyone found a out of the box way to do Vive Motion Controller replication?
SO, no plugins and/or engine code changes.
@wary willow can't you just put actors that follow them and replicate them?
Actors would get replicated, but the MoCon wouldn't?
As in, me moving, would not really move
I'm just doing research before actual production start, and I may be limited as to what external content I can use
So I am trying to streamline it if possible.
oh right
can you just replicate local space tranforms for them?
like location + rotation
I don't know if there's actually some built-in replication for them, although why would there be?
it sounds pretty specific use case
I know there a way to do it via tick
I guess I should have said I would like to rule that one out
@fierce birch ATM MoCon replication is actually bugged
Well, it was supposedly fixed in 4.13, but that never happened
ah
That is why most people are either doing source changes or using VRExpansion
I will probably have more than 5 non-coders on my team and it's already going to be a headache with Perforce
When a client disconncects, the possessed pawn seems to be destroyed immediately. How would one handle destroying objects associated with the pawn? I no longer have a reference to them, and keeping an array of "pawn objects" to then loop over on disconnect doesn't seem right...
Binding an event to "OnDestroyed" might work, but I'm unsure if that will be replicated in time. Not sure how that order of operations is handled
@twin juniper, IIRC you can specify inside config files how many times you want to keep alive Pawn and Playerstate
after deconnect
Yes I've set player state
Didn't see pawn
In this case I spawn actors on the server that is then attached to the pawn. Client disconncects - > pawn is destroyed -> spawned actors stay
Which makes perfect sense, just trying to figure out the best way to deal with it
The "Inactive Player State Life Span" is a variable within the game mode
Only refers to player state
Clean up when a Pawn's player is leaving a game. Base implementation destroys the pawn.
override this function, and unpossess the player
instead of delete it (that the engine code did)
Ah that might work. And then I guess setting up a system to "time out" the pawn
Ben reply is interresting: https://answers.unrealengine.com/questions/225341/bp-playerstate-gets-spawned-when-player-leaves.html
maybe if you add the player to an inactive state, with GameMode->AddInactivePlayer()
I will see function code
But it seems as if that's already done by the playerstate
Rather, the playerstate is left as an inactive player
And it automatically looks for inactive playerstates on postlogin
I don't need to keep the pawn, it's cleaner and easier to destroy it
And stats will be kept in playerstate
So on pawn begin play I can go through playerstate and see if stats != null
And set pawn accordingly
So, I think my solution is: On PawnLeavingGame(), call destroy objects on pawn, then destroy pawn
ok
Hello everyone, I'm having some issues with possession on dedicated server. What I'm trying to do is allow all my clients to take control of the other characters but only the first client that connects is able to take control of characters that are part of the level instead of connecting clients. I think I'm unaware of some requirement before I can call Possess on the server, but didn't see anything in related docs. So if anyone knows of a can my client controll this actor checklist, that would be much appreciated.
i'm taking a bit of a shot in the dark here, but i'm not sure that's possible with the way owners/instigators work
you may have to spawn a new character off the owners controller and copy the properties over
you could try changing the owner/instigator of the character to the other players controller, but i'm not sure that's possible
You could do a DoOnce at postlogin
So the first that connects only gets through
Or at begin play of player controller
Calls event on gamemode
Gamemode event fires doonce with the logic you want to happen only for the first to join
Thanks for your input, its much appreciated. @polar bridge Hmmm, I have tried setting the owner before but ended up with inconsistent behaviour, i'll look into it more. Do you know of any docs about ownership? A quick google didn't turn up anything. @night jay I'm not even sure what is wrong. So I wouldn't know what to do at postlogin/beginplay
there are not-go-great documents out there i think. most of my knowledge comes from talking to other guys on irc
An overview of the role of the server in multiplayer.
Possessing the player should make the controller automaticaly its owner IIRC
are you unpossessing it first from its original controller then trying to posses on the new one?
might just be something as simple as it's already possessed
I am not, because I have seen that the first thing the Possess call does is call unpossess. So me doing it would be doing it twice.
ahh, not sure then. i only spawn characters off the controller then possess them immediately after, so my knowledge is definitely limited. but i would look a bit into ownership
doesn't give you an error when you try possessing?
no errors
you try putting a breakpoint in on the possess and see what it says for owner after? maybe that will give you bit of an idea whats going on
I dont see a call to SetOwner for possession and I do see one SetOwner(null) in unposses. So am definatly investigating that.
SetOwner in BP doesn't really work
at least it never did for me
No idea about C++
Normally you set the Owner when you spawn the Actor
Non set owners are owned by the Server and can't have Server and Client RPCs
As they need the Client to own the actor
A pawn usually gets spawned an possessed on Server side
And the Owner gets set at this very moment
Which is normally the PlayerController
Possessing might set the Owner, but I don#t really have the C++ code in front of me atm
Calling Possess unpossesses the old pawn
As PlayerControllers only allow possession of one Pawn at a time
What exactly are you aiming for @sick remnant as I didn't really got it in your initial post
I have a Character standing in the level and I have 2 clients controlling a character of the same type. I want to be able to aim at the character in the level press E and take control of that character.
But only if it's an "empty" one, or?
So you can't take control of a Character someone is controlling, or?
Also, C++ or BP?
Right now I dont care about empty, working in BP
infact, I just notice I dont have the problem when taking control of the other clients characterr.
Hm okay, I will still give you the "solution" to not kick someone out of his character
So what you should do (just out of my head)
In your PlayerController
Press E -> ServerRPC -> LineTrace (from Camera for example)
If hit -> Cast to your PlayerCharacter Class -> From the result call "GetController"
Check if Valid -> if not (no one controls it) call possess on it
That's what I would try
@sick remnant :D You still there?
I tried your suggestions, same problem.
Could you also explain me the problem in a short and easy sentence ?(:
I'm sure I can help you somehow
If I take control of the character with the second client to connect, the camera does move to the possessed character and I can look around, but I can't walk.
The Character is correctly possessed, yes?
If you simply print a string on your Input, do they work at all?
Like for example print the value that the "MoveForward" event gives
Does that change to 1 if you press W?
Lemme try sec
yes, sorry that took so long.
Sooo anyone know how I kan get inactive player states?
@sick remnant Ok so on the newly possessed Pawn, you get input events returning 1 if you press W?
That's important to know, so I know if you have Input at all or not
Yes, I get input events returning 1 if I press W
Can you show me a screenshot of the code you use for walking?
ThirdPersonExample
I don't have that at hand :P
So simply adding Movement Input I assume
The Character is set to Replicate, right?
And also to replicate movement?
@night jay AGameMode::InactivePlayerArray?
Is that C++?
no errors, character is set to replicate, and replicate movement is ticked
@night jay yes, not currently exposed to BP
If I do an get actors of all class will it include that
Of what class? PlayerState? Because that will get all of them..?
@sick remnant Hmmm. Does the PlayerController have movement input and is maybe consuming it?
Hhmm
Other question
My default playerstate of the gamemode is a child of the parent playerstate class
There I have my character stats and whatnot
When the player leaves does it set the inactive playerstate as the same child playerstate class I have in my default gamemode settings or does it set it as just playerstate(resulting in the loss of any variables set in the child playerstate)
Might be a bit vague
It uses your class
@thin stratus I am getting input in ThirdPersonCharacter, lemme check the Controller.
You would retain the child values, but you would have to cast to it ^
Alright cool
I exposed functions that allow getting the values back iirv
OverrideWith should do that
One more question
Is there a variable in the playerstate or anything which has it marked as "inactive"?
That would be called in the new PlayerState and the inactive one should copy that over then. At least if I understood that correctly
I don't believe there is, though if you override AddInactivePlayer you could set a custom variable on it
Not exposed to BPs (the inactive var)
Yeah, I was wrong
/** Means this PlayerState came from the GameMode's InactivePlayerArray */
UPROPERTY(replicatedUsing=OnRep_bIsInactive)
uint32 bIsInactive:1;
Hhmm
But you might be able to check
if the Controller is valid
Inactive States should not have a valid controller (on server)
Alright thanks
@thin stratus It uses the default playercontroller C++ class, and I am seeing input in my Character.
More questions
Is it possible to travel to a server while not needing to open a new level?
Like I want to travel to someone's lobby
But the lobby is just the mainmenu with a different widget
And thus to prevent stuttering everytime you try to join someone's lobby you only join the server and load the corresponding widget for the lobby while grabbing the correct info from the server like players etc.
Possible?
Anything to get a smooth lobby experience? I know many games that provide that
When you travel to the Server
you open his map
That's how it works :P
If you don't want that, yo uwould need your own Session/Lobby logic
@sick remnant Hm. Only thing that comes to my mind now is that maybe the Controller Forward Vector returns 0,0,0
Since you say the AxisValue of new possessed pawn is actually changing
could someone help me look over this or figure out this multiplayer resoawn system geez stressing me out
whats wrong with it?
just can't get one to work been trying everything for days
does register server not get called in PIE or something?
trying to override it in my game session, specified the game session in my game mode, but never hit the breakpoint. hmm
is there any documentation on dedicated servers? i can't seem to host a session properly
anything on the net is pretty outdated, what little there is of it
@polar bridge, most recent tutorials about lobby : https://www.youtube.com/watch?v=abmzWUWxy1U&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ
i took a quick look at that stuff but didn't see anything specfiic to dedicated servers. i kinda took a step back and making sure everything works local with null subsystem. i think i found a few problems with my code, but i also think for some reason RegisterServer on my GameSession isn't getting called when i run a dedicated server, and i have no idea why.
i've done that, and i've gone as far to put log calls in there. but when i launch the dedicated server executable with logging enabled, i never see that log call 😦 it's almost like it's not picking up on my game session. i haven't tried since switching from steam to null online subsystem
there was almost definitely some problems with steam
so my GameSession should just call RegisterServer when i launch a dedicated server right? it's an overridable function, so that would make sense. but i'm 99% sure it's not calling it, because i'm not seeing my log calls. but now. i do have it working with a listen server, but this dedicated server really doesn't want to create my session
Is there a way to use an FUniqueNetId as a key in a TMap, without converting to a string?
@jolly siren looks like ToString would still be the only way with that with UniqueNetId, because all the internals are hidden
hmm, sucks there is no hash function exposed because it does expose operator==
I'm working on multiplayer and process is customEvent(runOnServer) execute customEvent(multiCast) am I doing wrong?
Pickup function
Hi, how might I go about adding a simple push-to-talk voice chat to a two-player game? I'm using Blueprint and I do not know C++, but if it's only doable with C++, would it be simple enough for someone to help me out with it?
No idea if that's simple. You can check out the Advanced Session plugin
i think i saw voice support in there
could be bound to steam though
anyone able to offer some insight? https://forums.unrealengine.com/showthread.php?133405-Cannot-get-my-dedicated-server-to-automatically-start-a-session
Hello all,
I have spent a few days now trying to get a dedicated server sessions working in UE4.14, with no luck. I will step you through what I've done so far to try and make the sessions work.
I've setup a main menu system that searches for sessions on the LAN. I've created in such a way that I can host a session from there, and it works perfectly. I open up one instance of the game, host it as a Listen server, open up another copy of the game, it appears when I do a FindSessions, and
UE_LOG(LogTemp, Warning, TEXT("****************************Attempt to register server**************************")); Is also not called?
@polar bridge
Will head to bed now. Are you sure the GameSession class is actually used? Maybe add the BeginPlay to it (or what ever it features for that) and check if it actually gets spawned
Also, are you sure you want to advertise the DedicatedServer as a "non LAN match"?
Because for Online Session finding you need a MasterServer or a Subsystem like Steam (which offers a MasterServer)
correct, that first call is never there either.
in my tests locally, non LAN worked fine
but that was with a Listen server
i will try your suggestion of using beginplay to see if it's ever spawned, i bet it's not
Non lan works fine cause you are still in lan
If you try that with 2 pcs not sharing the same network you won't find it anymore
Session + internet need a masterservsr
My god second time i do that
Freaking phone app
@polar bridge
that's fine, i want to get it working with null subsystem/LAN first, then i'll move over to steam. i realize it won't register until i move over to steam
if i put in a log call in beginplay, doesn't show up. so obviously it's not using my specified class
so i grabbed the Twin Stick Multiplayer Example thats pinned to this channel, downloaded it and tried to compile and i'm getting a boatload of errors... could it be that it's using an older engine version and it's depreciated? trying in 4.14
@rough iron any ideas?
it's done in 4.11
or 4.12 xD
might need to update the source ^^
give a day or two xD
Uh question
Is it possible to get someone's Steam username?
Not screenname
The name one puts in when logging into Steam, the unique name
I don't believe so, I've never seen that as part of the API and steamid.io doesn't give it
If you need some tangible to tie to on an account, use their ID or ID64
And ID matches the ID you can get from accessing the profile page on the Steam website right?
People can define (and change) a CustomURL, but you can always access their page via steamcommunity.com/id/{ID64}, even if they have a custom URL
I'm not sure if you get a person's CustomURL or the ID if you were to click on them on your friends list or something, not at computer to test
Would be kind of a pain to only beign able to get it ingame. I want to make some kind of whitelist for testers so only they can play
Well, you can use sites like I mentioned, steamid.io, to make a pretty complete API call with just a CustomURL or name
I'm sure there's a lot of others too
edit - screen name yes, from PC, username no, for obvious reasons
so for the twin stick multiplayer example, i downloaded 4.11, but i'm getting the following when i try to compile - http://pastebin.com/dwGqJkMm
and this is the error for 4.14 - http://pastebin.com/zsckUD0w
update for anyone interested. for 4.11 it was an issue with VS2015 Update 3 - hotfix is here - https://forums.unrealengine.com/showthread.php?3147-Current-Available-Quick-Fix-Solutions
Since the launch of UE4, we have been working as quickly as possible to resolve important issues as they have been reported to us. Once an important fix has been made, we sometimes respond directly to the affected users by providing a QFE (“Quick Fix Engineering”) which we share here on the forums and Answerhub.
These QFEs eventually get rolled into the hotfixes and major version release updates that we provide for all, but until those updates we want to make sure that they are available to
yeah, for some reason they didn't put full hotfix for 4.11
IMO they should have put out 4.11.3 for that as it's pretty big problem
also
they never put out fix for 4.10 for that same issue
4.10 was first ue4 that supported VS2015 by default
you can manually fix that on 4.10 though
any idea how a summon system like the one in Dark Souls could be done in unreal engine?
as far as I can tell, it would be some thing like this:
- whenever a player plays online, he uses a listen server and sends info to a server with a database that stores his info
- when a play registed online puts a summon sign in a certain place, he also sends that info to the server
- all online players ask the server for the summon signs in their area on a timer
- when a player summons another player, the server makes the summoned player connect to the summoner using the registered IP of the summoner
I have no idea what kind of server it will be tho or how to make it.
As you wroted .. you need a listen server. This server do only data collection, collect every player ip and necesary data for the connect. Every Client running the game in "local" server mode i guess and nobody can join to this (because only the listen server know information about ips) except who has summoned. So basically you summon your friend, you send a summon request for listen server. Listen server check your friend is online etc and if everything fine listen server will send a connection command eith your ip
what would be that "listen server" though?
a dedicated server running somewhere?
the problem is how to do that communication
hmm maybe easyest explanation of listen server. listen server is somekind of lobby where accepting player connection, logging player, check passwords etc then forwarding player to the game server 😃
I'm not really sure that's a listen server, more of a coordination server
A listen server is someone playing in the game while also acting as a server
Yeah, you are right. Listen server basically someone who play and acting as server
But in not client server model, listen server is a backend server, but mostly called login server/realm server etv
But no matter, if we need collect online players that is definitly not a gameserver, because server who collect data, managing userprofiles, friends is a backend server :)
ue4 will not handle this by default i guess....... for this need custom onlinesubsystem implementation.... where client start, connect to a server and indicates "hey server im playing and im online with these ip to summ me if somebody want"
@lean river, are you already develope a backend server like this ? I made a small one using Java with async sockets
but there is a better language to handle more connection or simply be more powerful ? python ?
@rare cloud nop, i never developed a backend server from scratch, but i worked with many backend server. i helped in trinitycore/mangos (wow emulators 😄 ) and i work on another games too... this games used backend and master servers too... soo im similar with these network model 😃
i think java is good enough. WarZ used asp.net for backend 😄 that was horrible...
wow emulators have own master server written in c++ and master servers have direct acces to db server 😃
but every language is good if run fast and stable 😉
that's the problem, they're not all fast. not even close. c++ is one of the few languages still around that actually compiles down to binary and not some stupid intermediary machine code
java is getting much, much better
yeah asp.net is probably one of the worst of the bunch, it has so much going on in the background
for login and user profile things i think php good enough too and unreal has curl implemented i guess?
i'm not a fan of php myself, it's pretty slow too from what i've heard.
@lean river, ok thanks
@rare cloud imo python or something like NodeJS would probably be faster.
java is not bad
it's gotten significantly better over the years
i'm a fan of NodeJS myself
python probably still faster
python is not my favorite language haha x)
theres a module on the marketplace, for server communication - i think its python
then theres gamesparks
I really hate the auto typing
i use asp.net at the moment, mostly because thats my day job - been looking into nodejs or firebase or something
regardless of what you say bout asp.net it comes with additional cost to host it, hence why i wanna move away from it
azure makes me want to pull my eyes out
lol i've had limited experience but, not fun. our corp is moving everything to azure soon ugh. hoping to convince them to at least look at AWS
i used aws first, azure is fine.. but the costs are higher, the ui looks pretty but it really is frustrating to do things
but if i wanna deploy a webapi to azure only, you have to include all this nonsense.. i want something super lean and easy to manage for my web layer
yeah i played around with a pilot project and it seemed overly complicated when you want something simple
try deleting all your stuff you created to test
thats what made me lose it, it takes forever
oh yeah, i had to. and it was weird. of course you want to make sure it's all gone so you don't get charged lol
i can't even remember what it made, but i remember having to delete 6 different security groups or something stupid
yea, you have to do the same on all of them, but i found it was like 10x the clicks on azure
@lean river dammit, I was thinking that there night be hacky way through unreal without having to modify the source code or knowing python to test the concept
this guy posted on the forums - its all python - https://github.com/RyroNZ/UE4MasterServer
theres also the plugin on the marketplace
I'll star it for now, but I have no idea how to do this stuff for now
@polar bridge it's easy yes but the syntax gives me nightmares
you have to space everything right
@red ledge maybe look at https://www.gamesparks.com - it has a UE4 plugin
The unity of the server-side. GameSparks is a cloud-based development platform for games developers enabling them to build all of their game's server-side
from what i've learned with my past year in UE4 is there is no shortcuts 😃
"hack job" solutions tend to turn into hack job games which turn into nightmares themselves
@thorn merlin Thanks, saw someone talkin about that in the forums before, I think about the PAragon server or something, not my priority right now but I'll check it when I'm free
do you have a project already started? it's good to see if the tech will work (which it will), but it's maybe not the best starting point
i've worked with the networking for a while now, and it still makes my head spin
look at rocket league, they definitely use some form of a master server
did you see how rocket league was like the #1 downloaded game on ps4 or something like that last year. wow I knew it was big but not that big
not surprising, it was free on psn for a while i think
ahhhh
plus it's a decent game 😄 some people are ridiculously good though my god
@polar bridge only testing some networking stuff for now, trying to learn how to put together a networked RPG/MOBA together
gotcha
it's possible, that much i know. but, tricky for sure
at some point you will almost definitely have to make your own online subsystem for something like that
Yup, I know. right now it's not something outside of the normal session based system that you can do on steam, but most likely will have to learn nretworking and how to modify the source
i think the online subsystem interface should give you everything you need without modifying source. i think.
I mean for making something like that dark souls summon
or invades
btw, what kind of networked games have you worked on?
top down "bullet hell" shooter
don't know if i'm allowed to link my twitter?
meh. mods can delete if it's a problem. twitter.com/Lattasoft
bullets aren't actually replicated, had to do everything through RPCs
very professional
https://twitter.com/Lattasoft/status/816133344182366208
hahaha
i'm a programmer, not an artist 😃
hoping to get a kickstarter going soon to fund the art side
good luck!
if the kickstarter worked. any idea on when you might finish it?
also, is that a freakin' parrot?
depends on what you define as "finished" lol. early access i'm hoping this summer. full release next summer
yeah that's the girlfriends linnie haha we have two
thanks man! yeah that's the hope
i'm sure i'll be able to get greenlit, i'm more worried about funding
hope to get to that stage where I'm sure of the greenlight lol, btw, do you know the process of it? not the voting, I mean after that. or are people not allowed to talk about it?
i don't, and i know there's an NDA
and as far as i understand it the NDA is rather ... insane
not allowed to talk about profits, the inner workings, nothing. but i do know 30% goes to steam.
Damn I thought they only took 20%
I've been on steam and afaik I didn't sign any steam NDA
but I'm through a publisher so maybe they signed it
but yeah its 30%
for everyone
Im sure if your AAA you could talk them down
so if you made 1000$ with the unreal royality and the steam 30% it will end up being about 760$?
maybe im not so good in math, but (1000 * 30%) + (1000 * 5%) = 350 and 1000 - 350 != 760 😄
wait i missed up I multiplied the 5% and the 30% together
forgot that both epic and steam get their share from the revnue
i'm pretty sure there's an NDA, talked to other indie devs who said they can't talk about their profits because of it
yup, I read about that somewhere
but yeah steam takes their pretty penny. without steam though, you just have no exposure
yeah but still there's an explosion of steam games in the summer each year
in a way this is your chance to shine, but on the other hand, you don't really have the strong media other games have
unless the concept of your game is really unique and it went viral
yeah i think getting ahold of steam and trying to get some sort of spotlight is huge
or sale
or had a trailer with insane graphics that also went viral
sticking out from the crowd is the biggest thing. i know myself i go "ugh another survival game, skip"
yeah, that's the problem
a game like TABS for example is very simple but went very viral because of how silly and buggy it is
a single tweet/youtube video can take you from nothing to 30,000 sales in an instant
not sure how can a solo dev or a very small team break the 10k$ on steam tbh
i thought that at first too, but found out later that people are tend to make quite a bit as long as the game is well polished and marketed
guy who made dwarf fortress said he's raking in around 6 figures a year
that's pretty damn good
10k is not a huge number of sales even, around 680 for 15$ title
have a local friend who hasn't told me any numbers, but from what i can guess, is making ~$50k/yr
and tbh i didn't like his game
but he put shit loads of work into it, listened to his players, released it for xbox, etc etc, and is making a living off it
he actually quit his day job to work on it, don't know if i could do that but yeah haha
not to mention that you will end up getting around 6500 only since steam will suck the revenue with your blood
yep
I can live on pretty little since the living cost here is very low when you have an income in a strong foreign curreny like USD or EUR
those 6500 are very good if I didn't have to pay for college
yeah i'm canadian myself, so the usd->cad exchange will pretty much make up for that 30%
or 35% even
wait I can't find any info on dwarf fortress
can you give me a like to the game site or steam page?
50k/y is very good tbh, not sure if I will risk leaving my job for a chance at that
just 6500 a year I would be making 5.5 times the average salary so it would be quite good
it was on reddit, could try to find it
nah, no need
it's hard to get figure out what the numbers are exactly. but, from what i've seen, if you put 110% into your game, make it absolutely shine, market it well, design it well, and mostly importantly have something FUN to play, you can live off the money. maybe not live like a king, but you can live off it. if you're one of the lucky ones, your game goes viral, or people find it really fun, and you do live like a king (ie: rust and gary). but, being realistic, those cases are few and far between.
the problem is that i think most guys just can't put in that 110%. i've almost given up many times, because really, it's not easy.
true, I give up on simple tests sometimes because they are too difficult or I can't solve a certain problem etc, but to live like a king here doesn't really need all that money, 20k a year is enough for me until I finish college and maybe leave the country because I'm not planning on staying here my entire life
it's also very fun to make a fun game that you enjoy and take in player input then present them something they like as well
i hear you, don't get me wrong some of my motivation is the potential to make money, but right now most of my motivation comes from re-creating a childhood favorite 😃
if you don't mind me asking, what country?
some of my motivition is money as well since I kinda need foreign currency if I want to live here right now, game dev is fun , I love it, and it can get me that, so
Egypt. A country famous for pharaohs and a currency that its value decreses by 120% each year
oh wow, yeah, i honestly can't think of many country's that are in a worse economic situation
LogNetPackageMap:Warning: SerializeNewActor: Static actor failed to load: FullNetGuidPath: [19]/Game/Maps/UEDPIE_1_TestingLevel.[17]TestingLevel.[15]PersistentLevel.[123]TargetSequencer_Marker2, Channel: 58
I am running into a weird issue where after i use server travel, assets dont seem to load into the map
Its coming down to an issue with loading child actors I think
has anyone ever had an issue with steam overlay not showing up when you hit shift+tab?
did you enable the steam online subsystem?
yes
if that's enabled, and you have steam running, it should pop up
do you have overlays disabled in steam 😄
it does work on other games - just tried it
you can disable overlay in steam itself on an individual app basis, i would double check that
it is using spacewar right now
what's preventing me from putting in an steamapp id?
oh, it's gotta be linked to my account, right?
i think the steam api won't let you
i'm going to try it with an appid I own.
nope - it runs as my project, but it didn't open the overlay
while opening the steam overlay isn't a pressing problem, it makes me believe that I've done something else incorrectly
do you have shift+tab bound in your game or something?
no, it's basically an empty project
yop copied over all the dll's necessary for steam?
i imagine if you didn't, you wouldn't get the popup, mind you
so, you need the steam_api64.dll from the steamworks page, then you need to install some steam app on your machine and copy over the dlls from there as well. or else you wont have the steamclient/tier0/vstdlib dlls from what i've seen
i don't remember the app id i used in steamcmd, but that fixed quite a few problems for me. a quick google will probably find it
it's packaging with that dll
I'm not sure what you mean by copying over the other dlls
Information specific to the Steam Online Subsystem
some of this is outdated, unreal now ships with the steamworks api
I did add those dlls to my built project with no change
https://answers.unrealengine.com/questions/484873/413-steam-setup-not-working.html - I tried running this project AH484873 and it does not let me access the overlay
trying to join a game as space war reveals some interesting logs - I can see so many games out there with odd names
slightly late to the conversation, but @red ledge - playfab have a UE4 SDK, full dedicated server hosting and a basic matchmaking system. it's what we use currently for our title which is pre-greenlight but soon to be announced 😃
long story short, our online game flow is very similar to something you would find in a MOBA (league, dota, etc) and it works really well for us
you can also implement your own matchmaking system and tie into their API through REST calls
@orchid cairn why use playfab over steam or others?
cross platform multiplayer, and easy dedicated server hosting were the two big factors for us
playfab also supports an easy backend for online accounts, player stats, in game purchases etc
cool
@orchid cairn Did you compare it to GameSparks?
Playfab seems to be a lot more expensive
Question: Why isn't player state constructed before the player pawn? I'm getting the player state on begin play of the pawn, and it always returns null
@twin juniper - remember that the player state is created on the server, and replicated across... if you're trying to access it from a client, especially if youre in beginPlay, put a loop with a 1 tick delay or something like that and check IsValid on something in the player state to see if it's replicated across yet
and we looked at GameSparks, the big difference for us was the free tier on playfab suited us for testing, and we are taking advantage of their amazon EC2 integration for dedicated server hosting. means we can spin up servers on demand, only pay for what we use, they handle the integration for us, and the fee for dedicated server hosting is quite reasonable (roughly the EC2 costs + 10%). since we need a smooth multiplayer experience, it's worth it for us
@orchid cairn I am actually getting it after Has Authority Switch -> Authority. Shouldn't server have a reference to the player state before it creates the pawn?
Oh, pawn is loaded on client?
not always, not sure why UE4 does it that way, but whenever we touch player state at the start of a match or when theres a chance it hasn't been initialised, we just throw that loop in to be safe
your pawns should be spawned on the server, then use replication to get them across to client
@orchid cairn Hm, what if I uncheck net load on client
for the pawn? you wont see it on the client then
Ah, I thought it was created on clients machine to save the server some processing
Or that that's what net load meant
give me a tic i'll screenshot what i'm talking about
Yeah I'm aware of the loop, I just don't understand why player state isnt instantiated before pawn
you can always solve the problem the other way, use GameModeBase instead of GameMode to inherit from, and implement your own spawn logic
The loop seems to work just fine. But yes I've been thinking about that. It's just that I started the game modes before gamemodebase existe
And I have some logic tied into Match State
depending on your game, it's not that rough to make the change yourself, i know for us we were reimplementing alot of the stuff GameMode had anyway
if you do a delay of 0.0, it'll wait a single tick (either works fine tho
I'm fading in the view for the player anyway, so saving a couple of cycles afaik
@orchid cairn I like that playfabs unreal support seems pretty solid, but gamesparks free tier isn't bad either. 100k players on the indie tier, which, for a VR game will never be passed
if you dont need server hosting, that would be fine 😃
Yeah I'm doing listen atm. First networked project for me so I'm trying to stick to as much documentation as possible, and I have seen more for listen than for dedicated
I learned pretty quickly though that dedicated would solve a lot of issues
your code base is very similar, main difference is you'll have to work from source to compile
Right, and set a server default game moe
Source would be no problem for me, but I'd have to teach my artists on the workflow unless I can compile out rocket builds for them
I read into that and it didn't seem like something epic supports outside of their own internal ones for the launcher
if your artists are happy using source control, their workflow wont change
source still builds the editor for you
you'll just have to have a programmer do a nightly build for a ded server, or use something like jenkins
@orchid cairn Thanks for the info I'm looking into it
Definitely some stuff to learn there
Ok it doesn't look too bad when actually going through the steps, most of this I've done in one way or another
@orchid cairn thanks! you can use prefab to send info for all clients connected, right?
the main diffrence I guess is that what I want is more of a master server than a dedicated server, the server only has some informations that it sends to players and vise versa
@twin juniper I had that problem before, I do a timer delay on beginplay
be carful though, the slower the machine running the game and its internet, the more the playerstate needs to load
up to 0.1 s is pretty ok, the player won't really notice
@red ledge yeah, on login we load the client info into gameinstance for UI, then when the client connects to server it validates the player through playfab, then grabs the player data again (so for example, the server knows what weapons the player is allowed to use based on in game purchases)
dont do a delay only, build it into a loop 😃
@orchid cairn Thanks will change it to that
but what I mean is that your server is dedicated
so it was made with unreal
but it's kinds too much to make a dedicated server when you want to just some info
the problem is that those info are very uneral spacific like session info etc
and player unique net itds
not sure what you mean
@orchid cairn I mean that the only thing I want the server for is to have a database of all online players and also to be able to call some functions on the client game like makeing a player join another player in a session
ah right, this is for the dark souls style thing?
yup
or generally for players to be able to interact without having to login to a dedicated server session etc
basically if the player agrees to let other players join their game, you'd open a session on that machine (basically making it a listen server) then use either a master server to track that, or some sort of matchmaking system. players who choose to join someone elses game can either pick from a list, or are joined randomly or based on ping. steam providers a master server that would work for this using the steam API
Hi, I'm having some issues with load stream level blueprint node, seems client crash every time I try to load level from server. The log is showing the same message for all levels I try to load, something related with RenderingThread.cpp. Know someone can it be?
@orchid cairn didn't know steam had this even, can it be done through the online subsystem or has to be through native steam api?
online subsystem does it all for you
grab advanced sessions plugin, makes it dead simple to do it all in BP
I'm trying to do it in code lol, thanks, I will take a look at the plugin code, helped me a lot already
just one stupid question, what exactly is the name of what I'm looking for lol?
code works, just make sure you're not reinventing the wheel... blueprints are awesome for this sort of work, especially if it's already been done for you 😃
Advanced Sessions Plugin
I don't ask for donations and this plugin is free for use with no strings attached, however due to repeated requests I am adding an (optional) donation link
PayPal Donation
Updated 11/20/2016
I have had several requests for supporting the authentication system for steam and wanted to be up front about it in here. The changes required are likely to be out of the scope of a plugin (or very backwards to implement through one) and I would rather people go
true, but I just like to understand how to make it myself when it comes ti networking lol
all good
hey, whats the best an easiest way to get a simple online multiplayer going for itch.io?
do I need dedicated server things?
@snow cliff for itch it helps, since you dont have an online subsystem such as steam to fall back onto
ok
or you could roll your own master server and host it somewhere, and allow clients to host listen servers
so only use the server for connecting the players, but let the games itself be handled p2p?
do you have experience with doing that @orchid cairn ? Is that a lot of work to do? and what would be a price on a suitable server?
There's a master server available on GitHub somewhere, and it's not that hard, but obviously more work than using a online subsystem and sessions
ok, thank you very much; I will look into that !
end of the day, it comes down to what sort of game/experience you're making, and how you want the player experience to go. you cant beat dedicated servers for that sort of thing, obviously with an added cost of hosting however
It's a party game, more or less casual. It is not intended as a competitive online multiplayer experience, especially not when the game is launched on itch.io
I think very few similiar games have dedicated servers#
And I have no money to afford dedicated servers anyway right now 😄
How large can servers get?
squad does 50v50 right?
https://forums.unrealengine.com/showthread.php?943-More-than-32-players-supported-in-UE4-Max-AI-supported tim sweeney himself tells in this thread that there is no hardcoded limit
What's the max number of players that can be supported in UE4? It's quite often the traditional "up to" 32 players, but are more possible or will it work against some of the designs of the system and become terribly slow or inefficient very quickly?
Related, if you were to do a lot of simple AI humanoids, like 50-100 simple AI pawns running around doing a few simple actions - any experience with these numbers of AI and if it'll be possible? Assuming the AI is as basic as it gets - will it
Sometimes that is the best way to figure it out.
It'll also vary depending on lag, computer processing speed, internet connection capabilities, etc.
Anyone, other than using Rama's tutorial, know how to receive messages over TCP through C++? I can send messages just fine, but I'm having a hard time getting it to receive messages.
Nope, but you could post your code. Maybe people know what you are doing wrong when they read it (:
@hollow bear
could be worth linking the Rama's tutorial then too so people don't have to google it
anyone know of any anti cheat software i can use for my project?
VAC just seems like the punishment is too severe
@signal sand there's https://github.com/BrUnOXaVIeRLeiTE/SCUE4-Plugin
never used it
Hi everyone! Do you know how I can possess the camera of a pawn when in DemoPlay mode? (instead of having a spectator camera)
@gaunt kestrel i'm pretty sure its max is 32767
although i wounldn't try actually allowing that many if i were you 😛
@glad wharf, DemoPlay mode ?
@rare cloud : yes, when you record a network replay
you can then replay it, but the camera you have by default is a Spectacor cam, but I would like to have a player POV
Oh hey thanks
@glad wharf, Oh ok, I made some research and controller seem to be create here:
https://github.com/EpicGames/UnrealEngine/blob/55c9f3ba0010e2e483d49a4cd378f36a46601fad/Engine/Source/Runtime/Engine/Private/DemoNetDriver.cpp#L2170
and there is a ReplaySpectatorPlayerControllerClass
Ok, thank you very much for the pointers!
so I would have to modify the engine or inherit from the DemoNetDriver
oh okay I see, and I can affect my Pawn to this PlayerController or make anything I want in it, great!
and you simply set the camera on the OnBeginPlay() function, with SetViewTarget() or SetViewTargetWithBlend()
Great, you save me a lot of time, thank you very much!
@glad wharf, No problem !
hey
what is the "EventsInterface"
in OnlineSubsytem
also
is it safe to remove playerstates
from the PlayerArray
of gamestate
or will that fuck shit up
also is there a way of getting the player controller from a playerstate
whats a realistic player limit for a fast arcade game where you need as little lag as possible
4?
depends how much data each player needs to replicate
and if you're using a dedicated server or not
Does anyone have any experience doing networking predictions for character movement and projectiles
I thought ue4 had that built in
It has built in prediction work, but I have a few reasons behind doing my own
For the character movement that is
@twin juniper i believe controller owns the state, so just get the owner
it's either the controller or character, pretty sure it's the controller
at least theres references in the API! look up "AGameSession" and you get nothing, so dumb lol
@drowsy zodiac It's all in the charactermovementcomponent - and it's pretty intense
@proven wraith ya I have been to intimidated to really look through it thoroughly, though I have looked at it. Was hoping for some verbal communication on the matter
how would you guys handle jetpack fuel inside custom flags based movement? basically I have a custom flag for 'is using jetpack'; I guess I'd want it to consume fuel only if it isn't replaying the move?
If the move is on just consume it when you get the right input
Which you can do on the server only, this way you code might be cleaner
If it is only done on server won't client and server desync?
Hi,
I'm having some issues with Unload Stream Level blueprint module.
Listen Server is crashing when try to unload some levels only if at least one client is connected. The clients don't crash. Those levels don't seem having nothing different. The Unload instruction can be in the level itself or in another level. Crash anyways. The next instruction after Unload is executed but only crash when Unload instruction is connected.
Anyone know something about that?
@fringe dove - you run the test on both client and server, for the actual variable, you just set it server side, and replicate it across, or if you're using the character class, look into adding it as a custom movement into the CMC
Good evening! So how does one deal with region lock on connections via Steam?
And that evening is meant to all of you, wherever you are. Evenings are the best.
My current test with Mr.Aussie has him connecting for a couple seconds, but then disconnected. This has been tested all over US, so seems to be region based
@twin juniper - are you using 480 gameID? that one is region locked to prevent abuse
afaik, once you go through greenlight and are approved, you wont run into that issue
case in point, rocket league i know i can connect to servers hosted anywhere in custom games
fellow aussie here too btw 😃
Rocket League doesn't use Steam Server or?
What I heard is that Presence base listen servers are region locked and depend on friendlist etc
Dedicated servers don't use that so they should be fine?
@thin stratus nope, friendlist doesn't matter even, tried to join a listen server with someone from another country but we couldn't find the session
maybe because of the 480 app id, maybe something general, dunno.
Looking at Dead by Daylight and other UE4 Games, such as ARK, the problem is pretty consistent
That's why I'm pretty sure Rocket League uses their own Server System
yup, most likely
they kinda havo to to sync up all the data from the different platforms, I think.
Also that they have you in a lobby before you search
Quick newb question to all your fine folks.
If I wanted to do a Vive Multiplayer LAN game, I should be able to just set OnlineSubsystem to NULL in the config file OR is that the default to OnlineSubsystem if I don't put all the SteamOSS stuff in the config file?
Also, if I don't want to use a plugin to replicate motion controllers, then I need to replicate the movements manually on tick? Is that correct? (In BP or C++)
you need to set it to null
i believe in your build you need to even add the onlinesubsystemnull dependancies
second question...no idea 😃
😃
is there a list of supported online subsystems somewhere, and preferably also with what features each actually supports?
well
in 4.14 and 4.13 if I remember, you can see the plugins
that'll tell you which one are supported
facebook, null and steam are the only ones i know of
google play is one also
i can see the list in plugins, any idea how to tell what each supports? or just trial and error? (documentation has always seemed to be a weak point for epic)
i doubt it
documentation does indeed suck
especially when it comes to online subsystems heh
worst case scenario you can dig up the source code too
had to do that quite a bit recently
So I'm trying to make an online multiplayer fps type game, and I have most of the mechanics in place and they all work locally, but I have no idea what im doing when it comes to writing the game mode and checking for server verification on hits and stuff like that. Does anyone have any good places for me to start? Ive googled a shit ton and the instructions seem kinda iffy. I managed to get my railgun particle effect to replicate which is awesome, but I'm not sure at all what im doing lol
check out generic shooter in the marketplace? has everything you're after, 100% BP based
do you understand how roles work and how authority works etc?
honestly? not really. I read some stuff in the ue4 networking documentation
would probably start with reading up on that, some of the doucmentation is decent for that
check out the networking guide by exi too... that thing is a bible for replication and online
awesome, thanks a bunch guys
really appreciate it
been pulling my hair out the past week lol
Awesome
your listen server or dedicated server, more or less acts as the authority in any case
*most cases 😉
sorry, yeah, if the actor is spawned on the client then the client is the authority
depending on what type of game you're making, you need to code RPC's which will call the server from the client
So Ill read about this stuff in this compendium im guessing but say im spawning a rocket that a player shoots. I want to spawn that on the server?
yes
that would probably explain why it replicates when player 1 shoots but not when player 2 shoots
if player 1 is acting as a listen server, yes
generally writing code for a listen server and dedicated service is quite similar
because even for the player who is the listen server, you can use a server RPC call for spawning a projectile
ohhhhhhh
okay
yeah i used an RPC for my particle for my railgun
and that works great
i think the way shootergame works is it actually replicates a boolean "IsFiring" then when the server see's thats set to true, determines if they can fire again
so i had a question about shootergame
because i found that example the other night
is there actually code for shootergame anywhere?
Or is it just the explanation of how parts would work
it was all there before, but, i don't know if they keep it up to date any more because it was a lot of work
gotcha lol
if you go back to like 4.12 or something, the source is definitely there
and it's not that much different
oh, no, it's still there
all the source should be available
am i blind? lol
if you created a project with it, you probably have to generate the solution by right clicking on the uproject and "Generate project files" or something like that
https://docs.unrealengine.com/latest/INT/Resources/SampleGames/ShooterGame/ this is the only place i see shootergame at all lol. should there be something when i go to new project?
Documentation for the C++ example game project ShooterGame
in the epic games launcher, learn tab, at the bottom you can download it
welcome 😄
i should have come on discord way earlier haha. oh well, at least i learned through my struggles. this is a process 😂
the learning curve of UE4 is steep, there's no doubt
probably the biggest drawback of the engine imo
But every time i learn something new my mind is blown at how awesome it is lol
like most things in programming, it all has a ryhme and reason
Yeah I had to do a quick VR project at work and I wanted to use UE4 i just didnt know it enough so it was easier to do it in unity without knowing anything about the engine
i've only briefly used unity, doesn't seem as powerful but seems much easier to learn
found it odd there's no visual editor for shaders
its definitely way eaiser to learn, but i dont think it's as powerful. And it doesnt have blueprints.
Yeah i had to write all my shaders i used
luckily they were simple, but still
i believe UE4 was built with networking in mind from the ground up as well
so for me it was a no brainer when making a MP game to use UE4 hehe
if you haven't read it before, i suggest taking a look at this page btw https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Blueprints/index.html
The various aspects of multiplayer applied to Blueprints.
@polar bridge I'd love to see people making physics based MP games with this MP ready engine 😃
i'm not sure i understand? 😃
i'm certain there's MP physics based games been made in UE4, if that's what you mean
I mean that ue4 doesn't really implement MP properly for any fast paced game other than ones that use characters
like what?
no engine will support some crazy niche that requires tons of replication, no
honestly i was told UE4 wouldn't work with my project too, seems to be doing fine so far heh
yeah, we could debate on this but it's pointless
in the end, ue4 replication does work for most things as long as you don't need prediction and if you do, it's there only for characters
yep, pretty much why i don't use replication 😄
i'm doing a game with slow moving bullets and started with replicating them, had to move to RPCs that mimic what it should look like because replication just couldn't keep up
but, i think if the networking is used properly, you can push it quite far. replication, no. it's just...too much for the network
@fierce birch ... ask me that question again after we announce our title for greenlight 😉
@orchid cairn heh, I didn't say you couldn't do that
just saying engine doesn't do that itself
yeah it would be awesome if it did, but oh well
character class is a great learning tool for the right way to do it
yeah, I'm in the middle of doing my own system as well, I don't really like the CMC though
it's 10k lines of c++, in a single file 😄
lol yeah, that part kinda blows
it's a text book example how you shouldn't write c++
you've seen gaffer on games obv?
yeah, it's a really good site
he used to have a heap more examples, i think he's taken them down now that it's a business for him
yeah, I've got the additional examples too by supporting his patreon for one month
I didn't mind though, was happy to give the man some support for what he's doing
for sure
besides gaffer on games, this has been nice small tutorial too http://www.gabrielgambetta.com/fast_paced_multiplayer.html
Rocket League networking works like that too
(talking about the last page sample, not how you figure out headshots)
rocket league is really good, they actually go back into PhysX and rewind whenever there's a discrepancy, so it's ridiculously accurate
they don't use physx
they swapped into bullet
I plan to do rewind and resim selectively for only things that have collided myself
but I have custom physics movement on my project that's not relying on physx sim at all so it should be pretty easy to do when I get to the multiplayer part
all the core parts are there
(that allow it)
i'm pretty sure OmaManfred on the forums works on rocket league... every time i look up anything physics and vehicle related he's all over it 😃
I've talked with the guy on IRC
not sure if he's here
I don't fully agree on his replication logic but if it works for him, I guess it's cool 😄
curious what you're working on that requires that level of replication?
a racing game
fast paced physics based game
I have completely custom physics
you haven't tested with latency yet?
and by that I mean, no physics engine for anything but collisions (I do similar thing that CMC does actually)
interesting
well, I'm not at multiplayer stage yet, but latency shouldn't be an issue with that server reconciliation + clientside prediction
that's what that stuff is for
I expect player vs player collisions to be the biggest issue but will see how it turns out when I get there
there are plenty of things one can try to make it feel good
other thing that will definitely require some trial and error is the starting grid
like how you get all cars moving at the very same time
it's an issue with many racing games, but some actually get it solved nicely
you can "cheat" it a bit... you have players revving the engine before you start, so you just use that when the server ticks over to start the race. it means on your authority everyone starts moving the same time, even if there's lag
yeah, I've thought about that
then over the next few ticks you'll replicate and sort it out
that you'd use the throttle prior to greenlight to make the cars move
or if there's no throttle, car would sit still
one racing game "nudged" the cars forward at green always, but that felt wrong if you didn't press the throttle
basically it automatically applied throttle to all cars on greenlight and then transitioned into players values
yeah that seems a weird way to do it
I guess one option would be to sync the players based on their ping and do non predicted sim on start, so it would only do things that server gives back, since cars are not moving fast at that stage, player might not notice the delay at that stage
and then get the predicition going after few hundred ms
also comes down to whats more important for your game, the "feel" for the player, or accuracy/fairness
you could also do some funky math with sending the time to race start to the client, then calculate based off ping the "real" start time and go from there
it's not a kinda game where seconds matter on finishing the races, so only thing that matters at starting grid is that everyone just moves forward when lights go green
yeah, that's kinda what I meant by syncing players by their ping, by offsetting clients own the race start time by it
just keep in mind even if you go that way, you'd probably want to resync with the server fairly quickly, especially as everything would be bunched up so collisions are a high possibility
yeah
it should only happen at the first second of the race
probably a lot shorter period
would be curious to know how different commercial games do that though (where it actually works properly)
when it comes to racing games (or any other more niche genre), the knownledge isn't that openly shared
so you're not using physx at all? just your own physics code?
I use physx for sweeps and traces (basically collision detection)
same deal as what CMC does basically
I run my own physics integration at fixed time steps
then handling the actual collision yourself?
yes
I've been converting things to double precision lately
which would have been way easier if ue4 actually supported doubles 😄
lol
there's some things on FMath that are templated
but most things are not
and I need to use my own versions for tranform, vectors, quats etc as they are all float based on ue4
in hindsight, I probably should have stuck with floats but it's just too tempting to get the additional precision when it's possible
physx and ue4 visuals are is still single precision so collsions and raycasts would still be limited to that but actual sim itself would get double precision
I kinda want to stick with physx for that though as it's so deeply integrated that it's just more convenient to use it vs bring in another physics engine and sync things to it manually (and there's literally no point in me doing the collision engine myself)
when you get to the multiplayer stage of it, let me know, will be interesting to see your aproach 😃
I plan to do the same approach as gambretta site described, it should work really well in theory for this kind of game
but yeah, I'll probably post more here later on 😃
dang you guys are crazy. here i am trying to get a basic server set up and youre here talking about custom predictions and stuff. one day lol
Haha
😭
you making a VR game?
You will get there 😛
I know I know
I just need to get started
😃
@obtuse zinc I have made VR games
But yes, this will be my first multiplayer VR game
dang thats awesome
@fierce birch you can very much use the same prediction that characters have with pawns. You just have to write your own movement component. If you follow epic's example with the character it's not too difficult to make your own.
@stiff wasp I can but I don't want to
epic thing works with variable time steps and has been designed to work always like that
@orchid cairn Late answer, I actually got 13h/sleep wooh. No I am not using 480, I have a released game. Hmmm according to @thin stratus's conversation afterwards I'm guessing this is how it is... because I've had terrible latency without being disconnected, and it was at the exact same moment every time (and my friend also pointed out that he had the exact same experience with Onward, connect, enter game, then disconnect)
Onward uses Unity, right? So you might want to look at the Steam side of it more than UE4
Can anyone help me with disconnecting from the client-side in blueprints?
All good got it working
I'm having a lot of weird behaviors when testing in the editor with two players on 4.14.1
for example here the server breaks for some reason and never shows a widget
however if I made it a dedicated server with 2 clients everything works perfectly
is it a known bug?
I don't think the code is fucking up at any point
a lot of stuff are actually working only with a dedicated server only, like when I do a sphere trace and I know that It doesn't hit, the damage gets done to the server regrdless of the distance and vise versa
@brittle sinew Yes it does, and I do believe that it's steam related. Was hoping someone here had experience using both
@red ledge That widget is being made on both server and client, put a "Is locally controlled"-check before it
@twin juniper Yeah forgot that. added the check but it still doesn't affect the problem where the widget doesn't appear on the server, don't know why.
solved the affecting over a distance tho, it was just a UI problem
@red ledge what do you mean widget on server? do you mean the host? or are you trying to replicate it to all clients?
nope, it's just a widget that shows health, the problem is that it doesn't appear on the host for some reason
Not sure, why don't you rig it with strings server/client and hos side to see which events are firing where and when
did that, appearntly it was a problem with some sort of a lag or code speed
some other widget code that should have been called before this on the player controller made the widget on the server fuck up dunno why
thanks tho
I just wanted to report back on the topic of steam region lock. I tried between US and Europe and everything worked the way it's supposed to. And since the Australian could connect but got disconnected, I think it's just the shitty copper wires and the distance that caused the disconnections because of too many lost packets
@twin juniper SO, you still have region lock on steam right?
There's the region lock for buying games in another region, but I had no issues to connect to someone on another continent if their connection is decent
And I didn't have to contact valve to change it (which I read on some forums)
However! I think appID 480 is different
And that one is locked
But using my own I didn't have any issues (atleast US-Europe)
Hello guys, just a little question, someone already follow the big tutoriel made by Unreal engine about networking ? Just want to ask some question before start the tutorial
@heavy mantle The one made by Wes? W lobby and menus?
@twin juniper do you happen to be using dedicated servers? I could use a hint or two debugging mine
Use the add controller input nodes
And make sure your character BP is set to replicate
You can do that in the details panel by clicking on your root component
I got it , thx to eXi
Hello, did anyone convert this to latest version of unreal?
https://forums.unrealengine.com/showthread.php?94421-FREE-VaRest-Login-System-With-PHP-and-MySQL
Greetings Community,
7014470145
I've created an very basic login system with PHP - MySQL - VaRest / UE4.
I share this with you because I didn't see anything for such system in the web and because of that I want to support the community.
What you need is :
- Webserver with PHP
- MySQL Server
- UE4.9
- Visual Studio 2013 ( if editor needs to recompile plugin )
is there any reason why adding a replicated component should cause the client to crash? or does that sound like a bug?
@fleet sluice I do not, I'm relatively new to networking so I'm taking it one step at a time
@lapis forum What type of component is it?
any component
@lapis forum Well, if the actor itself is replicated then setting a component to be replicated should not be necessary
in most cases, yes
my intention for replicating the component is to use replicated variables on a custom component
if I don't replicate the component, even if I replicate the actor none of the variables are replicated as the client has their own version of the component
at least that's how I understand, I could easily be wrong
@lapis forum I tried to use Child Actor Components where the actor of the child actor was replicated, and I could just not get it to work. There might be a similar issue with custom components
In that scenario, setting the child actor component to be a "replicated component" didn't change anything
So I just spawned the actor on the server and attached it go get around the problem
it's not just custom components, even adding a box collision component and setting it to replicate crashes the client 😦
I suspect I'll have to do something similar with spawning an actor, although it's considerably more hassle in the context of what I'm trying to do
What would cause players to lose controls in a packaged MP game?
As in no one, not even host could use their controls. But editor works fine.
Works just fine in editor, but no go on packaged.
Is that an arrow I see there?
I remember someone had the issue where arrows don't get packaged, so when their movement depended on one, it wouldn't work
Ah, ok
it's just weird that it works in editor but not in packaged, there are no errors or warning in log
Are you getting input events to fire at all and it's the PC exchange that's not working? Or do they not get sent
Are you sure the Players actually connect in the standalone?
Yeah
everyone was connected to the game
I feel like this may not be a replication issue, but posted here just in case it could have been
Could be some sneaky 4.14.3 bug
Hi, would someone know why when i uncheck "use single process" ( to use seamless travel PIE ), i can't connect to my local listen server anymore ? 🤔
( seamless travel isn't checked, i just uncheck the "use single process" box and it doesn't work anymore)
i have a player scoreboard and when the play quits, i want to remove their name from the scoreboard. i've tried making replicated calls in the PlayerState when they quit, but i'm guessing it's gone by the time it tried to do the RPC. where would be a good place for this code?
oddly enough if i check the player state it actually shows up as a valid state even after the player leaves, which confuses me on why the RPC doesn't work heh
@supple musk Your game is not a multiplayer programmed game?
@cyan light Don't know what you mean by that, but I use "open MapName?listen" in the first client, and i get others to join with "open 127.0.0.1". Works with Use Single Process. Does not when Use Single Process is unchecked.
well, unchecked single process means server and client
what do you mean
listen server means a process that has both the server and the client
unchecked single process means
ue4editor game.uproject -server
ue4editor game.project -game
both ran at the same time
is it possible to have a UFUNCTION that uses validation, while also at the same time being an overloaded function?
yes
@polar bridge If I remember correctly, there's a TornOff function or something when an actor stops being replicated
will give that a shot when i get home, thank you!
OK
Anybody know, if it's possible to host and join multiple Game Sessions at a time?
Basically: https://forums.unrealengine.com/showthread.php?134184-Multiple-Online-Sessions&p=652030#post652030
I'm trying to build a party system for my game, which is being built for Steam. Essentially I want players to be able to party up together as early as the main menu.
I'm trying to do a system similar to Gears of War 3 (or judgement, or 4) - where players can group up in the menus then search for games as a group. Steam doesn't have any kind of Online Party Interface - so all I can think of at the moment is to host a 'party session' that players can join. Not yet sure how I'll be able to
@thin stratus may already know this..
Well I would assume Rocket league does what you want
That is a good point..
I guess they join a Session and then search an external master Server for actual games
Probably possible to use the Steams Master Server for it
So you join friends with the Friend Invite stuff
And then the Host searches and ones you found a session you tell all clients to travel to that new server including you
Yeah that part seems simple enough... I guess I'll just have to give this a go
You just have two destinguish between friendlobby session and actual game session
maybe :p
The Session Nodes have 0 stuff that helps you there
Neither can you tell clients to join a session via bps
Although there is that advanced session plugin which is pretty sweet
been having a glance at it today
Saw it. It does what it needs
but hacky af
Mostly having custom Structs and then having a C++ function that converts everything by hand
to the C++ version
@chrome bay my way of doing it was subsystem as the inital party host (allows voice coms and everything nice) then sending all the party members to a server by giving them all a console command to enter (open 74.24.214.29 as an eg)
Its lame and doesnt allow for nice features but it works
Yah the tough part is going to be segregating players into groups... like I don't think I can have a player be a server of one session and the client of another :/
Once you open a connection it should close any preexisting connections