#multiplayer
1 messages ยท Page 401 of 1
@shut gyro @pallid mesa the OnRep get's called on the server but the client still doesn't spawn the emitter
@strong breach server was fine but client couldn't move at all =/ damn, thought i had it...
@arctic willow here you have an example of using a on_rep to execute arbitrary code on all the clients: ```C
Header file:
UPROPERTY(ReplicatedUsing=OnRep_HitScanTrace)
FHitScanTrace HitScanTrace;
UFUNCTION()
void OnRep_HitScanTrace();
Cpp File:
void AVGWeapon::OnRep_HitScanTrace()
{
// Play cosmetic effects
PlayFireEffects(HitScanTrace.TraceTo);
}
void AVGWeapon::Fire()
{
// Trace from eyes to crosshair location
if (Role < ROLE_Authority) {
ServerFire();
}
AActor* MyOwner = GetOwner();
if (MyOwner)
{
PlayFireEffects(FVector(0,0,0));
if (Role == ROLE_Authority)
{
// Client VFX
HitScanTrace.TraceTo = FVector(0,0,0);
}
}
}
void AVGWeapon::ServerFire_Implementation()
{
Fire();
}
bool AVGWeapon::ServerFire_Validate()
{
return true;
}
```
I added some velocities in my custom phys function but when its playing over a network it causes a lot of smoothing problems when there is lag
Im actually just calling SafeMoveUpdatedComponent, not really changing the velocity value since adding velocities there was causing me problems. But theres something wrong and theres so much code in the charactermovementcomponent its hard to figure out.
@pallid mesa i tried that but it seems that the client's never calls the hit function, so "if(Role < ROLE_Authority)" never will be true. My logic is in an Obstacle class that get spawned by the Server. Could it be that the client doesn't call the hit function because the owner is the server? But how do i than spawn the emitter on the client side?
did you replicate your obstacle actor?
yes
okay so the server and client are getting the obstacle
yeah and the obstacle get's destroyed on the server and on the client
it's just the ParticleSystem that doesn't get replicated
shouldnt particle systems only be on the client?
is there a reason the server needs it?
yeah that's true, i try to spawn them on the client site with the OnRep function
when what is being replicated?
my EmitterSpawnLocation Vector should be replicated whenever it's value gets changed.
hm. maybe that would work. but i would consider using an RPC that gets called when your important gameplay event happens on the server. like firing something for example, you fire, server determines something is hit, calls a function on the clients to notify them what was hit and the location of the hit. Then the client does whatever it needs to do, like spawning a particle effect?
I dunno, Im still new to this stuff to but I feel like doing on rep for spawn location seems like a questionable way to go about it
I think i tried already an NetMulticast that should spawn the emitter everwhere but this still didn't worked
hmm odd
I read a bit over, you cannot rpc to server a thing if the server is the owner
you can only rpc if you have the client as the owner
You can multicast from server
to the clients yes
No matter the owner
i think i tried that already, but i try again
My funny question is... does you emitter spawn at 0,0,0?
thought about that too, but it should get spawned at the GetActorLocation()
i test it
Where did you try to multicast from?
@pallid mesa what i mean was, multicast from server to clients to tell them, "hey the shot hit something its time for you to do local client visual stuff"
might not be the best way to do it
If thr obstacle gets destroyed, is it the reason you dont have you emitter on clients?
Anything in the logs about misding actor connection?
RPCing a spawnemitter throug an actor in process of being destroyed doesnt usually work.
does ondestroyed (or similar [don't have rn vs by hand])
get called on every end?
because might be a good place to put your vfx
that's a good idea, im trying the NetMulticast right now and if this doesn't work i try that.
thx to all of you
You can also spawn an Actor with no collisions that does the effect on BeginPlay and destroys itself when its done
that should also work
well, explosion actors are fine, and a common practice
since you can program there decals, sound and vfx
in a decoupled way
but have in mind the extra overhead
Its fairly easy on bandwidth, barely more then a RPC
which is almost inexistent for the advantages you 'll get
Can someone enlighten me on the difference between a Replicated variable (component or actor type), and the component / actor itself having the bReplicates flag ? Like if a player pawn has a component, should both be set ? One or the other ?
thx for the Help guys ๐ gn8 and have fun watching E3
Word of caution, if you send DestroyActor and SoawnEmitter at nearly the same time
It might work only sporadically
Depending on latency
Replicated variable fot UObject will only send the NETguid
bReplicates adds it to owning actor channel and allows it to replicate its variables
There is no need to separately replicate a variable holding a component regerence
But if you wanted to reference that component from another object
You would nedd a replicated variable
Attachments between actors, components, attached actors and the like replicate out of the box
Sorry for typos, large fingers + mobile
Great ! That's actually really helpful. Thanks a lot.
strange question but is there a way to simulate lag with dedicated server when you test in editor?
I have used clumsy (app to simulate network lag) for my packaged build... but i doubt that would work for ue4 in editor
im getting a replicated time from game state to widget, it works but i feel like its expensive, not sure though. i wonder if theres better way to do this. i know that binding value in widget it "ticks" it, thats why thinking if this is the reason game gets a little stutterish.. any help would be great.
@strong breach got it working, had to disable physics on the client side and let the server handle it all! Works across steam!
@late sundial While bindings arent the best, they still wont hurt your performance that fast
So i assume the stutterish stuff is from something else
asked yesterday but,
Anyone know a technique to avoid jitter on listen server? on clients i can just interpolate between the client position and the server position, obviously if i do that on the server it will have the wrong location, i though about just interpolating the mesh, while keeping the actor on the correct place, but that would cause to the physics asset to be on the wrong place
I have an actor, when moving on server, clients can replicate the movement by interpolating between old and new position, giving a smooth movement, the oposite is not possible, as the server will recieve a position but may not be able to interpolate, as it would not be the real position of the player
custom movement component, WASD
the ServerMove functions are inherited from an engine component tho?
only UMovementComponent::SlideAlongSurface
so you RPC your input to server yourself?
i RPC whats necessary to simulate the move, (direction, speed, deltatime)
my first thought when you posted was too many reliable RPCs flying around in combination with CMC
this doesn't fit the theory tho
yeah iirc CMC also has jitter on listen
its worse when someone makes a million reliable RPCs while ServerMove functions are all Unrealiable
No way @tired jasper
Iโm gonna try it when I get on my computer Iโll message you in a bit
got a few questions about using listen servers in multiplayer game:
1)will there be a performance issues with 6-12 players?
2)Can hacking be prevented if game is on Steam, i mean is there any plugin or something?
3)Can game be pirated and played on steam if it's steam multiplayer game?
@brave moon hi, once you go beyond a few players, it's recommended to use dedicated servers. there's a good result from "dedicated server unreal" online.
if you want to prevent hacking, the best way is to have your server RPCs and calls made such that they only execute on the server. search "Authoritative server" for more info on this.
if you use steam DRM, it has simple file obfuscation, but if you want to have true piracy protection you'll need to create a login / authentication system for each user.
hope that helps!
@twin juniper Thanks for your fast reply, i mean is there a difference between pirating a singleplayer steam game and multiplayer steam game, bcs my singleplayer steam game have been pirated in like 3-4 hours after release on steam
yep. so for multiplayer, you will enable a login system.
singleplayer has local content, so you can't prevent that unless you load the content from the cloud or force login for singleplayer play.
you can also use denuvo but it is expensive to implement and indie games don't use it.
alright thanks mate
if you price your game low enough, people will pay for it despite the fact that it's pirated.
generally, low cost is like mobile economics. that's actually how i am price setting my own game.
people know that you put work into it and want to support you. you'll be surprised to know theres' a lot of good people out there.
im planning about 6-7 dollar price
mine will be 99 cents in early access and maybe i will charge for in game cosmetics that don't affect gameplay. if people want to support further. never make someone give you their money.
after all, money itself is just paper.
no one likes being pushed around.
and you can actually see that only AAA titles charge like 19.99 and above.
thank god i found this discord server
@brave moon take alook at this chart
u are right low price will keep game alive and prevent pirating
i made that when i was doign a price analysis fo rmy steam game.
i sampled many categories from 3-4-5 star games on steam set at 9.99 all the way to .99
you get MORE users and MORE money for .99
plus you feel good since you dont overcharge your users.
if you set your price point at a good number, then you won't even need to implement a login system if you don't want to.
because people will just click buy.
so just looking at that example, .99 generates about 30,000 users on average per year, and that translates into about 20,000 $ annuaully (steam -valve takes away about 30 percent of your money, and epic - unreal will take 5)
assuming your game has some thought into it: at least a halfway decent singleplayer campaign, nice UI, multiplayer if you can afford it (and if you want to go all the way dedicated servers.)
if your game has a the high enough quality to price it at a higher number - you should. because then people think you desreve it and will pay for it that way.
but just consider the options you have, and consider what makes people happy.
prob u are right bcs i got only 500 players for that sp game i already finished
and price is like 9$
and i got like 55% overall, steam taxes, withdrawal taxes...
@twin juniper Congratulations on those sales numbers! What year did you release it and do you feel like those sales are probably average compared to other indie games' sales on Steam?
I'm told that nowadays getting just 10k in Steam sales as an indie developer is hard.
oh no those arent my own numbers @versed socket i did a price analysis using a steam aggregator website i expect i can make about 30 from my game. i worked on it nonstop for almost a year now. planning on setting it about 99 centz
I think games should be priced higher
and you should release a torrent yourself
but thats my unpopular opinion
๐
if its my own title I encourage it
prazon are you still working on multiplayer?
Yeah I'm having an issue with timers causing movement correction issues though
ok well - if you release your game, then you shouldn't have to do that. piracy is not a good thing and should not be encouraged. what are you setting the price at anyways? you never told me
and you might try switching the timer to timeline to prevent issues - set timeline to replicated in settings
thats a decision I have to make with my 2 other directors I can't say for myself for sure but I'm pushing for 9.99 during EA
Thats a good idea
I'll try a timeline
anyone kow best way to setup multiplayer pawn movement via physics in blueprint? [listen server]
know the*
@tired jasper if it's a floating pawn, you can do something like this
and execute it on server.
@twin juniper rolling pawn, principle the same?
you cna try this
or use the first one - and a combination of physics vel and angular velocity. ensuring to enable physics on the BP.
@twin juniper cheers!
Hey i have 2 maps 1 Lobby and 2 game.
i dont want players to see my game session so how would i go about it?
what you mean, not see your gamesession?
when in the game i dont want players to join
So, don't start a multiplayer online session ?
i start in lobby map
then i go into game map but i dont want players to join when the match is starting
then disable the session join (i am sure there is a value for that)
Update session join parameters
Hi everybody, can somebody give me some advice? I'm trying to setup splitscreen in an fps but I'm struggling with the hud. Now I've seen 2 approaches to this, 1 is to duplicate the character blueprint and hud widgets for each player the other way,(which I can't get my head around) is the way wes bunn does it in the official ue4 splitscreen tutorial. I can get the correct health to show for each screen but I'm struggling with getting correct ammo and a couple of other things to show for the correct player. So which would you recommend.... 1 or 2?
Your PlayerController owns and possesses the PlayerPawn, it also creates and owns you AHUD object
So, as long each player's HUD controls the character related widgets, you can easily pull context via GetOwningPlayer / GetOwningPlayerPawn
And get anything it needs from there
@winged badger thank you. I'm not at the computer right now but I'll take a look tomorrow and see if i can make that work. Thanks again
hi guys. i have a problem with connecting two PCs. I am following Tom Looman Multiplayer Game course
i can connect on the same pc opening two clients
but i tried between my laptop and my pc and i can't connect
i gave the game to a friend and it also didn't work. what may cause the problem
are they on the same subnet?
we can only guess based on the info given ๐
laptop and pc yes
when i created host it didn't asked me for firewall. that might be the problem?
you opening a map with ?listen parameter?
yes @winged badger
open map?listen
should it appear the firewall request after i open the map?
time to read the Output logs
they usually provide a hint, if not a straight answer
you're only interested in part after it opens a map with ?listen
the game is coocked
that might be a problem if you built it for shipping
without the logs, debug info or the code, not really
Zlo, need a bit of ermm design help ๐
@winged badger the same log should be in editor as is in the coked game?
i rly need help with this. tomorrow i need to show it for my final grade
why is it connecting to itself?
they are also way too many connection requests here
2 standalone games, started from PIE
get them connected
use
a shortcut with target
"<full path to your engine's UE4Editor.exe file>" "<full path to your projects .uproject file>" -game-log
"" stay inside the target, the <> are just there to make it more readable
fk. sorry i wasn't here. i took a break cuz i rly needed one
@winged badger can you be more precise please? sorry for being so annoying
you want me to make shortcut to the packaged game?
no
oh
"D:\Unreal Engine IV\Epic Games\UE_4.18\Engine\Binaries\Win64\UE4Editor.exe" "F:\MyGame\MyGame.uproject" -game -log
is a working example of one
hmmmm. why there is no shortcut tab =.="
@analog heart you can right click a file in explorer to create a shortcut to it. i do that often for my dedicated servers.
@analog heart setup port forwarding
i have successfully set it up and i can play with my friends over the internet
sure
I'm having a mario like lifting platform setup. static mesh components are created / deleted in runtime. locations are multicast set by server (for now). they are constantly moving up.
problem is client's character gets thrown underground when stepping on it
it might has something to do with CMC?
its a replication problem
@verbal wave
server tells client ohh the object it not there so pass through
first validate on server
then multicast
made a rpc ran by server -> multicast after
yea but how do we usually deal with this when using
?
actors usually work alright
realtime static mesh components are handy and I wonder if there's a way to use it in MP
while making sure CMC responds with them correctly
what is CMC?
character movement component
wtf, what's the problem just make a actor that replicates with a static mesh
because my SM components are dynamically generated and I'd like to put them in one actor
ok
and it might prove useful when I try to do some fancy prediction in the future
reliable RPCs in one actor are ordered and I can do some fake physics stuff maybe just for example
I need some help with a respawn system that wont work as well as displaying a win widget for everyone. PM for more info cuz I dont want to spam the chat with screenshots
@winged badger
that looks like it should work, you do not need to cast the PlayerController tho
GetControlledPawn is a function in AController, not your custom class
Does the UE4 ShooterGame example has a game server set up in Steam Game Servers? I kinda wonder how P2P works in OnlineSubsystemSteam.
It is because I'm running across a problem wherein I can't get the other users to join the host's session if the host is using a shared ip or behind a router network
@winged badger i've tried that it varies ways and just get errors but to be fair i'm pretty much a novice and dont really understand the ins and outs of whats going on. i have one more issue that is doing my nut tho if you could help?
i'm trying to create a splash screen when a character takes damage but the best i can do is to get the widget to display in the screen corresponding to the value in the "get controller" in the thirdpersoncharacter blueprint. i have created a reference to the "damageEffectWidget" in the thirdpersoncontroller but i cant get it working correctly in the thirdpersoncharacter blueprint. this is what i have so far and have been trying numerous things for a couple of days now
I think i must be doing something wrong. if my input modifies the variables that are being used in my SavedMove class it results in a lot of stutter pertaining to my movement
idk if its a smoothing issue or what uhg. has anyone ever dealt with their own custom savedMove class?
I wish there was a made-from-scratch replication tutorial
everything is based on engine default classes
what do you need to know?
important thing to know is that replicated variables are set by the server, and the clients then get that update version set by the server
or at least I believe thats how it works.. Im still a bit new. I dont think clients can set the replicated variables, they dont have authority to do so.
or maybe im wrong lmfao, someone feel free to correct me on that
ahhhhhhhh im dying here. i found a debug visualizer to show network corrections and normal movement doesnt even have corrections. ๐ so why does mine... am I being too strict lol
maybe i shouldnt even use SavedMove for what Im doing
no.. im sure i need to, but why arent there corrections for normal movement. bah, so much research
iirc it's simulated move first, rpc to server, server move(multicast), client confirm
if you go directly to server first you get input latency equivalent of your ping
hmm so maybe its not being properly simulated
what I'm looking for is a checklist of security features you need to prevent cheating
without wasting too much bandwidth
as far as movement goes, I think SavedMove is intended to prevent cheating. It saves movement and if the clients move is wrong it does correction. Or at least thats what Ive gathered, still trying to learn it. Character movement component is gnarly
haha
but could it be as simple as generating spline from movement history and checking are the points close enough each other on server end?
and forcing rewind if it gets too far
it probably does do something similar to that. The saved move class contains copies of position, velocity, acceleration, things like that, at certain points in time
so i imagine it takes those points and does a comparison like you are saying, and if its not close enough it does the client correction/rewind thing
not a spline literally but theres probably interpolation between points going on
"points" being the Saved moves
I saw the system they had for Lawbreakers on one of their interview videos
it was literally numerically flagged DrawDebugSphere's
so, I guess
why I was imagining spline was to do the corrections towards the spline, instead of hard rewind
ohh i see, thats interesting
obviously it increases the bullshit-factor but you can't fight time
what ensures that the spline isnt being modified by cheaters too?
#downtherabbithole
or would the spline only exist on the server
yea, it constructs it from movement history
well, in my case since I do manual velocity calculations, it could probably work
I just input latency instead of Delta time and I get location as output
ooo huh
lol
Does this work on pawn class or just character class?
Hmm .. not sure if i should ask here or in AI .. have a strange behavior with AI attacks where if i don't look at the AI, it won't fire at me
using engine 4.16.3
anyone ? ๐ฆ
Is .... there ... anybody ... out there. Hello, hello, hello .. is there anybody out there ... just nod if you can hear me ... is there anyone home ? .... (hehehe)
ask in ai
so this is still a thing https://issues.unrealengine.com/issue/UE-36139
does anyone have any advice on how in the future, I can perform an action for relevant actors on a remote client (play an animation) but a different action if that actor is not relevant for a remote client (play a sound as a result of the animation)? the only real idea I have right now is to route through an intermediary thats always relevant like gamestate, check net relevancy there between the local and remote and decide accordingly
@knotty frost would you mind explaining "not relevant" for me ?
not relevant means that it shouldn't be replicated anymore over the network
this explains it pretty well, and im using distance based relevancy https://docs.unrealengine.com/en-us/Gameplay/Networking/Actors/Relevancy
well things shouldn't be replicated to it*
Could any of you help me with my problem?
Replication and RPCs have been kicking my ass this week
could you show your header definitions for those functions?
hey can you guys please vote on this, its to add post process effects for splitscreen, right now you have to build a custom build in order for this to work
https://issues.unrealengine.com/issue/UE-57785
we are asking that they add it as a button in project or engine settings, so you can opt-in if needed
Hey folks, I'm hoping I'm missing something obvious (new to multiplayer, using blueprints). I'm doing a little hobby VR/non-VR coop and would like to have the players get a different pawn depending on whether VR is present or not. I'm implementing this functionality in the game mode and have tried both the OnPostLogin event and overriding SpawnDefaultPawnFor. I do a switch on the output of GetHMDDeviceName and if no HMD is present I spawn and possess the appropriate pawn. Running locally the appropriate pawn is always selected. The problem is when the client connects to the server (which also has HMD) and spawns the wrong pawn
I did some debugging and saw that the client indeed sees 'Steam VR' so it thinks it's loading the right pawn. I also noticed using IsServer that the client prints 'true' as well. Pretty sure I am missing something fundamental
Has anyone here used GameLift? I was curious if it was possible to remote into the server where you're running your game server instance on.
@lavish dagger No, you cannot remotely connect to the game server
@rapid hatch So they just host and run your executable? I was curious if it is cost effective as compared to running and maintaining your own servers
Depends on lseveral factors, but it can get expensive. For a handful of servers not too bad, but if you start talking fleets of hot/ready servers for matchmaking, etc then it starts to add up
@rapid hatch thanks for your info!
np!
If I wanted to change default variables on the character blueprint from the dedicated server without any players connected, how would I cast to that?
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Tazer_C_3. Function PlayEffect will not be processed.
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Tazer_C_3. Function PlayEffect will not be processed.
the actor is spawned on the server
@meager spade Is there a question there ?
This happens if a non-authoritative object tries to call a server RPC
So the object does not exist on your remote client ?
Sounds like you have a BP_Tazer_C on your replicated non-owning client, and it calls PlayEffect
WHich is a server method
At least doing that would generate this warning ^
might have to put a branch in there to only execute the spawn actor if i am authorityt
Is there a shortcut way to replicate animations? Can I just mark all the variables as 'replicated'?
@icy nacelle Depends a lot on what you're building here
Apologies: An online game running on dedicated servers
For animation, if you have a clean state machine that detects state changes and cleanly go into the next animation - you can only replicate the state
And it'll mostly just work
Like, running state, walking state, idle state - replicate just that flag, and let the client move to anim X, Y, Z
Yeah, all those player movements are replicated just fine
I'm more having problems with things like action events
and also dumb stuff like /dance emotes
I assume because a characters movement component is replicated by default, the characters movement animations replicate without problem.
Read through this post, it may help - animation montages + repnotify work well:
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/104812-animation-montage-replication
Build powerful visual scripts without code.
Thanks @tawny parcel I'll check through it ๐
The key concept is to replicate only the most high-level information
Anyone else experience problems with the 'login redirect' page? cant even load this forum post aha
Your anim BP should be network-independent, get its state from the character, and adapt
I see
Simple example - if you press jump and then jump again one second later while mid-air, there is a 99% chance the timing will be very different on a different machine, which is fine, but will result in a slightly different animation
You want the animation to look good more than you want it to look accurate
Yeah, but how does the engine replicate the animations from client to client? Does every client have a version of other client's anim bp?
(I would totally read the post themainstark posted but it wont open)
Is forums.unrealengine down?
Its working for me
Super weird, it just says 'logging in...' on mine
Clear cache perhaps? Try a diff browser?
Yeah that works. Strange.
@icy nacelle What I'm getting at here is that you don't want to replicate the animation
YOu want to replicate the state
And update the animation locally based on that
When you say state, you mean the variables that are used in the transitions, right?
More like all variables used to drive the animation.
Replicating the animation directly can't work because animation needs one update per video frame, always, constantly, without hiccups
Network replication will never achieve that - it's simply not possible
You are mostly just turning a bool on and off, and that bool is replicated. In the situation of AnimMontages you also replicate the MontageSection choice.
Okay so do I need to replicate the incoming variables or the ones being set? (Pictures to follow)
So you replicate whether your character is walking, where it's aiming, whether it's running or equiping a weapon
And then in your anim BP, you get these values
When the "walking" boolean changes, you will use the walking anim or not
But if there is a huge network breakup for three seconds, you'll keep having clean animations
I understand about replicating the animations directly is not what I need to do
I just am trying to find out what I need to replicate so the other clients can see the animations
Well, 100% of the data that's driving the animation, so all of the stuff you have here as input to the anim BP
Try and look at that link, I think it'll help! Even if its on your phone
Okay, so even when things are set as 'replicated', they dont actually replicate. I assume I'll need to do a rep notify instead?
Correct me if I'm wrong, but isnt montage legacy now?
Not sure on that one, I just have it working with AnimMontages
And locomotion in the animgraph
But for abilities I used animmontages
I think we're on the same page here.
anyone know what could be causing a failure to create a session
is it necessary to round vectors/floats that are replicated or sent through an RPC
in regards to movement related things, i keep getting client corrections, so im wondering if thats my issue
What would be the best way to (server side) detect if a physics body of one client is overlapping with the character capsule of a different client? Eg, in Epic's Shinbi, the sword
they both have a server version
which is always right, and if clients don't think so, then clients are in the wrong
that's correct, and the approach i'm going for
so you do an overlap on server and let the clients know what happened from there
during gameplay clients should only tell the server what input are they getting, nothing else
yes indeed, what I'm wondering is more of how to actually set up this in blueprints
if you are going from perspective of a sword
i have a very rough has authority switch that handles RPCs and multicasts for basic attack swing, but i'm not sure how to server-sidedly check for collision between two objects
OnActorBeginOverlap -> if Authority -> if OtherActor Cast to Pawn is PlayerControlled -> resolve collision -> RPC / replicate with OnRep the results
assuming you want the sword to only bash players
should the OnActorBeginOverlap event be binded to a custom event on begin play?
its an event that gets called when something Overlaps the Actor in which it is defined
it works out of the box
Ah, would that mean that the sword itself is considered an actor?
well, the physics body of the sword
you can also pull OnComponentBeginOverlap events for each component that has a body that can overlap
that depends
is it a separate blueprint ineriting from Actor?
then its an actor
if its just a mesh attached to your character's hand, its a component
and you can use the aforementioned OnComponentBeginOverlap(whatever your sword component is called)
works the same, and as long as your collision profiles are setup right, it works out of the box
that makes a lot of sense actually, thanks!
in Epic's assets, it looks like it's just a mesh, although i am not sure how to create a blueprint for it
you should really start with some basic tutorials
im happy to talk networking when you get stuck, but not to discuss the basics of UE at length
absolutely, i'll check around for more info, still trying to work myself around the paragon assets
thanks for the help!
Whats the best way to kick a player out of a session i was running destroy session on selected player wich i followed trough with the official tutorial wich i found out isnt great and most of the time bugs out the server and client and forces them into a limbo state of not being able to find any sesseion at all or getting stuck at a current session.
so whats the best way to remove a player from a session ?
destory session is the best way mabye u dint destroy it correctly and thats why u wernt able to find
Hi there
I have an issue with multiplayer on UE4. Currently im trying to host a session with my friend in the game we made but this time we want to be able to do it online. We managed to connect having one of our friend unlock his ports and having to directly pass in the ip as an argument to the command : "UE4Editor.exe "C:\Users\Desktop\Perforce\User\Game1\Game1.uproject" public IP -game
" And now we were wondering if it would be possible to host one without having to open command prompt and type in the line above. In sum, Is it possible to Host a session without having to explicitely type in an ip?
Thank you! I've looked over the document unfortunately i couldn't find anything. In this case it says to build a dedicated server however i would like to try and avoid that. Would you think it is still feasible?
Perhaps your recommendation is to go with a dedicated server?
might still work, but if you wanted anyone to be able to host you'd have to have the user enter their IP in game
I see
We currently have an ui that allows to find other sessions in the game
however for some reason we can't find it when we're looking for it. It only works if we type in directly the ip
kinda as you said the user would need to manually type in the IP from their side of the client. I was wondering if there would be a way to avoid that
uhhh i dunno
maybe
but i dont know how
you'd have to get your IP address somehow, but not sure how you would
Alright i will look into that. Thank you for your advice!
no problem
@polar timber if SteamVR Home is running, it will interfere with your ability to find sessions.
SteamVR doesn't seem to be installed perhaps another program might be interfering?
Also we've forwarded our ports manually in this case.
Yeah. Steam itself can actually get into a bad state as well.
I would exit steam and restart it if youโre using that for matchmaking.
Otherwise you can open the starting game level blueprint and drop in a Execute Console Command node.
Type โopen <hostIP>โ
And when the game loads the map, the beginplay event will automatically type the console command for the user
That will work for you temporarily at least.
You should also ensure both of you are running standalone and the exact same code and blueprints.
Any changes can prevent successful matchmaking.
We currently have a blueprint which brings up an UI and looks for available sessions ( it uses the find sessions node) and we'd like it to do the same thing as inputing that IP but without having to physically enter it through a terminal or a console.
Perhaps I'm misunderstanding the "find session" node?
What is the command / blueprint node for a server to shutdown itself down?
Hey,
So I have a replicated UObject representing a duration effect on a target.
It is applied when an ability hits a target.
Since I do not prefer to use Tick for the duration, I set a timer for the duration. This happens on the server only.
The problem I have is that if I select a new target in game - and it already has a duration effect applied, I can not access the time remaining since the timer exists only on server, and can not be replicated.
A solution I have that is not optimal is that I set another timer on the UObject that loop every 1 sec (for example). On each loop a replicated float variable, representing the current remaining time is set.
Clients can access that variable and get the approximate time remaining on the effect.
Although that can lead to that the client think it is 5.9 s remaining on the timer, when the server actually has 5 sec left.
The end of the effect will always trigger on the server so gameplay-wise it is not a problem. However the visual counter of the time remaining on the clients will not be synced. The effect might be applied when the client thinks it is for example 0.5 s left.
I could have the looping timer set to loop like every 0.1 s to eliminate this problem, but that seems like a bad choice network performance wise.
Any suggestions?
i have a problem
again
i made my character move his head
and
it does replicate
i made it replicate
but it is jittery on client side
i followed exi's way of doing it and it is still jittery
Can I spawn bullets on the server from the weapon actor class or do I have to pass it through a player controller?
if weapon is attached to your character, which is possessed by PC
its ok
as long as the weapon's AttachedParent is in PC's chain its fine
if you're still not sure "No owning connection for" logs happen when its not fine ๐
Hello everyone!
I have an issue that I can't seem to figure out. Any help would be greatly appreciated
https://answers.unrealengine.com/questions/800158/character-rotates-slower-on-client-than-on-server.html
wild guess without reading; update rate is slower than tick
Thanks Zlo
@slim holly that's not it. Shouldn't even depend on update rate though~
thank you for reply though
Cant figure out why this isn't spawning when fired by the client. Anything look out of place here?
is it attached to your character? with name BP_Dynamite i'm guessing not
and if you need to send a Character reference through an RPC, better to put the ServerSpawnProjectile in it
Nah its a class that is spawned and then attached to the character. when the character mouseclicks, it runs 'event fire weapon'
less of a mess
Do what?
to move that function to Character, if it requires a character reference to work
So you think I should spawn the projectile on the player class? Because I was thinking about doing this but wanted to keep it inside the dynamite actor
if you can't access the player with GetOwner or GetAttachedParent
yes
i would in no case send a character reference via the RPC
Really? I do it quite often. Why would it be a bad thing to reference the character through RPC?
GetAttachParentActor
It's not bad to send something via an RPC
The question is, would you need to
Not fully knowing what's up, I asse you fire a weapon.
And you call an RPC
So yo uare owning the actor
If you want the Character that belongs to the weapon, either already set it when spawning
Or use the Owner
Usually, if you need something like a Character inside of the Weapon quite often, you simply create a character reference variable, set it to expose on spawn and set it on the SpawnActor node when spawning it as the server
If you don't spawn runtime, then have a function that you can call on the Server from within the Character
that sets the ref to self
The only reason I'm pushing it to the server is so I can get the transform of the player though. I'm just not sure why this isn't working right now.
I assume it has something to do with '(if owning client)'
Im working on an multiplayer shooter and the weapon has no ammo, instead it has heat and if reached 100% the player can't shoot.
The first Player on the Listen Server does it correctly and the client doesn't spawn bullet's that get's replicated via the server.
So now the Problem. The second Player Pawn on the Server side does still shoot bullet's and it heat bar never reaches 100% because my boolean "isFiring" is not consistently true and if false the heat percent goes down.
In the picture you can see my implementation.
the firing boolean is only set to false if the player stops holding the fire button and funny enough the OnStopFire never get's called when the client stops firing. The only other location where firing is set to false is in the constructor.
The Server does spawn the weapon and replicates to the client.
Is there a way to spawn hitboxes on server with physics enabled? e.g.
-
Instead of spawning a projectile (with mesh and all the other stuff), we spawn a hitbox that moves across the screen.
-
Instead of spawning a flame particle system (for flame thrower or fire), we spawn hitboxes that linger for a while (similar to wireframe mode in Cascade)
Hey all, Im tryin to figure out why my save game isnt being read when i start a dedicated server or when i join the server with a client
It's just UI and a level with characters in them.
It would be connected to the player
Make a custom player controller and make it so u can't move with it
That's how I would do it
the other player camera should also be centered
camera is not moving anywhere btw. it is fixed..
character modells are spawned correctly... and because client / game always spawn his player and his character first... that will be in the center in any case ๐
@umbral adder Unimplemented IIRC
?
It's not implemented
Fairly sure this callback is only defined and not actually implemented by UE4
Sorry, im using OnInviteACCEPTED not received
On Steam at least
youre right
On Steam, you'd accept the invite from Steam
Not from the game itself
I don't know if this is by design, or if Steam does offer an API to accept from ingame and you could implement it
there are some steam games that u can accept ingame, dota and cs from memory
but yeah, not really necessary
@umbral adder what you want to do with that event? show a notification that the person was invited?
Session plugin author confirms : "Not yet implemented by Epic, do not use this event yet"
That was in january 2016
@umbral adder if you want to do the world a service, implement it in the Steam online sub ๐
It's definitely annoying that this doesn't exist because it's the only missing link for full-ingame friends management
this and profile pictures IIRC
i remember i made a friends list for friends playing the game, then i linked steam dll directly, then i realized hardly two people would play it at the same time, and trashed it all
lol
Ironically, that AdvancedSteamSessions exist is probably why Epic won't have the feature in-engine
IS THERE A WAY TO CALL THE FUNCTION?
@umbral adder If you want that functionality you need to add it to the engine, check with the Steam API for a callback on receiving a session, and call the delegate yourself
That'd be inside the engine source
OnlineSubsystemSteam
@umbral adder You should be looking at OnlineSubsystemSteam.cpp
ok
And then other files in the same folder, and the Steam API itself
That's not exactly easy work so make sure you're ready to spend a week or two on this
i dont see the function
What function ?
Well yeah, it's not implemented
aka it doesn't exist
Technically it's a delegate, FOnInviteReceivedDelegate
It's defined in OnlineFriendsInterface.h
ok
OnlineFriendsInterfaceSteam.h/cpp is probably where you'll need to call it
Just start with the Steam API so that you can see which methods exist to get a callback on invite
That's the extent of my knowledge here @umbral adder , again, this isn't easy, you're adding a feature to the engine that depends on another library
Good luck
๐
is this how you guys do it? o_O
I feel there should be some macro to do the exact thing
called it predicted for the lack of a better word
Does anyone know why 'Run as a dedicated server' causes everything to break?
In the editor options?
what you mean "break"
break hit results?
Anyone have an idea what my cause this error
LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ValorCharacter_C_1. Function SERVER_OneOffBuff will not be processed.
@meager spade a client is telling the server to multicast, why would it matter if theres an owning connection
How would I send an array from one client to another?
and have it replicate across the server
the array is a struct that is tagged replicated
Is there any other way to replicate a sound cue so when I have people joining it will play on their end at the timeframe is playing on everyone else end? I have right now a replicated timestamp to know when the cue started playing. Works fine, but I was wondering if there was any other way
Its a long cue (story telling style)
hey guys!
just wanted to ask somethin very quick
I'm trying to sync objects that rotate at a constant rate
im doing this in bp
i basically check the ping / 2 and add the rotation rate to that...
do you guys think there is a better way of doing this?
replicate movement?
For syncing a firing of a gun on both clients/server do we generally use Multicast events or OnRep ones? Using CPP here.
For example, I fire on both the Owning Client and Server, and then I want simulated clients to also spawn the projectile. Do we multicast the projectile spawn and params?
depends, its a suboptimal solution with something like an automatic weapon
if you fire 300 rounds per minute, you'd end up muticasting every shot
in that case, it would be better to just replicate EWeaponState::EWS_Firing
and let the clients simulate the weapon fire
gotcha
now one last question, if it's a moving projectile rather than something fast/hitscan
would u take the same approach of just letting the client use it's own aim vector to simulate the projectile spawns?
obviously Server will still dictate who was hit or not
server will correct it in regular (and short) intervals
so yes, especially if the scope of the game is large
as in 8 or more players
that's only if I have the projectiles set to replicate then right? I figure it'
it's more efficient to have the spawn location replicated, but the projectile travel simulated
you can go and simulate those as well
ye so the biggest thing is just getting the right spawn location over
it really depends on how the result looks, and how much bandwidth can you afford to use
obviously it in theory should be small but with faster moving objects it could look wonky
yeah
I know previously when I did this on another game it was a multicasted event but the projectile was simulated completely only the event was casted
and there were times where a rocket could hit a falling object on my client but no impulse since it didn't on server
waves
hi
if its a replicated actor, then its a NetID, type, spawn location and impulse/velocity at very minimum
u talking about the projectile?
yes
I didn't wanna replicate them, only the spawn location and then simulate
so basically guarantee they spawn with the right location/rotation
but then let the client do whatever it wants with it
assuming clients aren't screwing with the projectile it should be close enough to accurate as long as we got the right location/rotation from server
i think simulating the entire actor will be just fine
as in, spawning it client side
obviously, for FPS requirements are much higher then for a top-down Twinstick shooter
seen it
I'm trying to somewhat emulate that type of environment in terms of skill casting
Introducing the newest god to join the battleground - Baron Samedi, God of Life and Death! Available in the SMITE 5.11 update. Get social with us at: http://...
generally, if your client's idea of its own location/rotation is too inaccurate, they wouldn't be able to hit anything
so there is an element of simulation involved, no matter what you do
yeah that's true
now that i think about it
uh, so would u fire that event using a multicast or OnRep
oh wait
nvm yeah i would just do a client event
have the server call a reliable client event
if its a bow, sure, multicast is good
if its an automatic weapon, i'd just replicate the weapon state
good part of the reason i'd multicast something like a bow or a spear is animation
you are likely to have a draw and release, so you can't just loop the thing
like you can with an SMG
Would anyone know why my Projectile Firing event is called on client and correctly spawns the projectile, but is invisible (or maybe not actually spawning).
it works perfectly fine on server
I see the projectiles spawn
I debugged and made sure it is being called on client, and the locations are being passed in
that's a multicast event
the handle
proj isn't null either
Whats multicast?
Is your Actor set to Replicate?
You shouldnt need to Multicast the spawning of Actors
If the Actor is spawned on the Server, the Clients will also spawn it if its set to Replicate.
No need to Multicast it
nah the projectile isn't because its simulated
unless there's a way to just replicate the spawn of the projectile without the movement
since it's wasteful for movement replication on that
oh if I just replicate without replicating the movement component, is that an efficient way to do this?
for a projectile
either way still strange that the client's spawned projectile isn't loading
okay nvm i confirmed my multicast event isn't running on clients it seems
ah i've been misusing multicast delegate
what exactly is a multicast delegate compared to a NetMulticast function?
obviously the former is a function pointer, but what's does "multicast" in this use mean if it's not referring to net intrinsically?
is it literally just a function pointer that u can hook multiple calls up to?
and if that is what it means, then what does "multicast" mean in the net version?
cause normally u only use it on one function when doing NetMulticast
what would be the most efficient way to update removed foliage instances to new connections? I was thinking of making a replicated array of instance indexes for removal, and replicating them on initial only, this sound right?
Sounds fine.
so this might be a potential problem... If removing an index during play re-orders the ISM array, then every index removed after the first will have a different index to an unmodified ISM array of a newly connected player, meaning a list of indexes would be incorrect
shiet
unless they are perfectly in order, and the re-ordering is not random at all
Anyone know how i can override the multiplayer PlayerStarts
or how to fix the multiple spawning issue?
@heady delta how many instanced meshes you have?
for some things i did i just recalculated the array every frame
sadly, unreal doesnt have a batch upload of instance mesh, so it can be slow
@summer nova actually hit another barrier just now with HISM update times due to the amount of instances I have, trying to figure now how to break the HISM up into chunks ๐
http://victor.madtriangles.com/code experiment/2018/03/25/post-ue4-ecs-battle.html check the instanced mesh update time here
Video Inspired by the new Unity ECS system, i decided to try those same techniques with UE4 and C++ instead of Unity and C# . For my experiment, i used the library EnTT to drive the ECS.
average of 2 miliseconds for 6.000 instanced mesh updates
faster on a built version
if you are going to use chunked HISM, arent you better just doing it manually with normal instances?
what is your use case?
Wow that looks like some impressive stuff.. I'm doing procedural pine forest, with the ability for instances to be removed by impacts. Roughly 40k per instance x 3
you could use a similar tecnique, except chunked
like, instead of having every tree, have it chunked on groups of 5000 trees. And dont touch them unless there is an update
i wanted to add some "batch" updates to the instanced mesh system, to be able to upload a fuckton of items at once
That is definitely the best and probably the only way to do this, figuring out how to chunk the instances, there is actually very little info I can find available but I know others have run into this issue
if you are having a lot of trees, i recomend you go into a data oriented approach. Basically have an array of tree data
no uobjects or actors
what you can actually do, is to use actors to "render" the close up trees
so you have a sytem with a bunch of pooled tree actors, and the trees near you are those actors
but the trees far dont have physics and are instanced mesh only
so essentially. you keep a data structure of tree data
the trees in medium distance are rendered through instanced mesh, tiled
and the trees in short range are actors with collision so you can mine/pick/whatever them
that could be something I might look at but could get complicated with collision testing for stuff in the distance
do you need collision testing at the distance?
aye weapon system does queries
you can do colision yourself
for weapons
you can write a ray to cylinder function and use your tree data array
bypassing physx completely
that would work, I'd have to have a fast way to access the data, I'm so glad I bought this mini whiteboard ๐
my recomendation is something similar to the hash grid i do in my simulation
works pretty well and its boundless
this thing but on 2d
becouse you probably dont need the 3rd dimension
or a classic quadtree
400 items
im only putting the spaceships into the grid
on my new simulation i run 40.000
but i had to change the algorithm so it multithreads well
It looks pretty amazing, I might not be quite at the level since updates are pretty rare for my case, but I'll see what happens when I break the HISM up
but that improves it. You can leave the grid saved and then you can read from it quite fast
you grid it all at the start, when you generate the trees
and then leave it there
the grid algorithm is hilariously trivial
you can look at the code
yeah I can imagine this probably opens a lot more doors with intractability too since removing and adding is really prohibitive right now
keep in mind im using an ECS there to get the entities of a type
but you would forget about the whole ECS stuff and just use a TreeArray
or similar
but then I suppose I'd have to get all the transform data from the HISM to create the tree data
๐ค
you could do that just fine
you can access individual instances data
but tree data is useful becouse it lets you give HP to the trees and all that stuff
Hmm this actually might be a lot easier than I was thinking, I wonder then does that mean I could have proper culling on the foliage, since HISM is basically always drawn
you can do culling manually if you want
but keep in mind the hit of updating instances
yeah
if you have the instances arranged by a grid
you can do a angle check
beetween camera and grid center
and if the angle > something, you dont render that tile
yep just add some time in there incase someone wants to spin on the spot like a crazy man
I'ma dig through this and see if I can learn something, thanks a lot for that ๐
oy vei..... is it not possible to use map type variables in multiplayer? I just saw a mouse-over that says Maps and Sets cannot be replicated, so that might explain why it works fine when testing alone as a server, but the engine crashes whenever I try to add a key to the map in multiplayer? :/ Any way to still utilize this, like if it only exists on server or something?
They can't replicate
You can still use them on one instance if wanted
Just not replicated
so if I just keep it on the player state and save game, and always access it with a Server RPC, should be OK?
You can keep it whereever you want
what about maps of strings to strings in multiplayer? I'm seeing a lot of issues w maps in general on the forums but any known issues there?
No idea
Maps aren't made for replication, that's all
Since that is the only "Multiplayer" part, I don't see why it wouldn't work
wow that stopped the crashes!
woop woop ๐
maps are cool... was afraid I'd have to come up with a less convenient approach to storing quest states
it could be because I was storing the map on a struct, so as part of taking it off of client-side actors, I took it out of the struct... so maybe that was the only problem
Why updating the HUD in a multiplayer game(New editor window, not dedicated server) doesn't want to update the HUD while it works perfectly in PIE?
It's a "local" HUD, the details about the weapon and a texture, so I assume it shoudln't be replicated. I'm missing something but not sure what.
Are you doing anything in terms of assume ClassA exists on the Client when ClassB accesses it?
Cause the timing needs to be proper
I think I'm doing al lthe castings during On BeginPlay
Where
in the player controller
Can you show what you do
ok... I'll try . Because I have a lot of things here...
K, usually it's a problem of accessing classes on BeginPlay of another class
E.g. Accessing GameState in the PlayerController
Or whatever combination
hmm
And then, in non-PIE you suddnely notice, that with a small delay, it's not working anymore
Cause replication isn't instant
(using a delay can solve the issue, but is the worst solution cause you can never know how long the delay could be)
wtf? with a delay I got the hud working... but it's working on the other player window!!! Like I change my weapon but the other player's hud gets the updated info
Well, then you have some problems with your replication :P
yep ๐
well, no it works in the pure clients but it doesn't work in the client+server
now
In a multiplayer game p2p, not dedicated, the client acting as server does like 2 passes, one for the client and one for the server or it's just the same pass?
@meager spade Sorry for the late reply, but: yes, UWorks does "support" parties. The plugin allows access to Steam's lobby functionality, which isn't the same as the regular UE4 lobby term. With those lobbies, anything can be achieved, from server advertising, to matchmaking, parties etc.
anyone know a way to Set Hidden in Game from server on a server-side actor w replication on and NOT replicate to other clients?
Was going to inplement it myseld but people highly recommend uworks for saving time and the fact it has been in the works for a long time
No rush, dude ^^ I'm here for any questions before you do (and after, obviously).
And thank you!
It seems pretty solid and the fact its expoded to both c++ and blueprint is really useful as i use a mix of both (with GAS).
Exposed*
Sorry on mobile and keep mis-typing lol
What do you mean by GAS? I'm not familiar with the acronym
Game Abilities System
it's a C++ only (at least in order to set it up, then there are some BP nodes after that)
system for gameplay abilities (spells, whatever) all set up by Epic with prediction and everything, mostly for multiplayer
Thanks!
Still looking for help with setting hidden on actors on server-side only, for example, a blocking volume, or a quest indicator, which gets hidden when a player completes an objective, but only for that player (even tho the object is world/server-spawned and so Owner-No-See won't work)
this thread discusses it, but the fix doesn't seem to work any more:
For gameplay programmers writing C++ code.
OwningClient it up
it's a server-spawned actor attached to another player's pawn
:/
or a world-placed actor (blocking volume) owned by the server
when your quest/objective is completed
do you at any point have a reference to both the actor you wish to hide locally and the PlayerCharacter / PlayerController of the player that completed the objective?
@proper olive
yeah totally
I've been trying to like, reverse the disabling via a multicast with another switch has authority on it such a mess
at that point, run on both server and client - if PlayerPawn IsLocallyControlled (PlayerController is LocalController) -> ObjectiveActor->SetHidden
it will pass the check only on the client that completed the objective
for a multiplayer game, does it matter if the input events are in the character bp or should they be in the player controller?
obviously, do not multicast from a PlayerController along the way ๐
not sure I understand @winged badger
@glacial lotus If you want to change (repossess) different pawns, then put it in the controller. But if you'll always have the same pawn (like not transforming into a rabbit) then you can use the character
APawn::IsLocallyControlled checks if the Pawn is possessed by a PlayerController that is also a local controller
its available in BP
but I know Is Locally Controlled
so
@proper olive Thanks
if the Actor you wish to hide got a say, Function call with Pawn input
Also I have a BP that's updating the HUD. It works perfectly for all the clients but not for the server+client(not dedicated server). Any general advice?
it could check if inPawn is LocallyControlled and hide itself if it is
I can check if the objective is completed no problem
it's just how to set hidden in game only on server without it getting replicated to clients
hidden in game is visual state
you set it only on the client that doesn't need to see it
not on server
but it's the server that needs to not see it
and I want other clients to see it still
same happens with a blocking volume, even tho I have it running on authority only, when it's there on server side, other clients can walk through because movement is server side
when it's not there server side*
so, ClientC completes the objective, and you want only the ListenServerHost not to see it?
ListenServerHost completes the objective, and I want only ListenServerHost to not see it
but other Clients to still see it
and if ClientC completes it?
then ClientC doesn't see it
but ListenServerHost does?
if it didn't complete the objective yet
right now that works
Client C can do it, nobody else sees anything change
correct function
but if Server does it, it happens to all
if it propagates yes
thing is
replicated Actors can execute their functions locally, on each client separately
without any networking involved, really
Tick() and BeginPlay() are a good example of that
they run on every copy of the Actor independetly
and in ClientC's world, the check for if Pawn IsLocallyControlled will be true only for ClientC's PlayerPawn
you should in no way replicate bHidden for this to wwork
Hi. I'm trying out replication for the first time and I'm currently creating a system that allows you to hold a button to open a door, everything seems to work fine until a non listenserver client tries to walk through the opened door, the collision seems to still be there and they awkwardly teleport through as if it is desynced
https://streamable.com/qqz0g
The weird thing is, the door seems to update its location properly on all the clients (and the server)
All of this was done in blueprints and I don't have any knowledge on C++, if that helps.
I cant find any reason as to why it desyncs like that
I have 2 cameras (both replicated) in the character. In local I can swap them (normal thris person view or zoom). However in multiplayer the pure clients don't get the caemra change. Ideas?
@twin juniper did you make sure to move the entire door upwards?
because if you only moved a component, it might create an issue. you would have to move the entire object including collision meshes and components. make sure to set the components to replicated. i had an issue with my door where certain components created blocking unless i replicated all components.
@twin juniper yeah I noticed, I was moving only the mesh and that caused the issue. Moving the entire actor fixed it. Thanks a lot!
Are onlinebeacons dependent on subsytems? and platforms?
@umbral adder Yes and no. You can connect to beacons through LAN, but over the internet you also need a way of finding them, similar to normal sessions.
Has anyone used the replication graph yet?
Anyone got suggestions on videos for how to add multiplayer to a project?
Just started getting into Unreal this week.
@autumn dawn there's a great tut on the unreal epic games youtube channel for this purpose.
got my game started with that.
look up unreal multiplayer on youtube, first result on the unreal engine channel that pops up is the one. wes bunn did it. smart guy.
@thin stratus beacons need ip to connect if i am not mistaken. right? Also do u need port forwarding?
In this video we take a look at the finished project and step through each of the features that will be covered in this series. We show our functional Main M...
Oh...
yep twarner, it's the one i used.
i moved on since then though, most of my multiplayer code uses advanced sessions.
Dont start with it if it is the lobby one
it is the yt series on bp multiplayer
Teaches wrong things
Idc who did it. If it is the lobby one it teaches a lot of wrong Things
LOT
Which one do you guys suggest I should use instead?
warner there are also good cpp tutorials for multiplayer. you can find them on udemy.
..
he just started so bp would be just fine
cedric's compendium on networking is goof
Budd
They teach wrong Things
He learns it wrong from the start
How is that remotely okay?
who are u talking to?
you mean the cpp ones?
confused
well i started with wes' tut. i since re-wrote almost all the code. so yeah i know it's kind of dated. you're right.
:D i said multiple times that the lobby video tutorial on Youtube is bad to start with
Thats all
@autumn dawn you will want to keep in mind there are basically two types of multiplayer in unreal everyone uses. listen servers and dedicated servers. if you go with listen servers, you will basically just use create / join session and if you use dedicated servers, you spin up the server on a remote machine and then connect to it using exec console command: open:x.x.x.x node. you can do all this stuff in blueprints too so you can try that out.
Stupid question. How would I go about doing the BP for it?
for listen servers?
take it easy and read docs and just google tuts and learn and follow
so you are creating a game, and you want someone to connect, right?
do you have a base game to start from first? like a structure?
In the future yeah.
@umbral adder yes
Not right now. Just trying to figure out how everything works with Bps.
i see.
ok look at these links : https://www.unrealengine.com/en-US/video-tutorials , https://docs.unrealengine.com/en-US/GettingStarted , https://www.youtube.com/user/UnrealDevelopmentKit/playlists?sort=dd&shelf_id=17&view=50
matt w provided that to me earlier when tutoring someone else those are the basis links you can use to learn unreal
Stupid question. Is it possible to make a complete project without "coding"?
yes you can use BP only
i did that for my game for almost a year
and it is advanced and fairly good.
problem - latency, native lag, advanced features
some functions native to unreal are not properly exposed to blueprints yet
and some functions you can have in CPP pre-written by others as code plugins, etc.
what kind of game are you looking to do?
For a simple game I was thinking something like a FPS game
because there are templates on the unreal marketplace that can really help you get started - you can also look at pluralsight tutorials to build up a template idea and then build from it for your game. i used a pluralsight tutorial for my space game, and built up functionality for a year
FPS eh? ๐
Tried doing it in Unity and I didn't really like it, lol
ok i am going to DM you a great.. and i mean great.. link.
@autumn dawn Yes, but keep in mind that BPs is coding too
It follows almost the same OOP rules since it is a child of cpp
And as gothicserpent said, you can easily come across non exposed Features which require cpp or at least a plugin
Cause you are depending on what epic exposed to BPs
Multiplayer is missing quite a ton, which you might find sooner or later
Specially session stuff but there are plugins if needed
i still wouldn't recommend doing a complete project in BP because what you end up with is a bowl of spaghetti
Wasn't that OnRep commit one of @thin stratus 's (very) recent requests?
@lost inlet Gnah, depends. I have a bigger project which is 95% BPs + some C++ where it was needed.
And everything is organized and commented. Now bowl there.
@fleet sluice Hm, not that I remember :x
a lot of beginners probably aren't going to do neat BPs with everything split into nice functions with comments
I remember someone here definitely trying to override an OnRep function in BPs and even posted a screenshot of a "hack" of some sort to bypass that.
Oh yes
But that was something else or?
The PR just shows a specific on rep being virtual
I cried about OnReps not being overridable in BPs
Yea. Don't BPs detect virtual as being overridable in children?
It's more about creating an OnRep in BPs
And the child BP can't override it
Which was possible in earlier versions
@lost inlet True, but would they create proper C++? :D
Oh wait, sorry. This was just an IsActive function. Yea, my bad. Makes sense.
hi, anyone knows a good tutorial on how to replicate vehicles?
@gusty raptor The Udemy UE4 multiplayer course
hhm thats pretty official,but ive no coins ๐
@gusty raptor Well it's definitely a very great read, get it when it's at the $10 price
Since that's Udemy's real price
That one BTW : https://www.udemy.com/unrealmultiplayer/
Includes source code for a basic MP vehicle
Do you need to make any changes to a listen server to make it redey to become a dedicated server? Like any diffrent code any were?
the ue4 c++ udemy courses are good
but remember how stupid shady udemy is, with their spam accounts, and their illegal pricing wich is 100% of the time at 95% discount to trick people
@final thicket Depends on your game
Oh how so?
Well dedicated & listen are different things, listen server is on a regular player so it's open to hacks and it needs to render clean & smooth gameplay, dedicated server is secure on a server & doesn't have to render stuff, so it might run at 20fps and it would still be fine, etc
It's not about changing code, it's about the arhcitecture of your game