#multiplayer
1 messages · Page 396 of 1
The client and server will be so close it won’t matter
For bouncing grenades
From the listen server you simply multicast on switch authority with replicated actor
From the client you branch from remote and call the event from rep to server
There is another way to handle though it takes a little more work
But the results are more responsive for the clients
I think I'm gonna try the approach of replicating the event, and using OnBounce on the server-side projectile to update state for the client side ones
basically replicating state only when things change in a drastic way
Alternative: create a rep-notify variable bool called fired bouncing grenade. Perform the spawn in the rep notify function and on rep notify options choose all but calling client. Call a local fire event that does the same logic as the function and switch authority rep event at the end and var to true. In the function have the switch authority on the end set the var back to false. @dark edge
got this weird bug :/
oh nvm
me being stupid
i think anyway, just gonna try it before i post the problem
nope didn't fix it
@dark edge that will work but you will see strange jiggle after bouncing and warping under stress with that method. Leaving the work to the server for all but calling client is usually best because the server will be closest to understanding the client call. If the other clients interjected their own location data into the mix they can be really off at times.
A bouncer is always best to be server replicated actors
Or a very small rep notify variable that can get out to all clients very very quickly
The damage call will still be authorized by where the server thinks the grenade should be.
You may be able to multicast an event that fires then destroys on bounce but passes the velocity and direction into a server spawned replicated projectile
I would prefer everything to be a server replicated actor except I'm not sure how to handle the calling client latency.
If there was a "Relevant to all but owner" setting I think I'd be all set.
On second thought I think the last idea would be the best one
Call a local fire event not replicated
But then when the server spawns a replicated projectile you get 2 on the calling client's end
the local and the one from the server
Rep to server multicast that out for all but locally controlled
On locally controlled and on multicast hide on bounce but spawn on authority the replicated actor
Everyone should only see the replicated actor after bounce
You won’t get 2 on calling client
The starter projectile isn’t replicating
It’s the client dummy
And the multicast client dummy
On bounce authority destroys that dummy and spawns the replicating actor passing in the velocity and direction
Server takes over from there
Clients shouldn’t see it flicker if you do it .5 delay after the bounce
It will be like a single little jitter
Vs unpredictable grenades lol
@dark edge
Ok I just read up on the most accurate application possible for what your trying to do. It should work without issues. First spawn the projectile locally and rep server and multicast that calls the local spawn for all but owner. Replicate a transform, location and velocity variable and get that on bounce switch authority and set. Do not replicate the actor.
@dark edge
In the example it says you can rep notify these variables as well and simply have the function call set them on clients
They may warp on first bounce but all other bounces will be in sync
I will admit. It seems bouncing projectiles are a little more painful to sync
Working on setting up a dedicated server for this game and no matter what I do I can't seem to figure out how to solve this...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(
1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve
this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the fra
mework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global As
sembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targ
eted for the framework you intend. [D:\UE4 Source\UnrealEngine-4.19\Engine\Source\Programs\UnrealBuildTool\UnrealBuildT
ool.csproj]
GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.```
This error appears whenever I run `GenerateProjectFiles.bat -2017`.
I've installed .NET Framework 4.5.2 Developer pack, Windows 10 SDK, .NET Framework 4.5.2... I just can't seem to understand what this error is trying to tell me.
Try updating Windows if you havent already
If you have another version of VS installed (something older than 2017) it maybe causing an conflict.
Uninstall previous versions
Windows is up to date. No other VS versions installed. Gonna try reinstalling.
This wouldn't mess with anything, would it?
Alright so reinstalling helped. Now it's asking for SDK v8.1 but the only one I can find is SDK for windows 8.1 or above which I feel like isn't what I need.
Okay that is what I wanted. Got it figured out. Why they would make the version number sound like it belonged to windows 8, I have no clue
I try to teleport a actor when the bool: iscriminal? is true
But in my case it looks like it grabs the bool from the server player and not the player its overlapping with, can someone help me?
When the client is police and the server criminal it works fine.
hey @viral raft already fixed or still need help? if so, what are you running, my guess would be listen server.
well if you haven't checked "run dedicated server" and only changed the number of players to two then you are running a listen server
@Mr. Proper#0273 Hey man the overlaps and hit events are hell. They will fire on the listen server no matter what.
@viral raft you need to rep the overlap to the server from the switch remote if you want it to come from the client and create an input to pass the other actor pin into
Ah okay
I will try. Am new to replication :D
@loud mountain I havent checked dedicated when testing
nah its fine
Oh okay
The server can authorize the overlap too but you still need a reference to the other actor. Switch authority pull the pin from other actor and print to see if it references who you need
If you need some useful learning ressource I'll point you to this: (in case you have not yet found it ^^) http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf
I’ll jump on in a minute and give you an example but honestly this is pretty easy to test. The server and client movement replicated actors can be a little different as far as location so I usually let the server authority all overlaps and ignore the remote branch
So immediately after the overlap events switch has authority-> on authority branch print string-> pull pin from other actor
See if that gets you the actor your needing
@viral raft
Whats pull pin?
Even if it’s two clients overlapping each other the listen server will fire the event also passing in the client actor
Oh from the overlap event there is a other pin
For networking you have to think about your game logic from the perspective of authority and remote
Switch has authority needs to be called and all hits and overlaps logic need to be ran on authority
Clients can’t handle it cause they can’t talk to each other. The server detects their events then send it out to everyone
Even if you tell a client to spawn something it won’t be seen by anyone but the client spawning it
Yea instances of loot per client is kinda popular
Only problem is once obtained you need to rep to server as owner with rpc
Then multicast to other clients so gamestate is consistent
Huh whut?
So say you have client instances of loot spawning
other people don't necessary need to know what I have in my inventory 😉
Your client has an inventory of that stuff
The server will need to know if that object can affect the gamestate
Meaning if it can shoot or modify others health
Oh
At the point of equip or use
I dont have weapons etc
I was thinking more like a diablo style inventory where I'll just pick it up
and have it in my Inventory
but that's just me imagining then ^^
If it’s gear the other players need to see it
Only if I'll equip it tho
So once used or equipped you rpc as owner to server
@severe nymph Am at the part So immediately after the overlap events switch has authority-> on authority branch print string-> pull pin from other actor See if that gets you the actor your needing
Then multicast that local equip or use logic
The server will be aware and if that actor is replicated so will other clients
How are you setting who the criminals are
So clients pick
then make sure your RPC is set to Execute on Server and Reliable
somewhat like this
Ok 👍🏼 so when the client sets them the server should know as long as authority is used
Yup that’s good
The clients own themselves so that will fire
always remember that replication only works from server to client but not vice versa
so If your other client wants to know about which team he is in you need to set the variable on the server
Yea he needs an event to call that rep event on remote
because of the "replication" flag of the variable it is then automatically being broadcasted to the other clients
So when they click the button switch has authority on remote branch call the rep server event that sets it
Ah okay
please do never use switch has authority in a blueprint widget
So when i set my team to criminal i need to replicate it to the server?
Okay
If it’s a hit or overlap the server will fire it and you can just use authority and set it
Wait a moment
If it’s a client event that the server isn’t aware of then u need to call a rep event to set
Ah okay thx
I am playing my game will test it withing 5 mins
@severe nymph Okay i did what Markus send 😃
Lets see
Looks like it works now :0
WOW Thxx @severe nymph and @loud mountain
❤
you're welcome
It works like a charm :0
@sweet sphinx Hey Tim 😃
@loud mountain @severe nymph Packiging a test right now 😃 You are invite to test it 😉
Nah then its not ready 😄
I dont have that fast pc and internet
Should be done in 30 mins i hope
uploading takes long...
I will post the link here ^^
So other people in here can take a look too
Im on ma way home then I’ll join 😃
yeey 😃
@viral raft I’m currently knee deep in my VR game or I would
I’ll dm u guys my discord
Working on weapons replication right now
I got keys too if u guys have hmds
Oculus and rift support is in
@viral raft Hey there
i am replicating a bool bInUltimate, but the animation is not playing in the animgraph
am i missing something stupidly obvious?
nvm think i got it
forgot i need to pass it to the server to be set, duh! 😄
@sweet sphinx Just released a test version :)
I mailed you about my low poly cops and robbers game ;)
So why do I need to recompile the entire engine in order to make a dedicated server of my project?
you need to compile a dedicated server version in VS studio like this. there will be a separate dedicated server binary you will run on the host machine that has the dedicated server binary up and running, and from any other pc you can use the other pc as client to connect to your server. you do not need to recompile the game engine for dedicated server builds - you'll only need to go into your game project sln and work from there.
https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)
So this guide here which is making me do a bunch of extra stuff probably shouldn't be trusted?
i used that guide when i first tried to make a dedicated server for my game - it includes extra steps about how to have the dedicated servers in blueprints working without using too much cpp code. you can try it. it actually worked for me in the end, but there was some lag for my client pc so i switched back to listen servers for my game.
I've honestly been getting nothing but errors following that guide.
did you get the game working properly in a listen server build first using create / join session?
I couldn't even package my project.
i mean before trying dedicated
How do you mean?
about the .lib error, here's a site i found for you on that: https://answers.unrealengine.com/questions/790824/wafmedia-dont-let-me-to-package-my-game.html
refresh
I did flag -2017 though.
anyway, what i did for my game was use the unreal multiplayer tutorial series to get multiplayer working for listen servers using create join session
dedicated is more advanced and you shouldn't try that until you have listen servers working first imo
think i found a fix for it actually
Oh?
look at this thread too https://answers.unrealengine.com/questions/400620/video-file-extensions-not-recognized.html - might need to check "media players" "media player editor" and finally check to see if windows media player latest version downloaded to your windows pc. hope this helps. again try to use the listen servers and then move to dedicated after you have basic functionality. if you search you tube for "unreal multiplayer", the first result is unreal engine tutorial on it i used that's very useful. so please use that. hope that helps out.
My worry with following the peer-to-peer tutorial is that transitioning from that to dedicated is going to be super difficult.
Like I would basically have to start over, is my worry.
Thanks for your help, though. ^.^
not so
listen servers just use create and join session nodes, and you use open level with the ip address of the dedicated server machine instead of join session for dedicated server clients, like in the dedicated server guide example you sent me. hope you figure it out.
Thanks. I'll work on a p2p thing for now, then.
Anyone got a slick way to override a local actor with the server-replicated one when it arrives?
Does anyone know how to fix this issue?
Is it bad to multicast with movement if i'm using addmovementinput and the default character movement component
@thin stratus have you checked out spatialOS for ue? if so could you tell me why this isnt becoming huge?
@versed rock the server sees it as still simulating physics
i would have the server stop all movement when it switches turns to just verify. and also mc for visuals
i assume
i havent played with physics
if im testing dedicated with 2 clients and i have Client2 print something... but it says Client2 printed it on both windows, does that mean its replicating or is it just a general thing
@sharp spire SpatialOS uses it's own networking layer, when you make a game that runs on SpatialOS you're at their mercy - they could sell their service or start charging high prices. Also it's pretty unintuitive to use. Finally most games simply don't need it
All those things add up to it not being popular
@sweet sphinx Ah no problem, i thaught there was something like a presentation where you were going to show off some games 😃
I thaught thats perfect to let people know my game is here
@Pierce#8582 I assume cause by far not everyone needs this
And the pricing is maybe not that friendly
And what Vaei said. Haven't seen their response until now
When my Weapon is owned by my Pawn. Is it owned by the PlayerController, too? I.e. Can i call RPCs etc?
Hi all. i'm started to make a game based Gamesparks multiplayer.Have any tutorial about it?
GameSparks plugin already enabled in my project
GameSparks has lots of information and i think it comes with a sample project
@modern dome Yes
@crimson lily GameSparks has Documentation on their website. Please refer to that.
Hi guys...I have Problem to find Host with Steam or NormalNull. Before it was work Probably just like the usual but something wrong hapen to my PC i think but I don't know what going on ?and I really need to fix this Problem pls 😦
Hello everyone!
I am looking through the ShooterGame sample project for learning about multiplayer.
I know it is pretty standard practice to do the hitscan calculations on the client, so when the client shoots someone on their screen, it registers as a hit. The server may validate this hit, but basically the client tells the server what it hit.
In the ShooterGame example this seems to be the case. If I turn my ping very high on client #1 (eg. 3000 milliseconds), and shoot client #2 who is standing still, even if i switch screens and make client #2 run away before client #1 actually shoots it still hurts client #2. I can make a video to show this if it didn't make sense.
Basically high ping players can shoot other people and do damage even if the other play has run away on their screen. Not only does this favor high-ping players, but also I feel like letting the client tell the server if it hit would open the door to cheaters.
What is the best way to solve this issue?
My current idea is this: when the client fires his weapon, it sends the server a start and end point for the hitscan, but the server actually does the hitscan trace. This would mean better ping = more responsive shooting, and the server determines if you hit. The problem with this is that its possible to look like you shot someone but really you missed.
Any ideas would be much appreciated, thanks!
PS. If I am not understanding how the ShooterGame is coded, or if this issues is editor specific, then please elaborate, I'm always looking to learn! 😃
the Problem you
're facing is that you have a ping of 3 seconds (simulated) which is nothing one should play at
in the time you sent the "hey go forward event" eventually 3 seconds have passed until you move (on server)
its always a tradeoff
battlefield for example uses a client authoritative(is it spelled that way?) system
which basically means your first system
but in reality you should just kick players with a ping higher than 500 - 700msecs (if not further)
just ruines the experience for all players - they should play on available servers near their region where they're ping is approx < 100
Thank you for the reply! Obviously 3 seconds of ping is ridiculous for gameplay, but setting it that high simply makes it easy for me to test.
Awesome fact about Battlefield! This system seems like it makes a good trade-off: client authoritative shooting, but kick high ping players. I like that! Any advice or ideas about addressing potential cheaters?
Would it not be possible for someone to tell the server they successfully hit someone across the map or through walls?
Now what about this system I've seen where when a client fires the server goes back in time a bit and checks the position of all players to see if there was a hit?
Any examples of that system I could dive into? If not, what is the best validation method?
AFAIK (but don't quote me on that) In Battlefield they use validations on this stuff (taking lag into account) the server checks if you could have hit, and if you could have done X damage. I don't know their maths
pulling back the game X seconds (basically recording all players and moving objects) to check for lets say 70 hits every frame by 20 players or so could be kinda burning the CPU but thats just what I am thinking ^^
Yeah that is a good point, I would rather something like Valve does with counter-strike
The hitbox just trails the player the same amount as their ping, so it lines up with what other players see as the actual position, just not sure how I would implement this
@full scaffold counter strike does client side hit detection
but when the player hits, the server gets "hey, player 3 shot player 2 from coords X-Y-Z
the server then rewinds player 2 by the ping of player 3, and compares hitboxes to see if he did, in fact, shoot him
how would you rewind to get the value?
by storing moves that player making
and playing them back
or just by looking at saved data. It's depends on actual implementation of you multiplayer system
so store the previous so many movements in the playerstate
and use that as a refrence, ie some sort of struct
actualy UCharacterMovementComponent is doing this for character movement already. Take a look at SavedMoves array and where it's used
Funny you ask, I just wrote a server auth lag compensation system that is just like CS:GO's system
I used the game mode to keep a history of records for each player with a timestamp, then when the player thinks they hit another player, the gamemode looks into the logs and finds the timestamp that matches the player's current timestamp + the RTT, then rolls back the hit player to that timestamp and reruns the hit logic
Could the replay system be modified to provide this logic?
You can do everything you want with open source code that unreal provides, but I dont feel that this will be the easy way. Basically, ue replay system works throught fake client that recording network traffic
What is the best technique which will do same like root motion in single player. (in multiplayer root motion does not work properly unfortunately) ?
is there a way to send an RPC only to the demo driver without creating a separate actor that is only relevant to it? (I'd like it to go over the same actor channel as some other stuff that is being reliably multicast to all clients, to keep it in order)
if i set a collisionbox on an actor to Inactive, will that automatically get replicated?
ShieldParticleComp = UGameplayStatics::SpawnEmitterAttached(GunShieldFX, GetMesh(), FName(TEXT("Shield")));
ShieldParticleComp->SetIsReplicated(true);
doesn't replicate?
do i really need to do a server call even if it is a component?
Replication only has to be set on server if that's what you mean
Because only the server replicates
i thought if i set the ShieldParticleComp to replicated it wold automatically replicate, but then again i am setting the replicated on the client
Yeah, your client shouldn't be notifying the server either, that's how you get hackers
so what would you suggest?
well at some point you want to notify your server that you want to use the shield
yeah, so they press X it runs OnGunShield, which checks to see if gunshield is already active or not, if it is not active calls AddShield
i mean the shield works but doesn't work if i am the server
you're running listen server?
well then you need to check if its local too
because you're running on server with Role_Authority
and your if is not going through
theres a function for that in pawn and controller I believe
IsLocallyControlled() on pawn
and IsLocalController() on Controller
I don't know about components etc tho
@grand kestrel you said let the server add the shield, can you explain, i am a bit lost, i was just going to multicast the particle effect but i need to destroy it after a set time which is what the timer is for
Is there a way to do ServerTravel without having to take all the clients with you? Like say player 1 wants to go to place B. Player 2 wants to stay in place A. How do I make it so that player 1 gets to go to place B without dragging player 2 along? (Dedicated server.)
Is that the same as servertravel where I need to call it from the console?
what do you mean with call from the console?
you can call that from anywhere, gamemode, triggerbox etc
From what I've been reading you have to use ServerTravel as Execute Console Command. I'm asking if it's the same for ClientTravel.
You dont have to use ServerTravel from console. I for example use it from my lobbyGamemode etc.
Well right now I'm trying to get it so if you walk through a doorway, you get into another level. I'm talking about BP something like this...
Since I can't find a ClientTravel BP.
Might be that this isnt exposed to blueprint idk
But you should be able to call clienttravel in the console too, if that works for servertravel
does unreal do bandwidth estimation and is it possible to query? everything seems to be based on hardcoded limits?
well yea, most of the replication is automated
if you try to replicate more than limit allows, it sorts out the important ones first
holy crap guys
Steam Authentication has been added! Games can now add a packet handler component that interfaces with the Steam authentication APIs, allowing them to advertise their servers properly, handle VAC/publisher bans, and provide better validation of c...
Networking
wowowowow
it only took them 3 years
to support the very basic functionality of steam online subsystem
they implemented it with a unique packet and packet handler
fascinating
UReplicationDriver is a base class that can be used for implementing custom server replication logic. That is, determining which actors replicate to which client connections, as well as how RPCs are routed. See ReplicationDriver.h for more inform...
Networking
😮
holy crap
fortnite coming in and saving the day yo
this is sick
i think I can finally implement distance based replication rates with this system
or like
instancing regions
man, this is cool
Okay so I have my "Multiplayer Screen" done ish, and wondering if there is documentation on how to setup server join through steam if possible
@heady merlin ^ lots of nice new multiplayer features
they finally added auth? not sure whether to rejoice or be depressed
that took forever
@heady merlin hah yeah.. the replication graph stuff looks nice though
@gleaming vector Holy shit it just keeps getting better lol
did anyone look over my pastebin code?
This page is no longer available. It has either expired, been removed by its creator, or removed by one of the Pastebin staff.
:p
Alright, but when you're dumping 90 lines of code you're going to have to be a bit more specific than "is that the best way to handle that?"
There are plenty of thats in this code.
well like is multicast the best way to handle the shield effect?
or is there a better more efficient way
I might consider doing it via a replicated "is shielding" property and on OnRep.
"More efficient" is really hard to quantify in this sense.
well bHasGunShield has a OnRep for when it is set
There are plenty of parameters that affect what you might call efficient in networking.
well it's more is that the way to do it or am i over complicating it
@brittle sinew i managed to put it into a OnRep
works fine
{
if (!HasAuthority())
{
ServerSetHasGunShield(HasGunShield);
}
else
{
bHasGunShield = HasGunShield;
OnRep_HasGunShield();
}
}```
Is it possible to call ClientTravel with blueprints? If so, how?
So I misunderstood what ClientTravel is. Is there any way to move one player to another map without taking the rest of the players with them?
Guys, so I'm ready to start multiplayer stuff, however I'm only wanting to use BP's. I've seen it done in asset packs. However I'd like to create my own
Is there any tutorials online or anyone that could guide me
Yes @humble zealot what are you looking for?
Shooter, or just connecting players chat steam?
I'm creating a survival game @burnt meteor so yeah a shooter, and looking to connect it to steam servers with also a chat system
Okay thanks
I'm almost done with my game and multiplayer is the biggest part of it
Well done to a point of basic gameplay
If you wanna learn how networking works then read this document
I'm looking to do it in BPs only if that is possible
'Unreal Engine 4' Network Compendium Made by: Cedric 'eXi' Neukirchen ...
PDFcedric-neukirchen.net › Downloads › UE...
Google that
Its also in the pins
Is there no BP only guides
NEW! - Download the entire project http://www.unrealtek.net/unrealengine4_downloads/ In this long session we setup multiplayer 100% to get clients to connect...
Would this be it?
Ahh, i might have to pay for someone then
1 for getting steam up and running and setting up match making
@humble zealot that PDF is network ing basics on ue4
The epic games series is broken
Google advanced sessions tutorial by nice shadow
Goto the playlist and click the shooter series 1
@humble zealot
Okay thanks
@humble zealot np
Is it possible to make host migration?
sure, but it probably requires lots of client authoritative code
@burnt meteor I want to set up a dedicated server but not use steam (no need for testing). Should I still follow that tutorial series and just ignore the steam stuff?
afaik if you don't include steam it will just fallback to default subsystem, which supports lan testing
but it doesn't really harm to make it steam compatible
I wanted to try playfab or gamelift or something, is that much different than the steam setup?
no idea, probably very similar url based system
@potent prairie which series i sent 2
@potent prairie also no they are using listen server not dedicated server so u will have to modify only a few things
and they dont talk about dedicated server's so theirs no use in following that tutorial series
Is it easy to make a dedicated server thats based on listen code?
Or do i need to recode alot
@viral raft its easy
u just need switch has auth, is locally controleld and is dedicated server nodes and pretty much ur done
@burnt meteor Has auth is already been used here :)
Ik keep getting this error when i try to destroy the lootdrop actor ;/
Someone who can help?
The player variable is set to the overlapping actor on overlap
usually u only destroy an actor on server
if its replicated it does that for you
"IsPendingKill" describes the actor already being "destroyed" so it cannot (or at least should not) call Destroy on it again
,or better being in the "destroy-phase"
well you do switch has authority
but server is already authority
this should be on remote then
well possibly yes
hey guys
anyone knows if there is a hard limit to the number of players on an unreal engine server?
like how realistic is it to make a small MMO RPG?
hmmm I believe that is more up to what and when you want to replicate certain things
on a large map, one does not need to know what happens presumably 5km away (if he cannot see it by far)
@sweet sphinx Already checked out my game? 😉
but I am not aware of any hard limit
whats the event that triggers it?
But if i only connect destroy server it wont destroy on the client 😉
I tested it
On overlap
You mean the BP actor @loud mountain ?
the one you want to destroy
@loud mountain thanks
I'm thinking of making a small MMO RPG as my graduation project tho I know that Unreal is much better with session based shooter games
or maybe MOBAs
Ok, I'm having an issue where I spawn a replicated actor on the server and try to call a function on the client after but the actor hasn't finished replicating yet. Is there a way to tell when the actor has finished replicating?
any other things to consider making an MMO RPG on unreal?
it's just a proof on concept you can say, a few hundred players and working logic
MMO Is always hard to judge, I am thinking about stuff like WoW, but just thinking about it, can't PUBG or Fortnite BR not be MMO too? 100 Players on that map is a massive amount of people in my opinion
Yea I guess I could have it loop on the client if the objects aren't available yet and if it fails X times, log an error
@red ledge how long do you have to complete it?
@loud mountain yeah I agree but i'm not going anywhere near that scale of WoW, just a city, a few dungeons and a server that can handle maybe 500 players
@unborn nimbus an entire school year (8 months?) and I have a friend with me (maybe more people idk yet)
also would steam be viable for this? just for login and achievements etc
since it has all that built in
I feel like you're going to be hard pressed to get something you'd be proud to show off in 8 months.
yeah I agree
I can work in the summer too
so I can push it to be an entire year
I'm not looking for any sort of market targeting, just a working prototype
hardly gonna try to create special artwork or anything
doesn't have to be an MMO but any sort of a multiplayer game with a lot of players and some RPG elements
If that's the case, your top end should be 100 players. There's a reason why that's the max on pubg and fortnite
like teams, quests, a simple story line, something like dungeons etc
I was thinking of a bit more
something a bit open world
at least one map that is open world
well that already sounds like much more than "just" 8 months of work
^^^
yeah I know
I wasn't planning on making anything too fancy just the basics of everything
the base systems and showing them off in a game
I would be graded on the system not the actual game
at least mostly
as long as the game is working
@viral raft the way your doing your networking is bad practise and outdated method
@burnt meteor do you know of any guides/videos for setting up dedicated servers?
steam?
@potent prairie google it my friend usally read wiki's and docs its how i started
this is without steam
its better explained than videos
4.19 server target is 18's code
okay cool. Not interested in steam atm, I just want to get it running on a private server
ok
thats good then it covers everthing
@ PrintStringFTW#6597 created it btw so yea credit goes to him
also my game keeps launching full screen 1080 and I cant figure out how to make it window mode. Changing the settings ini file hasnt fixed it, adding a console command to the level blueprint did nothing.
any ideas?
packaged build btw
u wanna make it default or changable?
like hard coded?
if u wanan hard code it to be windowed check ur ini
sometimes the file doesnt update
yeah I changed the ini but its still full screen
ok
😃
thx haha
google is friend
first google then ask i found the answer here
Build powerful visual scripts without code.
did someone @ me i got a notification but cant see where ?
oh np whats up?
I googled a lot but I forgot t hat damn w lol
oh it must be somewhere else then lol my discord always plays up
@burnt meteor do you know of any guides/videos for setting up dedicated servers?
@potent prairie google it my friend usally read wiki's and docs its how i started
https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)
@ PrintStringFTW#6597 created it btw so yea credit goes to him
[REPOST]
this is what happened lol
i dint @ u
ah yeah its a little outdated but epic have turned off editing so i cant update it at the moment
yeah been on there a while now wish they would put an eta of how long their update will take lol
lol 😃
Is there a way to get variables to only exist on client or server?
Hi, i want to set up a "teleporter" that transports a player from one dedicated server to another. I've done it but for some reason after several server switches one of the servers is stuck trying to connect the player. It happens after 2-10 reconnections to the server, seems to be random, it happens if i switch with an specific player, if i just connect several users to the server from the same ip it doesn't fail.
do anyone know how can i accomplish what i want? I've tried with console command "open ip:port" and open level but same err on both
@unborn nimbus Yes/no. The variables are pre-defined in the compiled code when you create your class. But you can control who gets the values
or who gets the updates
i'm thinking more of a memory optimization so the other isn't storing information that isn't relevent
Well the server is always relevant, for anti-cheating and quality control reasons
I'm talking about client-only logic or server-only logic
I don't think you're understanding my question
I'm not sure I am either. What are you trying to achieve?
Say I have some boolean that is tied to a UI element being open or closed for example. There is no reason for that variable to exist on the server, but I would imagine that it will even though the server will never touch it.
Well, your basically given the choice of just having that actor not exist on the server (IE: UI Widget), or having it exist on the server with all the default values
But you can't have an actor exist on the server, missing half the variables. It still knows there is a bool there
So the answer is no. Ok, thanks
yup, yup
@burnt meteor whats new then?
I've been days with the dual standalone server setup and allowing users to switch server (see my comment) And google doesn't have the answer. I've found the solution right now, I had to put HasAuthority and only allow server switch on remote.
just is anyone is interested.
if*
So, I'd love some input from more experienced MP programmers. I've got a vehicle game working reliably, but I'd love some projectile-ish parts. Like, dropping something or throwing it, not sure yet.
I'm not sure about how to handle the replication on this. Server-side physics + interpolation would work but probably not well.
I'm thinking of client physics with some server feedback, to correct physics discrepancies
Or faked physics with classic prediction/rollback
@thin stratus is this fine for what i am doing? https://pastebin.com/44RxDHZs
Hm
Why does the ParticleComp needs to replicate
The OnRep should already call on everyone but the Server, or?
And why are you returning if a simple particle comp doesn't work, or is that very important to the ability?
Despite that it seems okay
No idea though if you are aware GetWorldTimerManager().SetTimer(TimerHandle_GunShield, this, &AUWMurdockCharacter::OnRemoveShield, 0.1f, false, ShieldDuration);
This starts delayed by 0.1 second or?
Not 100% sure what the params of that timer are again.
For the false part (else), I would maybe not put the "if(TimerActive)" around everything
You never know if that timer is not active but you still want to deactivate the rest
Would only call Clear if timer active and do the rest anyway
@meager spade
if i don't replicate the particle comp it never shows on other clients, and its a looped particle which i need to disable once they remove the shield
and your right about the timer is active check
Hm weird with the particle though
OnRep calls on everyone but the server
so all clients
(excluding ListenServers too)
So it should Spawn the emitter on everyone
oh your on about the SetIsReplicated call?
Yeah
yeah i can remove that, that was from me testing other stuff
Ah alright. Then the rest looks clean to me
okay, you should have seen the mess i was getting myself into last night
😄
{
if (!HasAuthority())
{
ServerSetHasGunShield(HasGunShield);
}
else
{
bHasGunShield = HasGunShield;
OnRep_HasGunShield();
}
}```
and thats the proper way to call it right?
Yeah
Is that a ListenServer game
Or Dedicated
Cause for Dedicated you might want to filter the whole Emitter spawning in the OnRep
ListenServer atm, would it be a lot of work to change it to dedicated?
yeah thats what i was going to do check for NetMode
Well it's a good thing to just filter out VFX
Doesn't hurt you and you have it ready in case a Dedi server comes in later
if(GetNetMode() != NM_DedicatedServer) right?
Should be
There are multiple checks one can do
Use the one that works for you
Others check if the Character is locally controlled and such things
i could disable the whole OnRep call for the server?
You want Collision to be toggled though
Otherwise it won't register that on the Dedicated server
So just filter the VFX :P
Okay guys, I'm super confused right now. This is my config in Visual Studio 2017
However, when building my project, it doesn't generate a server.exe
It just compiles regular Development_Game config
you using the source build?
Yep
And I already have a compiled server.exe, so it worked before, I just need to update it
no idea then it should work if that is your target
And I mean, it compiles me a working game.exe without errors. This is really confusing :D
Yeah it looks more like an issue with VS itself, really weird. Was just wondering if anyone had this before as well
Okay, I fixed it by deleting all intermediate files etc and then generating project files again
So if you ever have that issue, probably just do that!
I have a quick question. I'm following this guide about setting up UE4 dedicated servers. We have them working on Windows, and now we want to set up Linux servers. I've never used Linux before. What version of Linux would be good to install on my Windows PC if I wanted to test hosting a Linux dedi server? ((The guide: https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)))
CentOS or Fedora
Fedora looks like what I’m looking for. Thanks!
why isn't my server log displaying my local ip? there's no ip listened for that winsock line
listed*
nvm I'm able to connect but have a different problem now
Did anyone mention me?
my dedicated server is getting stuck in the transitionmap. It isn't transitioning to the actual map I want players to play on. I'm probably using the wrong code
this is the level blueprint for the travelmap. Am I doing this wrong?
Dont think you add the path onto it? Isnt it just the Level name? I cant remember
Not sure. I'm gonna see what happens with a completely blank travelmap and just going straight to the main map
I havent found a lot of info online about travelmaps
just gets annoying having to package every change haha
okay that worked, just loading the map directly. sweet
i think i was trying too much lol
@fossil spoke any idea why my server won't spit out its winsock IP?
From what I've heard but haven't tested yet (because I also had an issue with ServerTravel) , you need to package shipping build, and use seamless travel in GameMode @potent prairie
ah okay
I was trying to restart a gamemode after gameover but it kept stalling out, eventually just crashing
how do i run my packaged game as just a server? I put -server in the shortcut but its still launching the game on my computer
@potent prairie D:\UnrealEngine-4.19\Engine\Binaries\Win64\UE4Editor.exe "U:\UnrealProjects\MyProject\MyProject.uproject" -server -game -log should run it as a dedicated server, where the first path is to the engine ue4editor.exe and the second path is to the game uproject root folder. I'm getting this after I run it. should work! just don't forget to put double quotes around the uproject path.
I'm trying to run the packaged .exe game, not the uproject
everything works great with uproject doing what you said though
now I'm trying to carry that over to the exe build
I've also run into a snag building my project though, visual c++ won't compile it
keep getting this error: Please verify that you have sufficient rights to run this command.
oh, if you do that, don't you need to set it in vs as development server
I'm following this guide https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)
but getting that error
if you want, but I'm getting a c++ error, it won't build
unless the guide is wrong
ok look at these steps. try to see if there are similarities or diferences to your setup. if there are differences, redo step.
guide works.
i just had some latency issues so i ended up switching back to listen servers.
using steam appid testing
i had to switch to create / join session using the advanced sessions plugin instead.
ok ill try
@potent prairie you can try
to delete the .sln file in the game project directory
and right click uproject -> genrate project files again, try rebuilding server from that new .sln file
ok
yeah ill try that cause i keep getting this error
error CS0122: 'UnrealBuildTool.UEBuildBinaryConfiguration' is inaccessible due to its protection level
protection error?
is there something I need to disable?
or enable rather
its closed
and close vs
everything is closed
when u try to delete .sln file that error comes?
im deleting it now, that was the error before
ok
still getting error
if u have any custom code or anything might wana save .sln file btw
so it wont generate the sln file
ok undelete it for now
hmm
u might want to make sure ur privs are set right
u have admin?
on the machine ur working on?
yeah of course
did you right clck the folder and make sure you have read write permissions on entire dir structure
yeah I have full control according to permissions
what version of unreal u using
19.2
is it src
i have the source and the regular
so the engine compiled and everything right?
yeah
you could try going to the unreal src folder, opening up the sln for unreal 4.19.2-release
and try rebuild all
with dev editor
ok
try opening up the uproject as well to make sure it all opens and everything.. make sure there no error..
because gen project files work fo rme..
when you installed unreal src did you run setup.bat and generateprojectfiles.bat
i did whatever that wiki said
gonna relaunch the ue4 sln
yeah i think the cource is fine
the error is just something about permissions
Run GenerateProjectFiles.bat to create project files for the engine. It should take less than a minute to complete.```
you can try something else
make a clone of the project
to new folder
maybe folder has bad data
ok
using this method
i am not sure if simply copying folder and renaming will do it
and by the way your issue is very odd. i never see it before 😮
man if its because i have both vs 2015 and 2017 conflicting again im gonna be pissed lol
you have both? :X
do aforce delete of 2015 and install 2017 vs studio community
if u can
after u try the cloning
ok
if that doesnt work then try to do that way
when i clone do I need to rebuild the project?
choose the same .uproject name when claning, make sure to choose different root directory name. then you will need to go into that cloned project folder, delete any SLN if it exist, and gen project file from uproject. then you will go to sln, build for editor, then build for server. editor first. then if all that does not work for generate project file, you will need to delete vs 2015, and possibly 2017 as well, and try reinstall vs 2017 and go into the options make sure they are set properly.
yeah i think its the vs issue
i think i built in 2017 and then tried to do another build in 2015 so it gave that permission error
so yea just gonna focus on removing 2015 and then ill be back if i have problems again haha
typical microsoft its taking forever to uninstall
you have to build with same vs version yep.
without microsoft i would be in big trouble. lol
i dont know if i could work the same way in linux or mac
maybe - somehow. but it would be very difficult to set it up.
i hope you fix your issue - like you said, must be vs. 2017 is better anyway 😃
is there an established way to create a server browser without steam? ie: setting up my own server to keep track of lobbies and using OnlineSubsystemNull?
was just thinking about how I'd do oculus/steam cross play. Or multiplayer between two steam appid's. Seems like the best bet is to just do lobby tracking myself. Wondering if there's an open source project out there somewhere
@twin juniper I think I figured it out. The Server.Target.cs code in that wiki obviously is bad because it wouldn't compile
deleted file and its working again
do you know the code for 4.19.2 for the server.target.cs?
using UnrealBuildTool;
using System.Collections.Generic;
[SupportedPlatforms(UnrealPlatformClass.Server)]
public class ShooterGameServerTarget : TargetRules // Change this line as shown previously
{
public ShooterGameServerTarget(TargetInfo Target) : base(Target) // Change this line as shown previously
{
Type = TargetType.Server;
ExtraModuleNames.Add("ShooterGame"); // Change this line as shown previously
}
}``` replace ShooterGame with your Game Name
make sure to do these steps before that ```Go to SourceGameFolder\Source
Copy gameEditor.Target.cs to gameServer.Target.cs
not sure if server target.cs is created automatically by dev server vs build
so you might have to create file manually
via copy
yeah I did all that. I think I copied the wrong course
typical mistake
brain fried xD
wrong code*
seems to be working now, thanks man!
cool!
@potent prairie did you reinstall vs 2017?
or just delete 2015
cuz i wana know in case vs updates versions later 😛
i just deleted 2015
ah ok
yea
dumb me oh well
i should have thought of that actually
i didnt think to bring up the .cs file mb lol
you know, if you are doing dedicated servers from your home PC - you really don't have to go through all the trouble. just the ue4editor will be fine 😃
once you start deploying dedicated servers around places though it will be good to do that
Error Unable to find plugin 'AdvancedSessions' (referenced via Yeeeeep.uproject). Install it and try again, or
the errors never stop man
god
not sure why, its definitely installed.
ah its not installed in the source, duh
another error solved lol
oh
i use that
yep, gotta move the advanced sessions plugin to ur plugins folder, generate project files, and re-build the targets
good news, now that ur servertarget.cs file are written, you will never need to re-write them again. i have successfully migrated those target files over from several generations of projects. i had 4.18 until 4.19.2 lol. so many migrations 😛
gen project files to make a new sln and then rebuild because the sln wont recognize a new plugin in the folder until it has the proper makefile / deps
and that file i screated from gen project files
ok
sorry, eyes blurred, can barely see what im typing. so if i make typos my bad lol
got a fun one this morning - I'm looking at a blueprint that's been spamming our logs, specifically a component that handles things like footprints
now the component isn't replicated, so there's no concept of networking in there
however it is using 'spawn sound attached' on the player mesh, which in turn is generating the following;
LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: AudioComponent SNIPPED:PersistentLevel.BP_Characterr_C_0.AudioComponent_0 NOT Supported.
it's like something is trying to replicate the audio component
(the one created by PlaySoundAttached)
@past bear Dedicated or Listen Server?
dedicated
Make sure that the dedi server isnt trying to create that sound
I'm guessing I can do a simple 'is server check', and that should be enough?
Mmm
Why does "get steam avatar" (advanced sessions) only works for your own avatar, and not for everyone elses? I am using this blueprint part: https://blueprintue.com/blueprint/ym-okyfr/, and it only shows my own avatar on a dedicated server, and not everyone elses. I use it in a Get_Brush function in my UI
Widgets are ClientSide only, so if your accessing an Controller to get the UniqueID its most certainly just your own controller
Try getting the UniqueID replicated in the PlayerState. That way you can get all PlayerStates in the GameState and then request their Avatars via their UniqueID
when I build a project in Development Server, do I need to rebuild it in Development Editor if I wish to continue designing the game?
what services do some of you use to run your dedicated server?
I'm trying EC2 but uploading is so slow lmao
Yo, quick question
lets say I made a custom VR PlayerController.
I want to send input (my right hand's position) to a pawn over the network.
How should I send input?
Should I use regular events for that?
just got my dedicated server working on an ec2 instance. feelsgoodman
bed time xD
Hello guys I have a simple question about the multiplayer games-is there a way to create a multiplayer game with Unreal only with Blueprint??
With internet, Lan and similar connections each other to play together
yep
Can you send me a link to tutorial or steps or something on this theme?
Though Blueprint only isn't what I'd do, and you're bound to hit some roadblocks and use some C++ code at some point
Managing sessions is pretty much only doable in C++ IIRC, even though there's a plugin for exposing it to BP
If you're afraid of C++, multiplayer is going to be a bit rough
how is a uclass property replicated? is it a unique integer or some such?
Okay I understood but How to create plugin and for what is it?
Why do you want to create a plugin ?
I ask for information because I don't know for what is use the plugin?
Plugins are for adding engine features
the Spawning apparently...
Solved it. the player spawn's collision setting was wrong.
All, I have a question and I don't mean in any way to be provocative.
I'm building a simple FPS multiplayer game with Steam, using the advanced sessions plugin. The players are mainly only able to shoot, launch grenades, and control K-9 units. Up until now I've had no reason whatsoever to use C++ and since all the veterans here keep on saying that you simply cannot build a MP without C++ I'm getting scared that it'll bite me in the ass regarding things that I haven't thought of. Am I completely missing many points?
@ember needle nope.
You'll def need C++ here and there, but worry not because it's nothing complex.
Am just curious how you integrated Steam with your game without C++ 🤔
With the advanced sessions plugin
Yea, right, but AFAIK AdvancedSessions uses OnlineSubsystemSteam and one has to at least link the depedency in the Build.cs file. Not C++, yea, but I'm assuming what Scar meant by touching C++ was code in general.
Am I daydreaming @ember needle?
Also, side question --
How do you guys test your Steam Integration?
PIE? Standalone? Virtual Machine?
yes as anticipated i'm using the advanced sessions plugin, and no I meant actually coding C++ myself
when you test Steam you have to use the standalone mode, because otherwise it simply won't work.
I am yet to test the voice, not sure on how to do that by myself in development
Well.. thank you @gloomy tiger for reassuring me a little. I mean, I am testing the game with friends online at regular intervals, but I hope I don't encounter weird things once I launch it (will still take some time though)
gotcha 😃
(game in question is http://www.misultin.com/)
anyone knows where the problem may be if i can host a steam session but not join?
lan or internet
internet
steam
i can host and others can join
but if others host i cannot join their session
can others join that person when they host?
yes, its only me who cannot join but host^^
sounds like you have a firewall blocking you
its not the firewall, i just looked it up
Question on replication. I am spawning a grenade BP on server. The BP contains only the static mesh. It is replicated and has movement replicated. However, when I spawn on server and apply an impulse on server, the impulse will be applied only on server. On clients, the grenade just drops down where it got spawned.
If I set the impulse to be applied on Event BeginPlay on the grenade, it is applied also on clients.
However in this case I see something weird: if I set a timer after the impulse on BeginPlay, this timer gets only called on server?!...
Set the grenade to simulate physics and hit the checkbox called "Replicate Static Mesh Physics" (or something like that I can't recall exactly)
I'm not referring to Replicate Movement, I'm referring to the mesh specific physics replication
i don’t see this option
Should be a member of the static mesh comp
I don't have access to the editor right now, but I'll see if I can find the name online
thank you
by any chance have you seen the other behavior?
the fact that the timer on beginplay gets only called on server?
beginplay gets called on all clients
but for some reason the timer function only on server
You're not seeing begin play getting called on the clients at all?
yes
Of the grenade class?
so
- on the server i spawn a bp actor, set to replicate
- the event beginplay of the actor is called on every client
- if i set a timer to call a function in the event, the function in only called on the server. very weird
So begin play should always be called when the item is spawned in assuming it's replicating
Is that the issue or is the timer not working as you would expect
yes it is so
the issue is that the function specified on the timer is only called on the server
even though the beginplay is called on every client
Can you show me where you set the timer?
BeginPlay -> Print “hello” -> Set Timer By Function Name (“Test”)
“hello” is printed for every client
“test” only on server
Maybe the function you're calling is an RPC by accident?
Maybe you left a if (Role...) in there?
Save the handle to the timer and test if it's valid or not
this made me wander if my setup is correct
hold on
- i spawn the actor on the server, providing the impulse computed from the position of the player: https://gyazo.com/adefee4d780f8445090575d22403a512
- I add the impulse on the spawned actor, and add a timer: https://gyazo.com/82d9bf04f0cab13d2e78ed54a098fa54
function "test" only prints "test"
RESULT: 1. impulse is added to all clients, but "test" is printed only on server
I don't see anything wrong
so if I add a print "HELLO" after the event begin play
that gets printed on all clients
"TEST", only on server
so weird
Also @ember needle found out the name of the static mesh physics variable, it's Static Mesh Replicate Movement under the Actor category
so I have to do this: https://gyazo.com/1e5ac2481cc2e8879f95cc4e686a763c
I don't see "Static Mesh Replicate Movement" in the BP...
you are talking about a static mesh
but I'm talking about a BP
Well yes if you want the function to control something like exploding the actor it has to be done in the authority anyways, so that would be the way to go
Found this on the forums https://gyazo.com/3a054112a984724a43f2a6e5fe948778
Well yes if you want the function to control something like exploding the actor it has to be done in the authority anyways, so that would be the way to go
Yes but it still doesn't explain why the timer is called only on server
that is only for static meshes in the world
Yea I can't say, I'm guessing it's ownership related but I can't really see how
not in a BP
Ugh, I swear I thought it was for the component
You would have to use a multicast on the impulse then to simulate it on all instances not the authority