[EDIT:] I realized the title was a bit misleading only after posting the thread. I’m actually asking for opinions on the best approach for making an online fighting game and not offering it. Sorry about that.
I’ve been learning how to use UE4 religiously for about 2-3 weeks now and I’ve managed to create an actor with movement and different skills / moves. I’m planning to make the game online so the idea is to allow other players join your hosted game. For some info about me I’ve worked as a developer for most of my career but I’ve never dealt with C++ so I mostly just developed the game in Blueprint but I’m totally open to the idea of eventually do some coding.
My current implementation involves the following assets:
- Pawn Blueprints - Each character in the roster has its own Pawn Blueprint. Inside each Pawn Blueprint are the specific moves, movement which should be unique for each character.
- Player Controller Blueprint - Just a generic blueprint for the Player Controller. I haven’t placed any logic to this yet.
- Level Blueprint - The persistent level holds the character selection screen. After the player selects the character, the corresponding Pawn Blueprint for that character is determined and spawned to a random location in a streamed level, and then possessed by the Player Controller Blueprint right after.
Given those I’ve a number of questions:
- I actually wanted to know if my decision to make the characters as Pawn BPs instead of Character BPs is correct. From my understanding, Character Blueprints were made for single-player games where the controls would always be given to that Characer Blueprint. In my case, there is a possibility to choose different characters so a default Character would not work. I’m not sure if this is correct.
- What’s the main purpose of creating a custom Player Controller blueprint? I noticed that I could just use the default Controller rather than create one. But perhaps someone can enlighten me as to what is the best practice for using custom Player Controller blueprints.
- This is my real problem as maybe I haven’t completely grasped the concept of networking in games. I have been trying to watch videos though. Anyway, when I was experimenting and still had the characters implemented as Actor Blueprints, I noticed that when running the game simulating two machines, I was able to see both characters in the client and also in the server. But once I moved to pawns, I could still see the server pawn from the client window, but I cannot see the client pawn from the server’s perspective. I have set the pawns to be replicated variables as well, and made it so that the pawns are spawned by the server. I’m not sure if I need to make it a repNotify and let the client spawn the server pawn locally so both machines can see them.
I can post screenshots of my BPs for spawning the characters once I get back home but any help before then would be appreciated.