Would appreciate help with two Unreal Engine Networking problems.

Started by
5 comments, last by hplus0603 4 years, 6 months ago

Hello everyone, 

I appreciate any help i can get. So i recently started getting this message listed bellow in visual studio when i would compile any game i have for UE4.23.0. 

1>EXEC : [1/28] error : Unable to create child process

I have no idea how to fix this, and also i really don't want to have to set all the classes again in a new project.


Second thing is that i can not move my Character on the Sever when testing multiplayer after adding "Role = ROLE_Authority" to sections in an AI Tracker bot class that i created as a part of Tom Loomans Course on Udemy. I am not following Tom Loomans course 100%, Do i need to add sever implementation to my character because i am using different movement code then what Tom uses? I Am happy to share some screen shots if needed. 

 

Please help, thankyou for your time.

Advertisement

"unable to create child process" can be one of many things.

Does it work if you run as admin?

Does it work if you install more RAM?

Is there a DLL dependency that changed?

Have you re-run the Unreal Engine tools updater script?

 

When it comes to Unreal networking, you will typically not give authority to a client; instead the client will send input messages to the controller for the character actor on the server, and those would be repeated out to all other clients. There are some reasonable YouTube tutorials about this that I've liked in the past. (I don't know if they changed the network system in the last few versions, it's been a while since I used this.)

 

enum Bool { True, False, FileNotFound };
1 hour ago, hplus0603 said:

"unable to create child process" can be one of many things.

Does it work if you run as admin?

Does it work if you install more RAM?

Is there a DLL dependency that changed?

Have you re-run the Unreal Engine tools updater script?

 

When it comes to Unreal networking, you will typically not give authority to a client; instead the client will send input messages to the controller for the character actor on the server, and those would be repeated out to all other clients. There are some reasonable YouTube tutorials about this that I've liked in the past. (I don't know if they changed the network system in the last few versions, it's been a while since I used this.)

 

I re-installed the Unreal Engine and this fixed the issue. I don't know what a DLL is or how to use tools updater script.

 

I don't have a Controller set up in the unreal engine, I'm still very much learning, but i feel comfortable with most of the terms and how to operate in the unreal engine with c++. 

Tom Said that there might be an Override function that isn't calling it's Super::MyFunction, which i could not find. He said that the character is automatically server implemented. But i am using different movement code in my Character.cpp to him. The thing i am trying to get my head around is that i am adding Code to the AI "TrackerBot" but that is somehow effecting my Character which seems odd to me. 

I am going to try some different things and see what works best. I am trying to avoid my code from becoming messy, i also can't do damage to these tracker bots for some reason, but i think i can fix that.

My character works fine on the client side of things.

 

I appreciate the help hplus0603
 

The tools update script is needed if you build Unreal Engine from source (github) but not if you just use the download.

i am adding Code to the AI "TrackerBot" but that is somehow effecting my Character which seems odd to me. 

How confident are you that your C++ code is correct, and that you're not using something like global or static variables that let data "bleed" between objects?

How confident are you that your character has the correct controller assigned? (Characters need controllers, especially in networked games -- trying to drive Character/Actor directly is bound to fail because you're going against how the engine wants to work.)

Can you get a simple multiplayer project to work correctly, using blueprint? If so, start looking at what's different between that project and yours.

Here's the YouTube videos I was talking about, I highly recommend them!

 

There's a little bit of networking update in 4.20 and onwards, here's another series of videos:

 

Looking through these videos will likely help you get another view into how networking in Unreal is supposed to work in general, which will probably help you build up the skills necessary to debug whatever your current problem is.

Another option is to start at the beginning, set breakpoints where your character is supposed to receive movement commands, and set a breakpoint where the keyboard input generates the movement commands, and then step through it all in the debugger, making sure that the data goes to the right point at each step. At some point in this process, you will find that the command somehow gets ignored, dropped, changed, or countermanded, or maybe just not sent upstream, and that will be your problem.

enum Bool { True, False, FileNotFound };
3 hours ago, hplus0603 said:

How confident are you that your C++ code is correct, and that you're not using something like global or static variables that let data "bleed" between objects?

I'm positive my code is correct with the exception of my implementation of multiplayer functionality with the tracker bots. I'm following this course closely, 

 

 

3 hours ago, hplus0603 said:

How confident are you that your character has the correct controller assigned?

I can't say i understand the way controllers work in C++ just yet, but i have an understanding that the code which controls my character is located within the Character.cpp and header of that. 

 

3 hours ago, hplus0603 said:

 (Characters need controllers, especially in networked games -- trying to drive Character/Actor directly is bound to fail because you're going against how the engine wants to work.)

I appreciate the help alot, So i have to learn how to make a controller class then? 
Would you be able to tell me why this is the case? why controllers in C++ have to be separated from the character?


I will check this videos out thankyou, much appreciations  

The "Character" is the thing which knows how to translate between actions and presentation state. "If I'm walking, play animation X; if I'm falling, play animation Y." "If I'm dying, play an oof sound!" and so forth. It's a subclass of Pawn, having mostly to do with adding character animation support on top of all the Pawn things. (For example, a user-controllable airplane would not be a Character, it would be a Pawn or other Pawn subclass.)

The "Controller" is the thing that tells the Character what to do -- "you should move forward" or "you should fire the equipped weapon" or whatever.

There are several reasons for this distinction. One is that you can swap out the Controller to get different behavior for the same character. Put an AI controller in charge of a Character, and the AI tells it where to go and what to do, and the Character still animates correctly. Another is that you can swap out the "interactive character controller for local play" with a "networked character controller for remote play."

Single-player setups sometimes don't include the complication of character controllers, because it's easier to just mush them together into one blob, especially if you know you will never use the same animated character/model for any AI/enemy/remote-player behavior. But with networking, the Unreal system is really set up to network between controllers.

I haven't followed the series/tutorial that you're suggesting above, so I don't know how closely that adheres to this structure, and it was a while ago I did anything with UE4 networking, so I can really only answer in these general terms.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement