#multiplayer
1 messages · Page 225 of 1
So this will work individually?
CharacterMovementComponent->SetComponentTickInterval(Interval);```
Nothing else needed. I am calling that from NPC char class
Test it out. Just make sure you're only executing that on simulated proxies.
How? Can you give an example
In an actor...
if(GetLocalRole() == ROLE_SimulatedProxy)
{
// Do stuff here.
}
What about if I want to toggle some components on/off such as noise emitter, movement comp, brain, blackboard, behaviortree? Do I do it the same way?
Blackboard and BehaviorTree only exist on the server, I don't know what brain is.
Try things out otherwise, as I don't really know either. See what happens. Some components you may be able to disable on clients and it'll operate as you expect them to still on the server.
Still learning, not developing games, trying to understand UnrealNetwork
Ok, but what would the ID you want to use be used for?
If you're trying to uniquely identify players, there is already a means of identifying a player in those online subsystems, and that ID is a means to identify a player regardless of what computer they may play from, what network they're connecting from, etc, and it's more of a hassle to do something that may already be done for you.
You can create a GUID which would be an almost guaranteed unique value (it's like, 1 in some absolutely huge number chance that it's incredibly unlikely to generate the same number twice within any reasonable amount of time). This can be assigned to a player, but how you keep track of which player is which then relies on you using some kind of authentication for a player to login with a user ID first so you know what GUID to use in subsequent connections after the GUID is first generated for them.
If all you're wanting to do is randomly assign an ID number to test replication and see that each player now has some value assigned to them, then you can easily generate a random number on the server in the Begin Play of your character. You'd set this variable to be Replicated w/ Notify and use the OnRep of that variable to then update the text render component with the now replicated value. The only caveat here, is that it won't persist beyond the lifetime of a character, so each time a character is spawned or on subsequent launches of the game, there's no correlation of the value to the player.
Thank you for your reply 🙂
I just wanted to know if I can assign some custom values to the PlayerState when the player joins the game. I would expect it to update the text component with the ID it gets from PostLogin.
Imagine an online role-playing game, your connection gets weak or disconnected but you are still playing in an old state of the game world. So you haven't fallen out of the game yet, but your world is out of sync with the world on the server. In this state you can still attack, you see the animation playing, but no damage is done to the enemy. You cannot get confirmation because you are disconnected from the server.
That's what I mean. Okay, the server and other clients shouldn't see it. But I want to keep the ID number from the first connection in my memory and use it in my local world.
Ok, so if that is what you're building out, it would require that you create some authentication system first and assign them a GUID when creating their account, or use an online subsystem which gives you an ID for that player (which in its own way is a separate means of authentication, like you login with Steam or Epic first and then play the game). If done without any authentication, then players would be able to spoof other players or provide invalid ID numbers to the server.
Also with how Unreal works, if you are using Unreal's built in networking, then you are normally kicked back to the entry map on disconnect, requiring you to connect to the game server again. There is no "old state" that the player would be playing in, they aren't there at all.
how do I set the server tickrate programmatically?
“There is no 'old state' for the player to play in”
that's good to know, some question marks in my head have been cleared 🙂
And, ID was just an example. Now let me ask pls: when a client connects to a server, can initial values be given by the server? If this is possible, how can we do it in a simple way? I'm not thinking of a specific game idea, I'm thinking of general scenarios
You can think of it as a function to get the player ready to play
That's what replication of variables is. It gives the clients the values that are present on the server.
If you're not using Unreal's networking however, then you probably wouldn't be using replicated variables, and in that case you have to follow whatever paradigm the system you're using has.
I think I know how replicated variables work. My goal is to ensure that data that is not constantly updated, that is only received at startup when the client connects to the server, can be used in its local world for the rest of its life. I don't understand the need to use replicated variables for this, I hope this is not necessary
Could Client RPC be what I am looking for? From what I understand, Client RPC seems to be a feature that should be used when the server needs to send commands to the client even after the first connection. Can't we solve this in PostLogin?
It really depends on what those values are used for. Even just sending out a value only once can still be something that may be better suited to be stored in a replicated variable in case the server ever needs to use that value itself, or that value does need to change in someway in the future.
"initial values" you can sometimes just trust that the client already has without the server sending it all either.
Like default non-replicated variables on a replicated actor class.... The client can use those defaults too if necessary.
Well, I will do some more research and read some more documents. Thank you very much for your time 🙏
Ok so I've got an interesting findings between "Independent" and "Fixed" Ticking policy ..
In the case of "fixed" .. pre simulation tick is being called on the bullet spawn by the non authoritative client ..
However, in the case of "Independent" .. its not
which means there is some problem somewhere between Mover or NPP .. which makes the Mover just not work when in "Independent" ticking policy mode
Only OnComponentActivated/Deactivated events are being called
anything else .. doesn't
in a 2 player game, how can i get the 'other' player state? im running this code from a component in the playerstate so get owner returns our playerstate, im comparing playerstates inside the players array to find the other playerstate but i think its just comparing if the classes are the same.
does unreal assign id's to players or anything like that so that i can retrieve the other player state in this case?
may i ask what you need the other player state for ?
Gamestate keeps track of all players PlayerState
as you've done
you just need to connect up the array element
also you dont need to store the initial owner, you can compare the player states to the owner directly
A player state that needs to know another player state?
If not don't correctly, this may happend
Hi, What is the most reliable and guaranteed way to tell whether a game instance is a client or a server? (C++)
GetNetMode?
void ALearnMPCharacter::BeginPlay()
{
Super::BeginPlay();
if (GetNetMode() == NM_ListenServer)
{
GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Cyan, "I'm, the Server.");
}
}
If so, why is this code printed to the screen twice?
Are there 2 characters?
You prob want GetNetMode != NM_Client
Results in editor may vary
Try launching as separate process ?
GetNetMode() != NM_Client gives the same result in the current case
What do you mean by starting it as a separate process?
Its an option you can select under Advanced Settings among other things
I guess that's it?
Not that one
!HasAuthority() && IsLocallyControlled() == Local Client
HasAuthority() == Local Server```
IsLocallyControlled = whether it's the actual local computer
HasAuthority = whether it's the server (which is always local)
...mostly.
these two = not the server, and is the local computer
Thank you, I unchecked the box and when I test I get the following result:
Game starts, server is the first player. The screen says I am the server.
Then the client joins the game and the server prints again, I am the server.
Actually the message only appears on the server, which is what I expected, and I like that. But why does it do this every time a new client joins? What should I understand from this?
The character exists both on the s erver and on the client(s)
in this case it prints because you're only checking for if we're on the server, and not wether this specific character is locally controlled
which was somewhat suggested by DudeBroJustin with the IsLocallyControlled()check
void ACharacter::BeginPlay()
{
if (GetNetMode() != NM_Client)
{
// Would execute on servers version of every joining Character
}
if (IsLocallyControlled())
{
// Would only execute on the controlled 'client/server' for this Character
}
}
With 1 listen server and 1 joining client there would be;
- 2 Characters on the server, 1 locally controlled (by the host), and 1 not locally controlled
- 2 Characters on the Client, 1 locally controlled (by the client), and 1 not locally controlled
void ALearnMPCharacter::BeginPlay()
{
Super::BeginPlay();
if (GetNetMode() != NM_Client)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, "I'm, the Server.");
}
if (!HasAuthority() && IsLocallyControlled())
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, "I'm, Client.");
}
}
The game starts and:
the server says “I am the server”.
The client joins the game and the server says “I am the server”,
but at the same time the client says “I am the client”.
The message printed by the server appears only on the server.
The message printed by the client appears only on the client.
This is what I expect, but I still don't understand why the server prints again for the new client.
because of this part
From the server perspective, all characters spawned on the server have a netmode != client (as it's the server)
I spent some time with an old MMO game with leaked source code, where the client and server source code were separate. If you wanted to make changes on the client side, you made changes to the client source code, if you wanted to make changes on the server, you made changes to the server source code.
In Unreal Engine, both client and server source code are in the same place, so I'm having a hard time understanding 😅
But I think I understand, so as I predicted, this edit in the code gives the output I expected:
The server only prints messages for itself.
The client only prints messages for itself.
void ALearnMPCharacter::BeginPlay()
{
Super::BeginPlay();
if (GetNetMode() != NM_Client && IsLocallyControlled())
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, "I'm, the Server.");
}
if (GetNetMode() == NM_Client && IsLocallyControlled())
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Cyan, "I'm, Client.");
}
}
Thank you very much for your time @hoary spear , @keen adder 🙏
is there a way to replicate a destroyed event on clients ?
If you're wanting to do something when a replicated actor is destroyed, endplay would be called on that destroyed actor on clients.
server as well.
thanks
My code runs fine in editor and in package game including shipping but completely breaks when launched using standalone mode in the editor, Should I be worried?
it's just part of the Actor in general
What part of it breaks?
Standalone should be nearly identical to packaged
I would be worried because there's so many diff PC configurations out there
It's possible that it could break for some other people who's environment resembles the standalone. Nothing worse than releasing a game to find out it's broken for hundreds of people.
I create replicated objects with their own properties using an actor component and enable input on client for those objects to add widget, modify their properties and so on on client side
So far it seems the input and server RPC doesn't work, properties within those objects replicates as expected
maybe it's about IsServer IsClient checks or smth like that
Yeah I would definitely figure that out, it's possible you're doing something wrong that is working by accident
Or a race condition that may work or break in different scenarios
gotta be 100% certain it always works
Is it normal that ~250 actors get that choppy on the client (right) running on the same machine? It is being run from the editor, but doesn't feel right to have such poor network performance in it. Tried PIE, Standalone, etc. - same thing. Tried different update frequencies (10-500) with no big change.
Setup is simple and nothing beyond what's shown is happening on the level (TPP template). I run Standalone net mode and then just create and join session within instances. Tried other modes for auto setup it gives but it behaves the same.
I'm assuming you're using replicates movement, and if so yes it is choppy
It's not really a result of lag ( it can be though )
Replicate movement doesn't offer any interpolation for you
So that desync is gonna be crazy
You need to implement your own method to smooth out the location through interpolation or whatever
Character Movement Component should interpolate things smoothly. The question is what Move Comp Cubes use?
I was "afraid" that's going to be the answer
simply set actor location (for now)
not sure, but maybe even replicates movement can make it smooth
have you tried with single cube?
tried replicates movement, RPC and repnotify - all with similar results
wait you cant use SetActorLocation, you have to use physics
i.e. force
MoveComp can predict velocity, not teleportation AFAIK
As far I'm concerned, replicates movement does not provide interpolation for you. And if you're making the entire project in blueprints, you won't be able to override the function responsible for setting the actors location upon receiving the new location
it's not that hard to make your own though
try AddForce node (every tick), though it's accumulative i.e. actor will move faster and faster, though for demo purposes it's fine
smart dudes call it acceleration 
single cube is ok, but there is small jitter going on. with 250 it seems more like a network congestion issue
I can handle C++
try 1. single cube, 2. low update frequency 3. noticeable distance for SetLocation
make it obvious that smoothness is a product of interpolation
and then use AddForce for mesh?
not sure I follow what this is for
have you confirmed that this setup isn't smooth?
by this
put aside Force
for now
update freq set to 1 and it obviously jumps between positions. but it seems to be overshooting or something, instead of cleanly being put in new position @little pumice
at least we know there is no interpolation (which is obvious tbh)
it was just too frequent
now use AddForce, but without "replicate movement" flag
it should be choppy as well, then replicate movement flag should fix that
unhook SetActorLocation and hook AddForce instead?
yes, thou you have to play with numbers
also there might be property for "max velocity" so it won't go crazy
in the movement component
though it's not required
didn't mention I have to add one
you don't need
if actor has "replicate movement" then we are fine
or there is a surprize for future us 
btw are cubes simulate physics and movable?
well. I need to enable physics (and disable gravity so it floats).
it can slide along surface, though more force required cuz of friction
also it should be possible to constrain movement to XY instead of gravity
though not sure bare AActor/Mesh provides this
I'll set aside that I do not want to simulate physics on those cause I do not want actor affecting their movement
but even like that it's not moving on the client
with replicate movement ON
I believe "custom collision profile" can handle this
ok, with component replicates it moves
not sure what you meant by actor affecting their movement
actor bumping into it and adding collision force
then this should do the trick i.e. new type, that ignores Pawn etc
imagine a simple moving platform. it doesn't (shouldn't) need physics to move if I don't want benefits of physics movement on it
but still, with force it moves similarly to setting location, doing "teleports" on client. BUT when I bump a character into it, the resulting movement from it is perfectly smooth...
predictable movement direction is one of the benefits
replicate movement enabled?
yes
single cube?
yes. this how it looks
not best at presenting but should be good enough to see what's happening
so when you push it, it moves fine?
weird, both Force and interaction with character is a physics driven movement
as presented
was confused as well when I saw it
show the AddForce code
?
{
if (FBodyInstance* BI = GetBodyInstance(BoneName))
{
WarnInvalidPhysicsOperations(LOCTEXT("AddForce", "AddForce"), BI, BoneName);
BI->AddForce(Force, true, bAccelChange);
}
else if (BoneName == NAME_None)
{
TArray<Chaos::FPhysicsObjectHandle> PhysicsObjects = GetAllPhysicsObjects();
FLockedWritePhysicsObjectExternalInterface Interface = FPhysicsObjectExternalInterface::LockWrite(PhysicsObjects);
PhysicsObjects = PhysicsObjects.FilterByPredicate(
[&Interface](Chaos::FPhysicsObject* Object) {
return !Interface->AreAllDisabled({ &Object, 1 });
}
);
if (bAccelChange)
{
const float Mass = Interface->GetMass(PhysicsObjects);
Interface->AddForce(PhysicsObjects, Force * Mass, /*bInvalidate*/true);
}
else
{
Interface->AddForce(PhysicsObjects, Force, /*bInvalidate*/true);
}
}
else if (Chaos::FPhysicsObject* Object = GetPhysicsObjectByName(BoneName))
{
FLockedWritePhysicsObjectExternalInterface Interface = FPhysicsObjectExternalInterface::LockWrite({ &Object, 1 });
if (bAccelChange)
{
const float Mass = Interface->GetMass({ &Object, 1 });
Interface->AddForce({ &Object, 1 }, Force * Mass, /*bInvalidate*/true);
}
else
{
Interface->AddForce({ &Object, 1 }, Force, /*bInvalidate*/true);
}
}
}```
I mean your code (BP nodes) 🙃
expanded the movement code so I could use it as a driver for oscillation with force, but other than that it's just AddForce. tried both accel and no accel
just to show the full picture, the accumulator driven by tick
well, maybe it only works for owners of CharacterMovementComponent 
UE works in mysterious ways
thanks for helping ❤️
btw it was smooth when Character pushed cube bc it was also pushed locally by simulated proxy 
turns out it was already working correctly the problem was somewhere else
I haven't read any of the previous conversation but tbh it seems like it would have been way easier to just turn of replicate movement, and then just multicast the new location evergtime it changed
And then just have clients interpolate the current location to the new location
ability cards have effect such as taking something away from the other player so to let them know about it i needed the other player state
I really wish they'd add more support for replicate movement but seems like it only works well with cmc for now
GMC 30p off…
I personally will be making MAi attack on it
$600 scam < override the implementation yourself
Jokes aside, if you can afford it I'd definitely say buy it
But i do think $600 dollars is some kind of a joke
It’s 30p off
Some people said for the effort it took to write gmc, the price is justified.
But I am not willing to spend that much money if I don't know it fit my use case.
How do you know if you can make it worth though
I’m the most determined man alive. And I don’t know cpp. So this is quite literally the only thing that could possibly work for me
40% of marketplace stuff I bought, I didn't end up using it.
It depends for me because by that logic games would cost $2147 dollars
And in many cases I just roll my own in the end.
This is what I was going to say tbh.
People looking for a way out but in the end the plugin may not be the way out.
Perhaps the only way out is just to bite the bullet and stop looking for shortcut
I was told my people that use GMC, it's not like you can escape cpp
We will find out in about 1-2 months after I’ve bought and implemented it into my project
Worth the dice roll? For me, yea.
Not to mention they could, at anytime stop support for it. And now you're down $600 and your project will never see thr next engine version with it
This ha happened before.
Just spend 2 weeks on learncpp.com and you can unlock many things your own, which cost 0 dollar.
The OG's might remember "move it locomotion system 2.0" which cost $300
All true possibilities but it’s got a pretty decent community around it. That’s bullish as they say
2 weeks is a lot of time for me
I don’t disagree with the basis of your points tho
It is what it is, it will take me years before I can call my self programmer
And so it is
All marketplace assets stop being supported eventually. Even the ones with the best reviews
Your call man, I just been through your shoes
If you can code properly in Blueprint and understand the idea behind object oriented programming, you're probably about 70% of the way to being able to work with C++ in Unreal. Mostly just a matter of learning the syntax, and figuring out what errors mean when you fail to compile 🙃
And I hate my self for going bp only
If I can rewind the time, I will learn it earlier
Most people fail at just the OOP part, hence why there's so many people that don't know how to get references, creating variables of "types" and not understanding what "Accessed None" really means, and then wondering what they should plug into casts.
I fully trust that I could learn cpp. I just don’t know how long it would take before I could have the same kind of logic as something like the GMC
I just think $600 is wack for a marketplace asset where their is no consequence of they decide to just abandon it
I actually feel quite adept with BPs at this point
But your issue is networked movement right?
More or less, advanced networked movement. Just being able to do all the fun stuff
$420*
someone talk me out of it
lol
or , take 420 dollars and build me the cpp equivelant of what i need, offer stands for the next hour lmao
I guess it's on sale for 200 dollars off (lol) but it's original price is 600
guess you better strike while the irons hot!
I would probably consider GMC for the custom collision it provide since cmc tied to the capsule comp
But then mover2.0 is out so 🤷
I actually haven't tried mover since it was initially released, wonder if it's worth using yet
I'm sure it will be in the future though if not already
Well.... A few things... To try and talk you out of it, but I wouldn't say these are dealbreakers.... (I can't really endorse the product as I haven't used it, nor do I have a license for it)
GMC requires you to use their built in C++ Pawn and PlayerController, meaning if you have other systems that require you to use their C++ Pawn or PlayerController, you're out of luck - you'd have to choose between one or the other. Other systems you have may also rely on Unreal's own Character class, which you also would no longer be able to use.
The documentation seems a bit.... light? It doesn't really give you any examples on how to use it, nor does it give you a breakdown of the API. They have a few "showcases" but not the code as to how to make such things as an example.
The discord is "verified" locked, so you can't even see what their community has trouble with, or see what people have created with it until after you've forked over your money.
A quote in the FAB description:
Implementing lag-free, server-authoritative multiplayer movement is a notoriously difficult task and very hard to get right - the GMC will help you immensely with this by automating almost all of the complex setup required for you.
Is almost all good enough? If there's more complex setup required, what is it?
Same, I'm already stuck with cmc. Can't afford refactoring or using experimental plugin
you referring to the anime project you're working on?
yeah
cmc surely battle tested but I wonder how people get around the collision issue
what if I want to have a dragon
which one?
the part where cmc only support capsule component for it's collision
oh yeah it's the worst haha, I actually have no idea how to get around that, I hate having to using the capsule only, but I've thankfully never been in a situation where I had a mesh that absolutely couldn't fit okayishly within it
blessed people that are making fps games
thats what GMC fiixes 😄
otherwise GMC wouldnt be a product
but isn't epic also working on something allowing all shapes in their move comp?
@hoary spear Yeah, I think if GMC is justified, it's the fact that it support custom collision
Mover 2.0 I think
Right right
The point was to find out whether there is some built-in solution. To avoid having to write something from scratch. But if that's necessary, so be it.
whats the difference between ?
#if WITH_SERVER_CODE
#if UE_SERVER
WITH_SERVER_CODE is 1 for game and server targets, 0 for dedicated client
UE_SERVER is only 1 for dedicated server
Probably the 3rd time this week I've mentioned that
I read net dormancy is broken in blueprints, is this true or does it auto flush?
It is not really broken, they just designed it this way... yeah it auto flushes on setting a property/variable
SEARCH_PRESENCE (\"PRESENCESEARCH\") is deprecated and will soon stop being a valid UE-defined key. Please consult upgrade notes for more details where can i find this fabled upgrade notes?
oh.. Deprecated usage of SEARCH_PRESENCE in OSS Sessions thats the extra info lol
Has anyone run into a issue where the player state don't get their owner (PlayerController) replicated?
For your own player state, no. For other players, absolutely, you never receive them.
lets say i got a listen server hosting a lobby, clients joined it
i need to transfer ownership, this means someone needs to be the new listen server.
whats the a good way to handle this ?
currently my idea is the following:
- Client 1 is the the owner target
- Client 1 goes load the lobby map as listen server
- all the other clients go travel to that map (but wouldnt this cause an issue since 2 same maps are hosted ?)
- "old" listen server leaves the map
since im using EOS for the lobby part, and that the client travels to the owner of the lobby using a special URL, i guess that if i change the owner of the lobby, travel with the playercontroller, and travel all clients using the special EOS string i might be fine
You're looking for "host migration". It is a PITA in UE
would my flow would work tho ? since EOS has a special string to use for travel
i still have to change level, but its fine
I think you might need to use a source build of the engine, and modify the net driver, world, online subsystem and probably the replication system for it to work properly
or switch to unity
it will take a long time to explain this but you know how host migration works
Yea all good points.
To add to my own talking out of it:
-
I’m on Mac and it says Win64 only for compatibility. Now I’m sure I could get it to compile but that’s a red flag for me. Any dev that’s serious should have all compatibility to me.
-
I def don’t love using their pawn / player controller although I did know about this already. My main character is actually a paperZD character, so I’m not sure If that would disqualify me from using it because I’m pretty sure that pawn is simple and based off the main character one. But again, slightly red flag.
-
if community and support is overwhelmingly great, then I’d prob make the move but hard to tell when it is locked like that
All in all, I think it would be worth it for the movement but there are a few semi major issues I’d have to make sure would not be a problem before I’d make the move
I’m down to give that a go. I’m sure it would be worth it and delgoodie does have like a full blown series on this exact type of thing in cpp. Always figured I could just dive into that and watch and copy what’s going on
Ye but even copy and paste is a challenge if you don't know the basic syntax.
You already use bp anyway.
Just learn pointers, functions and structs in cpp and you can attempt at copy pasting delgoodie tutorial
You can say goodbye to blueprint struct and unlock all the unexposed functions
That would be awesome tbh. And I do feel like I genuinely understand OOP / how refs work etc. so this could be a major unlock in general. But yea need to learn the syntax just from experience and doing it
I also have rider so that’s like a major help lol
While it only says Win64, it should technically work with all supported Unreal platforms
i.e. it runs fine on Linux, and I can't get into it too much but it has ran fine on some consoles in my experience integrating it on some projects
As for community and support, both are great
That’s what I figured, I’ve compiled a few things before that have said that and this does some like it wouldn’t have any dependencies that would stop it from working
Glad we have someone on the other end convincing me the other way now! Lol
hi, I have a question. I'm creating a custom server and I'm having a problem managing NPCs. I know that Unreal engine has a NavMesh system and the information I found for exporting NavMesh data was obsolete. So I'm wondering if it would be good practice to create the path to the player on the client side and send the data to the server so that it can move the NPC to the player?
Hello everyone, I'm using the Steam Advanced sessions plugin. It works only when a friend who has the steam port 27015 port forwarded on their router. But when I try to host a session, it doesn't work. Does anyone know how to fix this? For reference, I'm using steam app ID 480. I was thinking maybe I need to purchase my own steam app ID, but not sure if that's it.
I can see lobbies other people create, but only join them if they have port 27015 added on their router, when I host a lobby they can see it but can't join
would you mind asking the discord if there are any issues if im using the paperZD character class currenty? it's used for sprite characters and im assuming this will cause some issues given i would have to switch to their pawn, but i really wouldn't know as it doesn't mention anything about this
fyi, the sprite characters are 2d sprites but the world is 3d and all movement is more like a 3rd person pov, not a 2d world
Don't see anyone using PaperZD or Paper2D on the GMC. A quick look at Paper2D shows it's very much supported, no idea about PaperZD
Depends on if it does custom movement or not
Downloading PaperZD, I can tell you if it's supported or not pretty easily
Good thing it's free
pretty sure that the main thing it does is link animations for the character, i think the movement is just around the normal characger movement
super dope, ty
im using paper 2d as well of course, as they are used in tandem for some things
From the quick look at the code, it should be supported
You will need an engine tweak though
You probably would not want to do this, as a client could potentially tell the server there is no path, or just not report the path back at all.
It derives from APaperCharacter from Paper2D which derives from ACharacter
So you'll have to modify the Paper2D plugin to make APaperCharacter derive from AGMC_Pawn
ahhh ok dope, that seems quite straight forward
Could cause some compile issues
You do have option B though
You make APaperZDCharacter inherit from your own class, which inherits from AGMC_Pawn
and in your own class, you just copy what APaperCharacter does, which is not much
This would require less changes to the engine (basically none) assuming nothing else breaks by doing this
i actually think im using my own class, which was made from someone who just simply added replicated sprint and flying modes to the movement, (whcih of course, i'd just get rid of, and use the GMC for)
i mean, im def using a custom character calss, it's not the paperzd one but i think what you're saying is what was done, but i'd have to check it
PaperZD's code does require its character class to be used
But it would be simple to reparent their character class to use your own which derives from AGMC_Pawn
Basically you'd want this:
- Your actual character class -> APaperZDCharacter -> ACustomPaper2DPawn -> AGMC_Pawn
ACustomPaper2DPawn would be a class that just does what APaperCharacter does, and then derives from AGMC_Pawn
this way you reduce your headaches
yea this sounds good, i'd def have to make sure i know what im doing when adjusting those things but i think i'd be able to figure that out
`#pragma once
#include "PaperZDCharacter.h"
#include "MW_Character.generated.h"
class UMW_CharacterMovementComponent;
UCLASS()
class AMW_Character
: public APaperZDCharacter
{
GENERATED_BODY()
public:
AMW_Character(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
UFUNCTION(BlueprintCallable, Category="Character")
void StartSprinting();
UFUNCTION(BlueprintCallable, Category="Character")
void StopSprinting();
UFUNCTION(BlueprintPure, Category="Character")
bool IsSprinting() const;
UFUNCTION(BlueprintNativeEvent, Category="Character")
bool CanSprint() const;
UFUNCTION(BlueprintCallable, Category="Character")
void StartFlying();
UFUNCTION(BlueprintCallable, Category="Character")
void StopFlying();
UFUNCTION(BlueprintPure, Category="Character")
bool IsFlying() const;
UFUNCTION(BlueprintNativeEvent, Category="Character")
bool CanFly() const;
protected:
UPROPERTY(BlueprintReadOnly, Category="Character")
TWeakObjectPtr<UMW_CharacterMovementComponent> MwCharacterMovement = nullptr;
};
`
ok that's a lot to send at once, my b, but this is actually my current character's code
should be fine
should be fine, as in i wouldn't need to change anything from this ? other than what would change from deriving this from the GMC pawn ?
of course, when i actually do it (assuming i make the play), i'll really find out but just curious off a look
You'll have to rewrite the movement stuff
Also your components shouldn't be weak object ptrs
yea the mvoement stuff, i'll compeltely delete tbh
Thank you very much. I'll keep trying to find a solution
tbh, i think this code was most likely quickly done, i paid like 100 for it... but it got the job done for the time being. again, i didn't do the added movement stuff
curiuos tho what you mean
maybe i'll just dive into cpp for the next month while i learn the plugin. kill multiple birds with this stone. i knew the time would eventually come
yo , just taking a look at learn cpp right now, any advice on where to start ? loads of stuff here , but tbh i'd only be ineterested in unreal engine specifics. not exactly saying , give me the easy route, as i'll dive into it all over time but im curious what might be the best place to start ?
Learncpp.com , jumping to UE right away isn't a good idea.
Afterwards you can look into refactoring blueprint node tutorials by epic.
I’m a big dive head first and get overwhelmed but I get what you’re saying. Id ideally like to learn unreal engine cpp vs cpp in general
There is no unreal engine cpp
There is macro that will confuse you
In unreal engine
Also there isn't really any decent place you can start to learn the basic other than diving to cpp console program.
There's a well formatted tutorial already established for it.
I get it probably feel bad to leave UE but it's the step you should take if you want to learn cpp faster imo.
Btw I never finished learncpp.com
Just know enough that you can refactor blueprint nodes to cpp
"Beta or Experimental"
i am Confused. please help me.
yea essentialy, this is what im looking to undersatnd. the same logic i could come up with in bp's i just want to be able to underastnd how i could acheive that in cpp
but i feel you , i'll take that advice
Hit me in #programmer-hangout maybe I can help with the basic if you need to understand something.
super dope, thanks man i def will
or gal*
That will work for client only now. What if a player hosting the game for 2 other players?
Maybe they haven't updated in Engine
That branch will work for simulated proxy
So imagine 3 players, each owning a character
That code in player 2 computer will run on player 1 and 3's character
My response was mainly in terms of changing the CharacterMovementComponent's tick interval. You wouldn't want that to change at all on the authority (usually the server), nor on an autonomous proxy (the client who would be in control of the Character).
Checking if the local role is simulated proxy ensures that you would only be changing the value specifically on clients that have that actor as a simulated proxy (ie. not controlled by this computer). The actors on the server and any locally spawned actors on clients are always ROLE_Authority.
Would I be able to change the tick interval only for the host as well?
Sure, you should be able to, but you likely would not want to change the tick interval for something like the CMC differently on the owning client and the server as the server does things with it on its tick to handle client movements.
Replication is just the process of synchronising state between different machines
What you ask is kinda broad, it do depend on what you want to achieve and what system do you use(e.g if it comes with network stuff out of the box)
Imo the easiest one would be to just simulate the destruction locally
Server can initiate a force on chaos destructible for example and the client can simulate it in their own machine.
I didn't do much with it, just chop off some trees and rocks. Result is kinda simmiliar but you won't always get the same result as each player run their own world.
This is for your own player state
The onrep_owner never executes and no owner on beginplay. So all of our RPCs fails
You sure you have the right PS? Because that would imply you have no controller either
As soon as the current Server Player leaves/disconnects/etc. UE will move all Clients to their original start map. You usually don't even get the chance to swap ownership.
And even if you would get a single frame to react, there is nothing that supports this. The world will tear down and take all actors and their state with them.
You will def get a HardTravel for the clients and you lose the state of the game.
There is some "fake" Host Migration stuff on the Marketplace iirc. They save all the data locally, tell all clients who the new host is, and after disconnecting and being sent back to the Main Menu or so, they let the Client host again and load the state manually from the drive, and then let everyone reconnect.
Pretty manual, A LOT of data that suddenly needs to be replicated to that new host (especially data that previously only the Server needed to know about) and still two HardTravels for all players.
That's why, if you want to properly support this, seamlessly like other games, you will need to edit the engine. And no one really attempted to add that feature yet, mostly cause it's probably a pita to implement.
why cant i just take a client, load a map making him the LS, make the other clients travel to the EOS URL, then make the old listen server join it (without the listen param)
wouldnt that work since the listen server didnt disconnect ?
Loading a map with Listen or connecting to the new Server are HardTravels
but yeah getting the state back would be very annoying so ill probably never support this feature
but data can be stored in the lobby attributes so i can save important stuff there
The Client that calls open level with listen will disconnect from the original server
And everyone, including the original server, will have to HardTravel for the connect
yeah
Yeah so no one will really stay connected.
The state part is the problem
Not the connecting to a new host
yeah a dedicated sever would be the easy solution for that
well thanks for the extra insights
right now when I join a game it works well for the server but when I try to join from a client it starts on the 0,0 of the world and then tps to the correct position. I tried making a loading screen to be delayed 3 seconds to hide that but I'm not currently making it work so, there's another way to fix the spawn of the client to not make it look like that?
one way is to implement a loading screen and unhide the loading screen when the client possess a pawn
and I mean real loading screen, not a picture you slap to the viewport which get deleted on hard travel
The reason your client is at 0,0,0 is because he wasn't given a pawn yet by the server
tried to do it with this:
#include "Core/TGameInstance.h"
#include "MoviePlayer.h"
#include "Blueprint/UserWidget.h"
void UTGameInstance::Init()
{
Super::Init();
FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UTGameInstance::BeginLoadingScreen);
FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(this, &UTGameInstance::EndLoadingScreen);
}
void UTGameInstance::BeginLoadingScreen(const FString& InMapName)
{
UUserWidget* LoadingScreenWidgetInstance = CreateWidget<UUserWidget>(this, LoadingScreenWidget);
if (!IsRunningDedicatedServer() && LoadingScreenWidgetInstance) {
FLoadingScreenAttributes LoadingScreen;
LoadingScreen.MinimumLoadingScreenDisplayTime = -1.f;
LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
LoadingScreen.bWaitForManualStop = false;
LoadingScreen.bAllowEngineTick = false;
LoadingScreen.WidgetLoadingScreen = LoadingScreenWidgetInstance->TakeWidget();
GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
}
}
void UTGameInstance::EndLoadingScreen(UWorld* InLoadedWorld)
{
GetMoviePlayer()->StopMovie();
}
You can try unhiding the loading screen on AcknowledgePossesion for the client
but if I try to add a delay on the endloadingscreen if the map it's the main map doesn't work
at that point, the client would have a pawn to control (So the view would be the pawn's camera when you unhide the loading screen)
Highly recommend pulling CommonLoadingScreen out of Lyra.
I implemented it and works perfect, thanks :)
True but comes with hosting costs 🥲
There aren't any hosting costs with dedicated servers.
How ? You give the server files to people?
Correct. The cost only comes from a hosting service. Many games release dedicated servers for people to host themselves. You only need to host it yourself if you have a competitive game, and at that point money is less of a factor if you're big enough to even be considering that kind of game.
Course if you're small and insane you could host it yourself too, rip people on other continents.
have you any voice chat tutorial or can someone teach me
Yea as others recommended if you use common loading screen you can use the loading screen interface to force it to be shown when you start your teleport sequence
that being said - common loading screen needs some mods to actually be good
by default it just uses GT widgets which is complete ass, it doesn't use movie player so i'd recommend adding movie player support to it
I want to make phone call event. Murderer must call others and play a sound in their locations like dokkaebi in R6.
but something doesnt work
And that is?
Sound doesnt play in others
how am i getting a null actor being considerated in ServerReplicateActors ?
i am travelling from an empty level to the game one, im using seamless travel and loading it as listen server with a gamemode specified (the one used in the game level)
happens only for client
Anyone know how to take a manual UDP position packet to update character movement but that effects motion matching? I know how to move the character through several functions but none of them actually make motion matching play the walking animations, how do I update the position vector and have it run motion matching?
How to temporarily remove a subobject from replication?
I tried removing it by calling RemoveActorComponentReplicatedSubObject but once thats done it doesnt replicate again when adding it back with AddActorComponentReplicatedSubObject
CDOs are considered stably named right? I cant remember if they can be sent across the network?
Why not just send the uclass?
Not that it answers your question... just seems like you would not lose anything by just sending the uclass instead
Im dealing with a silly edge case with the old Damage system (DamageTypes) and GAS
GameplayEvents dont natively have the ability to transmit a class in the payload
I dont want to make a custom structure to handle that
what else can they transmit?
Instead just want to pack the CDO in the Optional Object
Assuming they are stably named and will be resolved
OptionalObject is a uobject... that can just be the uclass?
BP doesnt let you do that
you could just make some simple BP calleable that turns a uclass into a uobject ref?
but yeah I don't know if the gameplayevent would even serialize it correctly
Passing the CDO works in Editor PIE but thats not a good test since the CDOs are probably only being generated once for the editor, not for each PIE instance
makes me wonder how TSubClassOf serialization works
at a low-ish level unreal can turn some objects that get replicated into paths instead
Yeah I just started wondering that myself
iris turns them into paths that get sent as exports once as the entire object path
then afterwords they are much smaller agreed upon ids
I am not sure where exactly the distinction is made between "this is an object created and here's some data" vs "just get the asset/native class you have or load it"
the distinction is whether there's a stable name for the object
stable name = constant path that will never change or is in some way guaranteed to be the same for all connected instances of the game
whether it's an asset or not is irrelevant, that isn't handled at the same layer
so literally just IsNameStableForNetworking returning true or false?
yes
bool UObject::IsNameStableForNetworking() const
{
return HasAnyFlags(RF_WasLoaded | RF_DefaultSubObject | RF_ClassDefaultObject) || IsNative() || IsDefaultSubobject();
}
``` :0
it already considers cdos
and it knows about assets through RF_WasLoaded, but it's not some inherent property of them
stable name doesn't imply anything about how the object is accessed or loaded
it just finds them through normal find object/load object functions after the fact
so that kind of thing is decided after the fact on a per-class basis?
say, a static mesh pointer
I should have checked that function lol
not per-class. I haven't looked at the code but I'd assume it's just a bunch of StaticLoadObject calls
Cheers
or maybe a FindObject with the world as a search context, then a StaticLoadObject if that doesn't work
UWorlds have a field to be net stable
.... Would that be useful for travel or something?
that might just be used when UWorld is being used as a container for level assets on disk
since those would be stable
could be some enterprise situation with multiple uworlds or replay copied worlds
Hello, I'm trying to understand what are the cases where I want to use net dormancy. People say to use it when there's an actor like a tree in Fornite, it should stay dormant until some player interacts with it. However, what would it replicate to the player before it was touched either way? The initial health is known prior to runtime, so, unless the server tells the clients that the health was changed, it will be that. Why would I want to use net dormancy in this case?
the basic idea is similar to physics object sleeping
basically... don't waste time checking for things that changed when you are fairly certain nothing is near it or touching it
What if I use stack based replication method push model?
what does stack based replication method mean in this context?
Out of the box, the engine checks whether properties that were marked as replicated were changed since last update. In case they were, they'll be replicated to clients, in case they weren't, they won't, which means that the computer effectively did some useless work. We can change the replication method to the push based model, which makes us tell the engine what should be replicated instead, e.g. when we change a value
I suppose what you mean is... If something is net dormant does it send one "current state" of the object when someone joins in progress? Does that sound close?
No, that's not it
maybe just say push model here... I didn't know what stack based meant
It might be a term more used outside of unreal so forgive me if I seem ignorant lol
Oh, sorry, yeah, push model. I personally don't use it, I just know that it exists, so forgot the correct name 🫠
I think you can kind of see how this works with COND_InitialOnly
wdym?
these are properties that are only sent once for the first time an object is replicated
this is useful for things that never change but are still unique per object
Well, yes, but I don't get how that answers this question
even if you use pushmodel I think it has to dirty the entire object (all properties etc) to send the initial object to a given connection
Why would it send properties that weren't changed?
Relatively to the initial state
their initial state based on the class default or the previous state?
To the CDO
I am not sure honestly... I could probably see if Iris does that for you via delta serialization but the actor channel stuff seems like it goes through
UPackageMapClient::SerializeNewActor
I don't think that it replicates unchanged values relatively to what it has by defaults since it doesn't call their OnRep, if they have any
you could just run a net trace with some non-trivial cdo data (FVectors for example are fairly large) and see if it has to serialize them
I'm not sure if marking fields dirty persists more than a frame... like if it knows the value was changed EVER since the object was created
But either way, in case I'm using push model, is there any reason to use net dormancy?
seems like dormancy closes the actor channel entirely
Does it mean that it reopens it anytime I do a multicast or FlushNetDormancy? Sounds weird
it would re-awaken the actor until something makes it dormant again not the same as SetNetDormancy
Are you sure? In here you can see that after 10 seconds it calls FlushNetDormancy, which makes it replicate a property which is constantly changing, but then it doesn't do that anymore
https://youtu.be/18LbGKf6QQw?si=uGlMhTkIJsJUw_KI&t=321
This is a tutorial on how net dormancy works and how to use it.
Net dormancy is one of the best ways you can use to optimize the performance of your server, net dormancy mainly concerns replication.
The server constantly checks for properties to replicate and that could eat up your performance if you have a lot of replicated properties, cert...
ooh, FlushNetDormancy is just for sending the data and not awakening it
Yeah, you use SetNetDormancy to change that
Where did you read that it does this?
also fwiw actor channels are going the way of the dodo eventually
Iris is replacing that entirely... Iris still supports dormancy though
However, if I set the dormancy to DormantAll, the actor will still trigger the replication events
e.g. RPCs, right?
So dormant makes so that properties are not automatically replicated, but the replication can still happen if the client is relevant?
If you Flush dormancy or “wake” the actor, then you must set it back to dormant if you want it to go dormant again, otherwise it will stay awake
It seems to contradict this
it seems to depend on which dormancy mode it uses going by vori's article I linked
To ensure incoming connections get the new values over DORM_Initial Actors, you should call FlushNetDormancy on them after updating their properties. This will make the Actor to become DORM_DormantAll but only when strictly needed.
I don't get how this makes sense. So, if I have a DORM_Initial actor, and I call FlushNetDormancy, it will make the dormancy to become DORM_DormantAll? I thought it's supposed to be dormant until I start replicating, in fact it's initial dormancy, why does it become dormant for everything?
Edit: there's an explanation for that in Epic docs
Once a statically placed, initially dormant actor has been awoken, you should not set it back to ENetDormancy::DORM_Initial. Use ENetDormancy::DORM_DormantAll instead.
just go read the ENetDormancy header I guess
So, if the NetDriver is Null at the moment you call ForceNetUpdate
When is NetDriver initialised? Why would it be null server-side?
Yeah, I feel like even with many different sources I would need to test things on my own to see whether any of that information is incorrect
To me it's kind of like... there's not really a "I am currently dormant for everyone" as much as an indication that they want to be... it's kind of per-connection
DormatAll means that it's dormant to every single connection. wdym?
Even reading their official docs they aren't mentioning all the cases when the actor would be replicated. In fact, it will be replicated if the actor fires a multicast RPC 🫠
https://dev.epicgames.com/documentation/en-us/unreal-engine/actor-network-dormancy-in-unreal-engine
It kind of stands to reason that you need something for the rpc to hit
hence multicast rpcs being a bit violent
True, but still, you might run into that, and think why properties are being replicated without an explicit flush
Vori's article and Epic docs 🫠
it's a moot point to do it before or after I think
most netcode busywork is done later in the frame so doing it before or after won't matter I assume
Yeah, I feel like net driver would check the fact that something was changed the next frame or something
not the next frame... the end of the frame is when net broadcast happens
it's a bit similar to render dirty
Gotcha
you should just run insights and look at where network stuff is called to illustrate this easily
Yeah, I still need to get used to profiling networking
Rendering was the biggest problem so far, so I only have done that
this isn't even for packet profiling... just to see when functions are called
Oh, yeah
When do you want to use DORM_Never? I see that there's only one place the enum value is used, and it's inside ABandwidthTestActor. Does it mean that it's effectively the same as using DORM_Awake since all the engine code uses the AActor::NetDormancy with operator> or operator<=, e.g. no direct comparison against DORM_Awake?
That's applied in GameplayEffect, so that must be the correct approach
Bump?
Hello can someone guide me to the solution of how can I give the client a pawn when I seamless travel?
because now only it doesn't have the pawn by default while the server does
please why is my client's pawn getting destroyed through the server travel
[2024.11.29-20.27.04:512][ 0]LogBlueprint: Warning: Blueprint BP_Rifle (child of/implements BP_EQUPITABLEMASTER) has a function graph with a conflicting name (Get Current Default Spell). Changing to Get Current Default Spell_0.
Excuse my spelling, but how can i get rid of this error message ? it still works but this was becuase i changed a structure, but i never changed the name ? kinda strange error , but again, everything is working , just not sure how i can ensure this doesn't end up being an error i get later when packaging or something
changing a bp struct or re-ordering them is like defusing a mine
one of the reason to never go full bp is because of bp struct
I am not sure if that error has anything to do with struct though
the warning just says ther are function with the same name
yea, this only happneed after i changed the "spell struct" and then that partiuclar function gave an error, but after i recompiled / refreshed it, it was fine, but yea i figured it was dreaded struct change
there's another one where i get a similar error but it specifially states that it's an "unknokn struct" but in the logs it ends up finding the right one, just not sure how much i should worry about that
oh you should, you wouldn't be able to package your project with unknown struct error
the bp struct curse continues
christ
declare the struct in C++ and you will enver have to look back
it does give me a recommendation to add the struct to soemthing, i'll have to relaunch to see exactly what it's saying
changing or re-ordering bp struct can corrupt your project / restore existing overriden values in assets / unknown struct error / something else that other people experience
solution is to never use bp struct, it's been broken for forever
and will never get fixed
insane considering how many structs im using
so, to fix that would i need to like completely redo the struct and just reimplement all of that ?
or declare it in cpp like you mentioned ?
The worse part is the error is silent. Like you would just keep making your game for months and when it comes to packaging, UE went sike
not having bp struct and declare them in cpp
100p, if i didn't scroll through my server log i wouldn't have seen it
what UE version are you at btw?
5.4.4
i could try to rebuild the project and maybe that would solve it
No it will not
why would that fix your issue?
lol i have no idea, maybe it would realize it's being dumb
only solution is to not use bp structs at all, just use cpp to declare your struct
im using so many enums and structs
lmfao
im done for aren't i
even worse, im using enums inside of struxts
make a new one in cpp and replace them
ok guess this could be a solid first cpp mission for me
im assuming i'd need to get rid of all of the places im using those structs ?
that's a lot of places
yeah unfortunately
but at least you can package your project, don't forget to commit to your source control too before you start the proccess
yea worth it of course, but man, that's a legit issue
that i dont understand could possbility exist, cause they are fundemental things to the engine
well you are not the only victim, I had re-done my work too, many times over.
The error kinda just says that a function has a conflicting name though?
yea true, but there's one that i ddin't send over that it related to it and it's pointing to the struct beign used, and says "unknown structure"
although, in this exchanging of logs at the end it does find the right one and tells me to add the struct to something
i can run it and send the exact error
Hm ok. What you can try is to restart the editor, don't open the mentioned BP, but simply right-click it. Find the Reload action, probably under Asset Actions, and then right-click again and save and restart the editor once more.
More or less trying to flush out anything that shouldn't be there
Could be that you renamed a struct asset and it wants to you add it to the redirects
i believe this is what it says, although i didn't change the name of the struct, rather i added a new entry into the struct
im restartig rn and will post the actual log just so it's clear
tried the reload option and it even says "user created structures cannot be safely reloaded"
Lovely
[2024.11.29-23.36.58:930][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/CHARACTER/SAVE_GAME/PlayerInfo_SG.PlayerInfo_SG_C:Owned NFTs.Owned NFTs'. Unknown structure. [2024.11.29-23.37.00:818][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu.W_NFTCartsMenu_C:Current Selected NFT'. Unknown structure. [2024.11.29-23.37.00:818][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu.W_NFTCartsMenu_C:Set NFT info Texts:NFT info'. Unknown structure. [2024.11.29-23.37.00:818][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu.W_NFTCartsMenu_C:Set NFT info Texts:local nft info'. Unknown structure. [2024.11.29-23.37.00:818][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu.W_NFTCartsMenu_C:Update NFT Info Text:NFT info'. Unknown structure. [2024.11.29-23.37.00:841][ 0]LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu.W_NFTCartsMenu_C:ExecuteUbergraph_W_NFTCartsMenu:K2Node_CustomEvent_NFT_info'. Unknown structure. [2024.11.29-23.37.01:171][ 0]LogClass: Warning: Struct Property Current Selected NFT has a struct type mismatch (tag STRUCT_REINST_S_SongNFTInfo_71(/Engine/Transient) != prop FallbackStruct(/Script/CoreUObject)) in package: /Game/MAiBLUEPRINTS/UI/W_NFTCartsMenu. If that struct got renamed, add an entry to ActiveStructRedirects.
this is the series of logs
don't be scared of the acronym gents
If you think you'll ever have any amount of C++ in your project, just put your structs in C++ IMO
i already do have some cpp , and my project is already converted to such, so yea that's probably going to be the move here
again, would i just be recreating the struct ? or is there like a way to convert it to cpp ?
I would recreate, dunno if the conversion thing is even possible
cool, luckily it's only 1 struct and it's relatively new. now if the spell struct got confunkled..... urgh...
You can get a lot of mileage out of a YourProjectTypes file with all your structs and enums and a BPFunctionLibrary in it
this sounds appealing, and i just peeped that link, yea very confusing to look at as im still omega noob w cpp, but again, this is a good opportunity to dive in with something relatviely simple to create
The point is that you can just have a one stop shop for whatever system you're making, with all your basic types and BP callable functions in it
then it's trivial to move the slow stuff to C++, just add a function to the function library and reimplement it in C++. Great way to learn
this all sounds great. wish i actually understood fully lmao
im a hands on type of learner, so i just need to try something like that
Here's a simpler one. Just a structure and enum.
https://github.com/AdrielKinnunen/SpectrelightPlugins/blob/main/Plugins/SLVision/Source/SLVision/Public/SLVisionTypes.h
ok ok, i can semi understand this one, can def see where the struct is and the enum is haha
so the struct has two variables for example? a vector2d "origin" (which ive never seen) and a vector2d array of vertices? (also, which i've never seen)
and the enum has two entires? circle, and directional ?
also, i realize that wasn't exactly the point you were making, but im just trying to see if i can look at that and undersatnd it lol
Yeah the struct has a vector2 Origin and array of vector2 Vertices
I'm doing 2d vision / fog of war
ahhh ok dope, very cool, glad i could semi regonize that
the syntax is legitmatley the only thing i need to understand in cpp
which i guess is obvious lol
can somebody please help me with advanced sessions?
everything works in standalone game but when i open my packaged project and then tried it and created a session it brings me back to wherever my default map is.
Check the logs, it probably fails to load the map. You can manually add the map to be packaged in the Packaging settings.
thanks
hi there ! I'm looking for either a plugin or a basic template for multiplayer 🙂
I wanna create a very small experience, just run around in multi with some friends in unreal
woudl you have any ? thanks !
Character movement component already handle networked movement
look on how to setup session and lobbies then just play as the default character, all of yous can run around with that
ah ok thanks cool
Yeah because i was wondering like i guess i would just be hosting the session but they would have to have unreal already right ?
you will need to package your project and give them a copy
also the connection will depend on the Subsystem you used
https://www.youtube.com/watch?v=Iefxj6tgDgI maybe i could just grab this
A gift for all the support from our subscribers! 🙏
Thank you for watching! Please subscribe for more!
Project Files:
https://drive.google.com/file/d/12j9EUjPwGQ3hJMCIdi6dQMhLRBRm23ik/view?usp=sharing
Locomotion available on the Marketplace:
https://www.unrealengine.com/marketplace/en-US/product/basic-locomotion-system-replicated
Tutorial Play...
I recommend using Steam and uploading your build there. You can then just send your friends copies
oh i see amaizng
ah ok amazing but i won't need a steam game page right ? 😉
no but you'll need to pay the fee for an appid
ah ok i get it thanks 🙂
also the overwhelming majority of youtube tutorials are unadulterated trash
iirc you can use the test appid
so you don't need to pay $100 yet for your own app id, until you are ready to do so
AH free then ?
ah amazing
yeah especially my friends will maybe don't want to play long ::
yes but it is region limited iirc
you will be sharing sessions with everyone that usses the app id, but you can just apply filter so you get to see people that host your game
Hmm, iirc I played with my friend from other country
i woudl be the hoster we areall in france
but maybe you are right, I don't know for sure. It will still be enough to test games. There's no need to cough money to test the water imo.
It is about "download region"
What to download?
so if you and your friend will set the same region it should work
ok great i hope they are not too noobs
I am reading about it and people are talking that region lock is based on "download region" setting on steam
there is a setting for that iirc
yes it is
anyway it's enough to test with friends from the same country
https://www.fab.com/listings/2d9d26e3-ce4e-43ce-b313-1e7bd93e0112
Sorry i hope you won't break your monitor
What about this
NEW v3.5:Battle Royale Game Mode (Pre-Alpha)Improved 3rd Person AnimationsImproved Weapons/AnimationsImproved ADS weapon recoilParachute System (Press O)Down/Revive SystemImproved CompassOptimized For Performance (increase in frame rate)v3.5 Full List - Full Listv3 Full List - Full ListDEMO | DEMOTRAILER | TRAILER GAME MODE CREATOR VIDEO | WALK ...
https://www.unrealengine.com/marketplace/en-US/product/easy-multiplayer-lobby or even simpler this one
How far are you in multiplayer?
no where
then you probably won't learn or gain anything from plugins
touch basic replication first
read the pinned material in this channel.
Exi's compedium and Wizard tips and trick
oh ok amazing forgot about the pinged stuff thanks again i'll check it out
I think going into plugins without any basic knowledge is the most bad decision to take to learn something
is server travel broken in 5.5?
I am having same problem as this guy
https://www.reddit.com/r/unrealengine/comments/1gwedes/packaged_server_travel_broken_is_55/
It used to work in 5.4 but now it does only work in editor but not in build
[2024.11.30-16.38.39:596][838]LogLongPackageNames: Warning: Can't Find URL: Test_Level_WP: . Invalidating and reverting to Default URL.
https://www.unrealengine.com/marketplace/en-US/product/easy-multiplayer-lobby HI there i have this plugin
But any idea how i can send it to my friend so we can both play in the same world ? tahnks !
Should i package the game or send him the full unreal project ?T hanks
i guess i can't just do that i need to use EOS or steam right ,
In My Multiplayer Game that I am working on the Game uses a "Tab Target" method of combat, Players will select the target and the abillity that they choose will fire towards or on that target,.
For this where is the best place to store the "Current Target"
When Storing This Variable Refrence within the Player Character The Server is able to get they location and fire the projectile, however connected clients are firing towards world 0, despite having a selected target.
When Storing this variable within the Player Controller Both Players will fire towards the Servers current Target.
The Calculations to Fire towards the targets position is done within the Player Character
The More that I think on it ^^ This would be the cause because the server cannot read from another players Character. So the Server needs to know the reference to find the world location, but then that leads me back to the issue im having with the player controller
If a client is connected to a server, can a function running on the server-side client character run a function explicitly on the client-side client character? I tried using the Client function specifier but that didn't seem to function properly, the function never ran after being called
Show what you have
This UCollabAbilitySystemComponent::GiveCharacterAttributeSet() is only ran on the server, but I need to make sure the client also gets bound to this delegate
So I created UCollabAbilitySystemComponent::Client_OnAttributeSetAdded() for the server to call to pass the attribute set to the client so it can bind to it, but it never fires
@meager heart did you check if you get a valid attribute set?
Yeah the attribute set is valid for sure
The breakpoint never fires on the first line of the client function though
Client RPC should fire on the owning client
btw do you need to write the _implementation on the header?
i am not aware of this
nvm you probably do
I haven't use a single client rpc soo far
only from blueprint, which fires
I don't think so, I wrote it in after my first try failed, just in case it was maybe affecting it
But i didn't get different results from either one, but both built properly
@meager heart is this for the actor owned by the client? not some A.I right?
becauase client RPC only fires on client that owns the actor
Yeah I'm actually wondering now if the actor its firing from is my second client, or actually the simulated proxy of my server client
probably test with 2 players, 1 listen 1 client
the breakpoint should trigger though even if there is only 1 client
hopefully someone else know the issue
@meager heart mine triggers
void UAGAbilitySystemComponent::AbilityActorInfoSet()
{ //** Bind Delegates here **//
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, &UAGAbilitySystemComponent::EffectApplied);
auto GameplayTags = FAGGameplayTags::Get();
PrintHelloWorldFromClientMachine();
}
UFUNCTION(Client, Reliable)
void PrintHelloWorldFromClientMachine();
void UAGAbilitySystemComponent::PrintHelloWorldFromClientMachine_Implementation()
{
UKismetSystemLibrary::PrintString(this, "Hello World, from server after ability actor info is set");
}
Thanks for loading it up and trying it out, I appreiciate that! 😄
Good to know it should be working... I wonder why mine isn't
It looks like this is where mine's early returning in UObject::ProcessEvent()
The callspace isn't correct maybe? Not sure what that means
Ah this is ultimately what gets called in AActor::GetFunctionCallspace() on the owning player state
@meager heart I have no idea, my cpp is too basic.
AbilitySystemComponent = CreateDefaultSubobject<UAGAbilitySystemComponent>("AbilitySystemComponent");
AbilitySystemComponent->SetIsReplicated(true);
AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Minimal);
This might be dumb but have you set your ASC to be replicated?
0o
Oh my god I swear I did, maybe I didn't?
that might not be the issue though
Oh i think it happens when it's created yeah, not the issue there
would be suprised if ASC not replicated by default
Yeah it's replicated, something about the net owning player / net owner it seems, I'll do some more looking into that
Thanks for testing it out for me!
sorry that I can't help, hopefully someone else jumped in
perhaps check if the ASC already have it's avatar and owner set
the owner of my ASC is my PlayerState
Yeah that's mine as well, good point though not sure if that's set at this point
I think I actually got it working based on what you sent, I copied the logic to fire on OnAbilityActorInfo() when the pawn is first initialized, and then I kept the code where I had it previously so that if any attributes are added at runtime those will still fire properly then
This works because the pawn actor is valid at this point so I can bind to all of the found attribute sets
I'm having an issue where input isn't being accepted in my listen server, this is how I'm initializing my UI and setting the input mode to UI in my player controller class, is there another place/way I'm supposed to do it?
With this setup clients CAN take input, but when they die and respawn they behave the same way as my listen server where they don't accept any input at all and the cursor isn't consumed by the window
And also if I don't have the SetInputModeGameOnly() function call, it works on the listen server and NOT the client, and again when the working player dies/respawns it breaks again on their side
why do you have declared _Implementation header? You don't do that. Just:
UFUNCTION(Client, Reliable)
void SomeClientFunction(float arg);
// in cpp file
void SomeClientFunction_Implementation(float arg)
{
///code
}
maybe that's an issue
Yeah I added that as a failsafe when I first hit an issue in case that was a problem, but it didn't make a difference
And luckily I did figure out the issue, it was because at the time that function was being called my player character hadn't actually been spawned which was causing a problem for finding a netowner to call the function on
that was the second thing I wanted you to check
Hello, does anyone have insights on why my Unique Net ID gets ruined when seamless traveling on the client?
I knew this seamless travel will be trouble with how many things it screws up 😵💫
I had to save my unique net ID and set it again
turns out the idea of the seamless travel 'preserving' information works exactly opposite to that 😅
try using player id.. that might work better
I needed the player ID for the find session advanced
so that I can go to the practice level and still be able to search for sessions there
hey, has anyone made a Local MP game with Enhanced Inputs, Unreal 5.4?
My controllers are working fine in the Engine as second and third player (keyboard is 1), but as soon as I build, they are not recognized, either playing the build or putting it on Steam for testing. Wondering if anyone has any experience with that?
Hallo guys!
I am having this issue when trying to destroy my Item actor. When interacting with the item it checks if can be added and then if true Server destroys Item. This event gets executed by the server proved by debugging, but when it gets to the destroy the engine crashes
thx for any help ^^
What does the crash message look like
I sry, just found the error lol, I had a event called after to that referenz, and since the ref is lost trough the destroy it would be a null and crash the engine XD
hahaha
thx though ^^
np
hi there !
so i'm just trying to understand how to make a very simple lobby to invite friends from the same region (but not in LAN) I need to get EOS setup, do you have a working tutorial on how to do that ? thanks a lot 🙂
https://www.youtube.com/watch?v=Fd9m4cG2hnU like this one is great but apparently doesn't work anymore from what i see in the comments
Unreal Engine 5 Epic Online Services - Set Up EOS for Your Multiplayer Game
Set up Epic Online Services for your multiplayer game!
Epic Online Services Dev Portal:
https://dev.epicgames.com
EOS Documentation:
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Online/EOS/
Multiplayer Plugin:
https://github.com/DruidMech/Multipla...
ok i found something i guess ill try
use OnlineServices and not the subsystem
OnlineServices is the newer version
ah ok amazing didn't know
do you have a tutorial on this ? https://www.youtube.com/watch?v=FJePnvi47O8 i tried with this one as well but i'm having a please recompile manually error..
#coding #programming #unrealengine5 #ue5 #html #css #ascentcombatframework #gamedev
Support me on Patreon: https://www.patreon.com/CodeWithRo
Join my Discord Server: https://discord.gg/gZH4JDpgdT
Donations: https://ko-fi.com/codewithro
Synty Store: https://syntystore.com/kb/CodeWithRo
Business Inquiries: codewithropatreon@gmail.com
Epic Online...
honestly just the docs
ah ok 🙂
not easy at the beginning
no there is a paid and free version 🙂
oh no yeah i thought it would simpler
I just want to have a basic lobby to get my friends started on ue5 and invite them to imagine a multiplayer game togehter
yeah for starter it might take you a week
because you need to setup the app, login, and create/find/join the lobby
https://www.fab.com/listings/0e58c723-7c91-46b5-ac6a-ac35a70c3bfb i also have this basic template maybe i could use this ?
Welcome to Parkour Race! 🏃♂️💨Parkour Race is a fun 100% Multiplayer Blueprint Party Game Template - Make your way across moving platforms, jump pads, rotating beams and bridges that suddenly open. The first player to pick up the trophy is the winner! 🏆Trailer video✅ Parkour Race is a beginner friendly, Plug & Play multiplayer party game templat...
ah damnnnn
i can send you some code if you want
might help you to check the classes and methodes
i had a interesting conversation with someone who helped me getting started, you might want to read the message starting here #epic-online-services message
https://www.unrealengine.com/marketplace/en-US/product/easy-multiplayer-lobby what about those ones https://www.fab.com/listings/2d674a6e-deb1-40db-8911-3fe02dec0fd3
Skip setting up your Multiplayer Lobby system and dive straight into making your game!
What is the Modular Blueprint Lobby Solution? 🚀👾The MBLS product is an advanced multiplayer lobby solution that includes features such as: Hosting and joining games, lobby game settings (match settings), player list, character customization, a ready up system, kicking players, multiplayer chat and much more.🔎 See an advanced feature list down be...
thanks a lot amzaing ill read that 🙂
sure that would be much appreciated: )
it says it has EOS integration in mind but i don't really know how to configure it
just make it yourself man
its not much
and highly configurable
cached stuff:
// Cached needed interfaces
OnlineServices = UE::Online::GetServices(UE::Online::EOnlineServices::Epic);
OnlineAuth = OnlineServices->GetAuthInterface();
OnlineUserInfo = OnlineServices->GetUserInfoInterface();
OnlinePresence = OnlineServices->GetPresenceInterface();
OnlineLobby = OnlineServices->GetLobbiesInterface();
login:
void UTFCOnlineSubsystem::Login(FString ID, FString Token, FString LoginType)
{
if (OnlineAuth.IsValid())
{
FName LoginTypeName = "None";
if (LoginType == "Developer")
{
LoginTypeName = UE::Online::LoginCredentialsType::Developer;
}
else if (LoginType == "PersistentAuth")
{
LoginTypeName = UE::Online::LoginCredentialsType::PersistentAuth;
}
else if (LoginType == "AccountPortal")
{
LoginTypeName = UE::Online:: LoginCredentialsType::AccountPortal;
}
FAuthLogin::Params Params;
Params.CredentialsId = ID;
Params.CredentialsToken.Set<FString>(Token);
Params.CredentialsType = LoginTypeName;
Params.PlatformUserId = FPlatformMisc::GetPlatformUserForUserIndex(0);
TOnlineAsyncOpHandle<FAuthLogin> AuthLoginHandle = OnlineAuth->Login(MoveTemp(Params))
.OnComplete([this, ID, Token, LoginType](const TOnlineResult<FAuthLogin>& LoginResult)
{
if(LoginResult.IsOk())
{
TFC_OSS_SLOG("Login successful");
CachedLocalLoggedAccountInfo = LoginResult.GetOkValue().AccountInfo.ToSharedPtr();
}
else
{
UE::Online::FOnlineError Error = LoginResult.GetErrorValue();
FString ErrorMsg = Error.GetText().ToString();
TFC_OSS_ELOG("Login request failed for ID: %s, Token: %s, LoginType: %s Error: %s", *ID, *Token, *LoginType, *ErrorMsg);
}
});
return;
}
}
lobby stuff
ah cool yeah but sadly i can't spend a week on this i'd like better to work on the game and i already got those packs anyway so i wanted to see how they would work but
oh ok wow thanks a lot
beauritufl
Should i just start a basic ue 5 project ? and add this code on top ? thanks again sorry for the ping
it might be easier to start using EOS with a fresh rpoject
make a empty main menu and lobby and game levels and maek it work
then paste it where you want
ah ok amazing
post it ? what do u mean sorry
and i need to select a c++ project in the template right ?
https://www.youtube.com/playlist?list=PLzykqv-wgIQXompUswD5iHllUHxGY7w0q omg this serie !!
here i mean
typo, meant "pasted"
you can use a BP one then create a single c++ class from UE editor wizard, then remove it only use your IDE
is this your first time doing c++ ?
Is there some recommend tutorials that cover the basics of multiplayer, I.e. host on one computer and another can join? Anything in its simplest form
I'm having trouble getting my clients / listen server to have their input captured by the viewport, right now I can't click into the viewport at all
I'm trying to have the player controller initialize the UI and set the input mode on-possess, but for some reason this completely stops any input from working
Does anyone know if what I'm doing is incorrect? Should I be doing input from somewhere else?
From the tutorials I've seen they usually are just initializing their HUDs on the PlayerCharacter actor BeginPlay, but I'm not confident that will handle dying/respawning well especially in multiplayer, so that's why I'm trying to use the possessed delegates on the player controller
https://www.youtube.com/watch?v=dQD_sPFXcBg
This is the one I used which works well
for basics check this, very good https://cedric-neukirchen.net/docs/category/multiplayer-network-compendium/
you can also check the various pinned messages in this channel
Alright for some reason it looks like CommonUI is overriding my input mode at some point after I set it, not sure why that's happening but might be the issue
Alright figuring out the input config seemed to be the solve, it was overriding my mouse captures to set them to not capture when I added my CommonUI layout widget to the screen
OpenSource version uses the engine's subsystem. Please set this :
Go to the Plugin's build.cs, and set the bUseEngine to true
Source/SteamIntegrationKit/SteamIntegrationKit.Build.cs
Then, Generate Visual Studio files and build
thanks yeah it's my first even though i know my fair way around bp
oh wow thanks a lot for answering 🙂 where can i find the build.cs though 🙂 sorry i'm not use to c++ 🙂
I gave the path, just go to the cloned plugin, then source ....
if its your first time doing c++ you should probably start to learn c++ for singleplayer games, then how multiplayer works in c++ then use online services as its even more complexe
true definetly i just didn't know that multi involved c++ 🙂 i already have so much to learn in BP..
doing a multiplayer game with BP only is the path of pain
BP has little exposed
people told me that in the past, i tried with BP only, switched to c++
ah i get it
I guess my plan is not going to work then
i just wanted to create a simple for my friends to join
Because we were looking for cool coop games but then i thought what i love the most is doing stuff in unreal
yeah sadly multiplayer games is like 3x harder to make
but yeah i can see how struggling i am
for various reasons
yeah i understand.. sad !
you could make a cool singleplayer game/protoype to start learning BP more in depth or c++
true but i would need to integrate my friends maybe through source control ?
I don't think so, many plugins have 100% exposure to BP.
Would be very hard to dev if everyone has to learn c++ just to do OSS integration xd.
using plugins is the worse way to learn using UE in my opinion, and most of them are either paid, or doesnt respond to your needs
also, you should remove the epic games logo on your EOS docs
😅 Why? And it's not true, there are a bunch of open source plugins, if you look for it.
as its misleading and probably illegal
its not good to learn, its good to gain time over something you understand a minimum
blindly using a plugin doesnt get you anywhere on the long run
Okay, not sure if it's true.
Honestly OSS is one of the things I think shouldn’t be anywhere near blueprint
the few Sessions nodes for LAN is enough to have as a beginner
It’s kind of just objectively bad to have in BP tho for proper setups
because it just doesn’t give you the same level of logging or error handling
for me its like giving a powerful truck to a toddler
to the point where there are things you actually can’t debug if you did it in BP
if you want to use a tool, you should be "good enough" to learn and use it properly
yeah and no dashboard lights lmao
as someone said in #generative-ai :
“Mastery of a foundational skill precedes effective use of advanced tools.”
here foundational skill is C++ and multiplayer and advanced tools OSS
Any idea why clients on GASP (animations sample) on standalone server slightly rubber band when rotated rapidly?
It doesn't do that when playing with dedicated server, on the main map, but in another level it rubber bands even on dedicated server.
I don't think that is right. It really depends on which subsystem/plugin you use and your approach. Most plugins have debugging methods and ways to find the issue. OSS too gives clear warnings if you want to stay with that. Never see this complaint before. And if you still want to go through directly implementing of stuff, sdk can be used too which gives the highest level of debugging you can get with online services.
probably because you rotate to fast
so it interpolates, but you already finished the 360
I suspected it has to do with interpolation. But what is the difference being a client on a dedicated server and being a client on standalone? It doesn't interpolate at all on another client on dedicated server.
facts don’t care about your feelings i’m afraid
you just don’t get the logs in BP
for the more obscure stuff
well if you are a client on standalone there is no server until you open a level as a listen server or join a server
I didn't communicate my point correctly, sorry. My main confusion is that it does that when observed on server in listen server (client rotates rapidly).
It doesn't do that when both are clients on dedicated server.
Shouldn't it trigger the same interpolation code? I can make a case that server in listen server scenario shouldn't see the interpolation as it has the authority, but that is kinda the opposite of what I see.
so listen server sees client doing weird rotation
and client see the other client rotate fine
well i remember peopel talkign abotu this
because i think the server has more data or something, so it interpolates differently that a simply client
luckily i saved the stuff
Oh wow, thanks for the link!
Hmmm.. I have the bandwidth caps really high, basically uncapped.
It is a bit more complicated as in the original GASP, the clients rubber band only in listen server, but when I ported the functionality to a new character, it rubber bands in both listen server and dedicated server scenario.
It is still within the same project and I thought I moved all settings from the original character to the new one, but I must have missed some setting.
sadly i cant help you more
Thanks for the link and sanity check, it's not something super obvious
hey guys, tips im going to make a small Turn based project, where would i handle the turn manager in the gamemode, gamestate, or playerstate ?
wdythink ?
Not playerstate
Either GameMode or GameState, depending on the design
well basicly player 1 turn, player 2, npc repeat
Very simply, a GameState can contain a reference to the PlayerState who's turn it is. This could probably be handled better through an Array of PlayerStates using index 0 as the player who's turn it is. When a player finishes their turn, you remove Index 0 from the array, then add them to the array again (moving them to the end).
Any commands sent in by players that you need to know if it's their turn or not, you would first check if it's that Player's Turn in the GameState by comparing if their PlayerState is at index 0, and then proceed if they are.
yeah somethinglike that was my idea
Slowly figured out the rotation rubber-banding issue. It seems the main issue is that I am using a child actor for the character mesh to allow modular cosmetics. No idea why or how to fix it, but that seems to be the where the issue is coming from. Just wanted to provide update in case someone searches for it.
the character mesh is inside the CAC ?
CACs are terrible
epic recommend rarely using it, and only for very basic and simple stuff
I hate them as well, but my system is almost a carbon copy of the cosmetics system from Lyra, or at least I thought so. Need to revisit how they did it, but if I remember correctly they had invisible mesh in the character mesh component and child actor that was retargetting the pose from the invisible mesh.
if you want modular meshs you can check UE modular character mesh system
Has the demo been released yet? I am looking forward to it
its been a while since this existed
Ah, I meant the new modular system plugin coming for 5.5
Pretty new to this multiplayer stuff, If I were to want a separate actor to change a value on the Player Character (Once said Actor is Clicked it should set said Actor as the Players "Current Target" which is an Actor Reference) What would be the best way to get that information to the server?
Why does the clicked actor have to do any work?
You can have simple
UFUNCTION(reliable, server)
void SetTarget(AActor* Target);
But be sure that your target is replicated
never had this error any idea ?
Pawn or PC can send the fact that they want to target an actor to the server, which can set a replicated TargetActor ref
ok i think i'm abandonning multiplayer ahha 🙂
https://www.youtube.com/watch?v=5nMKEKV0acI&t=255s i've followed tihs tutorial it seems nice but i don't know i have too many absurd errors
This video covers how to set up Steam Multiplayer in Unreal Engine 5.5 using Blueprints.
It covers all of the setup steps, how to create and join sessions, as well as testing the game works over steam (even when you only have access to one computer through the use of Sandboxie).
If you enjoyed this compact tutorial, please comment below what yo...
That is not multiplayer issue, that means that those assets are broken. Probably missing the parent.
like the one i've shown avove
ah ok thanks yeah but no idea what could have triggered this;;
When trying to open first person character
Been a bit since ive done some C++ so please forgive me if I sound stupid LOL but I would just need to initialize "Target" within the public script and plug this into the body of my Character.H?
ok i will retry doing everything from the beginning 🙂
i'm so stubborn lol
Experienced the same issue with 5.5 - can confirm that renaming (or deleting if you are brave) the user data folder solves this problem
%userprofile%\AppData\Local\UnrealEngine\x.y
where x.y is your version number (in my case %userprofile%\AppData\Local\UnrealEngine\5.5) ok its this i guess
Regardless if you are using cpp or blueprints, you can just use the "server call" which executes the function on server and pass in the target actor.
So client clicks an actor, it sends the information to the server that client clicked the actor, server verifies that client is allowed to click the actor and server does whatever it needs with the infromation.
But the target actor NEEDS to be replicated, otherwise the pointer to the actor will not be resolved on the server.
Massive, you helped me out a ton here.. Even though it turns out I was just forgetting to make The event run on server/Multicast LOL
What is the best way to make the server not accept connections until the asset manager is done loading everything it needs?
blocking load I guess
thou user experience would suffer, better to implement some kind of lobby system
hi there would anyone be interested in helping me debug this tutorial ? i've done it 3 times already
it's supposed to be simple but it's not working properly..
https://www.youtube.com/watch?v=5nMKEKV0acI
This video covers how to set up Steam Multiplayer in Unreal Engine 5.5 using Blueprints.
It covers all of the setup steps, how to create and join sessions, as well as testing the game works over steam (even when you only have access to one computer through the use of Sandboxie).
If you enjoyed this compact tutorial, please comment below what yo...
Asset manager on client or server side?
You could delay starting the session till loading is complete.
What seems to be the issue?
thanks 🙂 I don't really know i've tried to debug but i just can't get the two players in the same world
at 4.42
they spawn in separate worlds
ive even tried getting the session info but couldn't
my project is first person his is third but i think it has nothing to do with it 🙂
yes
actually i can't see it when i try now with the new setup
but i could before
i can even with the two sesssions
Can you double check your join logic? Join should never load user to a locally opened new map, it always has to be a remote map or it throws an error.
A) Check logs when joining
b) Add some print statements so you know you are actually joining and not creating a new session.
Simple stuff, but we take it step by step
amazing thanks a lot i see what u mean
might be the issue in yellow here
That is just voice interface, that's ok
ah ok
Clear the log before you click join and give me only what happens during the join? Right click, clear log
crazy it actually says "sucess" but never joins
sure ill do that
interesting
this is the full log of when i click join
That is quite positive, what actually do you see after clicking join?
Do you spawn into a level and with a character and you can run around (aka, the other player is missing). Or do you spawn in and you don't have a character but you can see the other player?
i can run around
Fyi, lines
LogNet: Login request: ?Name=A-2F3102BC4A4CBF465B47E096AAEBDE9A userId: NULL:A-2F3102BC4A4CBF465B47E096AAEBDE9A platform: NULL
LogNet: Welcomed by server (Level: /Game/FirstPerson/Maps/UEDPIE_0_FirstPersonMap, Game: /Game/FirstPerson/Blueprints/BP_FirstPersonGameMode.BP_FirstPersonGameMode_C)
``` are important, and how that you are reaching the server and you are loading in
actual magic 🙂
the other player is missing
it's crazy because other people didn't seem to have a problem with the tutorial or this particular part
At this point I would check 2 things.
- Am I actually connected to the server? You can make a Dummy Box Actor that Multicasts a random number that clients print out.
If the numbers are same in both game windows, you are guaranteed you are in the same instance - Check that your character is replicating. Probably unlikely you turned that off, but it's a simple tickbox.
thanks a lot again 🙂
Multicasts a random number that clients print out. how would u do that sorry i'm really noob with multiplayer 🙂
- but easier, print on tick this
The idea is, that the window where you create the server is the authority and should print true. The other window, that joins the game is just a client and doesn't have the authority so it should be false.
wait i dont' get it my first person character bp is empty
Where did you get the SteamINT55Character?
yeah that's so weird as well
no idea i just followed the tutorial
mystery is thickening
just added a third person it seems to be normal
OMG
Since SteamINT55Character is not on google nor Github, I have no clue where you got that from.
ok it works now
that is crazy
i tried with the third person
and it works flawless
just loss 3h or something but hat's ok the dopamine from it working is actually insane aahh
thank u so much
I need to test it with a friend now lol a new world of issues i guess
I would recommend nuking whatever you have and replicate it in a new project. Having a base class you have no clue where it came from is a bit fishy.
true definetly i'll do that !
Glad you got it to work, gj!
Steam overlay is finicky, try to package the build
maybe it's not supposed to
i need to test it with the rest of the tutorial
thanks i'll try
I would not download the sandbox thing that he used.
ah cool ok won't do that
how can i test it ?
"Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetLocalPlayerSubSystemFromPlayerController_ReturnValue". Node: AddMappingContext Graph: EventGraph Function: Execute Ubergraph BP Third Person Character Blueprint: BP_ThirdPersonCharacter""
and also got this weeeeeeeeeeeeeeird issue like What?? why here
maybe the mapping context is not replicated or something ? even though it's working
sorry for the spam !
Use laptop or create a VM to have second steam opened.
ah yeah VM could work or a friend i guess
and last question if i want test with a friend i need to build the project right and send the .exe ?
Regarding the nullptr issue, I guess Enhanced input is not spawned for client on server side. You should check if player controller is locally controlled before adding mapping. Not 100% sure on this one, I didn't dig into the enhanced input too much.
Yes, .exe and other files that get generated
ok thanks a lot i get it
sure 🙂 thanks
sorry just did this build but like why is it 1gb 😉
Most likely because you have debug symbols included. It's a special file or set of files that allows you to attach a debugger to the game and see what went wrong or what the program is doing.
There are options in UE if you don't want to include them or you can just delete them manually.
Oh, SteamINT55 is your project name!
ahha yeah 🙂 no idea why lol
thanks a lot i'll dot hat
Server side
Would that be best approached by overriding AGameModeBase::InitGame or is there a more best practice way of approaching it
yeah and also the STEAM NT 55 file is taking all the space
I would say the cleanest way would be to manually control the execution of GameInstance:EnableListenServer. Never done it myself, but that would be my approach, as it would not start the server at all before finishing the asset loading.
That looks like you're moving that red character on both the server and the client.
I have a UAssetManager instance where I load datatables into a singleton. It works in PIE but fails in standalone client mode. I can move the singleton load to beginplay of the player which does in fact work but wondering why datatables containing game item classes wouldnt be ready for something like an UAssetManager. Where else to load them?
can't the client call launch function? Since you are using GAS you might call it on both the server and client and it will fight each other.
@amber vale
try calling launch only on locally controlled character
i think it already handle networking stuff under the hood
it's not about latency, but update frequency. Though high frequency (if it's the cause) is not a solution. Movement should be interpolated locally which CMC provides for characters out of the box. Also it maybe be contention between two sources of movement: client-driven vs server-driven(replicated + corrections).
To clarify things control/possess red guy with another client and move around to see(in the viewport of first client) how smooth movement is
movement component/character is broken in some way
have you setup packet loss?
what's the network config?
yeah
just screenshot them
set packet loss to 0, and min/max latency to same number. 30 to 60 is a huge deviation
though I don't thing it's the problem
iirc Unreal do not emulate at all by default
select CMC in your character and inspect for modified properties (there is special filter in gear button of details panel)
Character is also default?
do you use C++?
you can try put breakpoint somewhere in CMC to check what drives movement (contributes to velocity)
i.e. inspect call stack
Are you doing any kind of logic that could potentially launch the red character on the client initiating the knock up before launching on the server, and is that red character performing any kind of movement otherwise?
p.NetVisualizeSimulatedCorrections 3
or recreate very default character from scratch
check this command in project that has no issues with movement
I guess only clients
server is authority, so no need for correction
though I dont think Epic would design it to crash editor if you type it on server
are you on stable branch/release of engine?
still 
I guess crash itself says a lot, have you modified engine?
put breakpoint in a place where you caught exception, but in a project where command works fine. to check that it follows same code path (i.e. AVX disabled)
@amber vale you can start with less precise spot
which is not optimized
otherwise breakpoint might not hit at all
check for compiler options/ .ini configs
non-default
disable command
p.NetVisualizeSimulatedCorrections 0
I mean check movement with this option on default
create new bp character from ACharacter
for simplicity you can assign it AI Controller and order AI MoveTo to avoid mess with input setup
though nav mesh required
Character setup 
well AI controller is assigned by default
what exactly? default character has no issue?
Hi there how can i remove the SteamINT55 file (it's almost a gb) from my build ? thanks !
here is what is inside the file
rename, then check whether it still works 
ahha nice idea i can test it on my machine as well
Hello. Experiencing a really strange issue. I have an actor which has replicate movement disabled. However, when I set the actor location on the server only (using switch has authority node) the actor also inexplicably moves on the clients as well. There is no code whatsoever running on the clients. What is going on here?
Isn't the whole point of disabling replicate movement to make it so when the actor location is set on server it is NOT replicated? 🤔
Is this a bug or?
Yeah, that shouldn't happen. If you put a breakpoint to trigger on the client set location and set transform, from where do you see it being called?
I'm working in blueprint on this project. The only node I'm calling in this actor is a "SetActorLocation" node that happens after a switch has authority node on tick. Other than that there is no other code inside the actor.
@void nest is that actor attached?
Yes, it is, to a ship
Then it replicates its relative location
Aaaaah
Needs c++ to stop that
Ok makes sense
I found another solution in the meantime
But good to know
I already had a bit of a suspicion it had something to do with it being attached to a ship
Would be cool if they added a replicate relative movement bool to actors
it doesn't work without 🙂