Come Learn Blueprint Multiplayer with me! (aka Tom's a Glutton for Punishment)

here is more detailed log after I do more checks.

LogWorld: Bringing up level for play took: 0.001028

// I don’t know what this following line means.
LogPlayerController:Warning: NULL GameState when trying to spawn spectator!
LogNet: Join request: /Engine/Maps/Entry?SplitscreenCount=1
LogBlueprintUserMessages: PM Server EventPossessed controller name:TestPC_C_0 my name is: ScratchPawn_C_0 // we can see the server side possess relation ship
LogNet: Join succeeded: 313
LogNet: Join request: /Engine/Maps/Entry?SplitscreenCount=1
LogBlueprintUserMessages: PM Server EventPossessed controller name:TestPC_C_1 my name is: ScratchPawn_C_1
LogNet: Join succeeded: 314

// note that there are no “Client EventPossessed” where I put in place just in case client side also invoked
// following are the same default Engine possess flow

LogPlayerController:Warning: NULL GameState when trying to spawn spectator!
LogPlayerController:Warning: NULL GameState when trying to spawn spectator!
LogNet: TestPC_C_2 setplayer LocalPlayer_28
LogPlayerController: ClientRestart_Implementation None
LogPlayerController:Warning: NULL GameState when trying to spawn spectator!
LogPlayerController:Warning: NULL GameState when trying to spawn spectator!
LogNet: TestPC_C_3 setplayer LocalPlayer_29
LogPlayerController: ClientRestart_Implementation None
LogPlayerController: ClientRetryClientRestart_Implementation ScratchPawn_C_2, AcknowledgedPawn: None
LogPlayerController: ClientRestart_Implementation ScratchPawn_C_2
LogPlayerController: ClientRetryClientRestart_Implementation ScratchPawn_C_5, AcknowledgedPawn: None
LogPlayerController: ClientRestart_Implementation ScratchPawn_C_5
LogPlayerController: ServerAcknowledgePossession_Implementation ScratchPawn_C_0
LogPlayerController: ServerAcknowledgePossession_Implementation ScratchPawn_C_1

// from here on one pawn died, Pawn side EventDestroyed invoked.
LogBlueprintUserMessages: PM Destroyed Server Name:ScratchPawn_C_0
LogBlueprintUserMessages: PW Destroyed Server call respawn

// note GM will only be on server
LogBlueprintUserMessages: GM respawn event
LogBlueprintUserMessages: GM respawnE controller name: TestPC_C_0
LogBlueprintUserMessages: GM respawnE Server: trying to spawn

//new pawn called C_6, again only server side EventPossessed invoked.
LogBlueprintUserMessages: GM respawnE: serverside spawned: ScratchPawn_C_6
LogBlueprintUserMessages: PM Server EventPossessed controller name:TestPC_C_0 my name is: ScratchPawn_C_6

// GameMode respawn custom event trying to get client to also possess by passing C_6 to client owning PlayerController RPC
LogBlueprintUserMessages: GM respawnE: call owning client possess

// note that engine side can’t get a valid Pawn name yet
LogPlayerController: ClientRestart_Implementation None

// client side PlayerController possess custom event got a invalid Pawn parameter.
LogBlueprintUserMessages: PC possessE: input Pawn not valid

// Pawn client side Destroyed event got called really late on both clients, probably low priority? Can’t call respawn since there is no GameMode on client.
LogBlueprintUserMessages: PM Destroyed client side got called?
LogBlueprintUserMessages: PM Destroyed Client Name:ScratchPawn_C_2
LogBlueprintUserMessages: PM Destroyed client side got called?
LogBlueprintUserMessages: PM Destroyed Client Name:ScratchPawn_C_4

Now, I seem to need a way to let client side PC also possess the new Pawn(C_6) got replicated in both clients(whose name will not be C_6 but they are linked).
Also note that this might not be a proper timeline since many events could probably happen not in order(ie Pawn EventDestroyed on server and client side).
But it seems to follow the BP event flow pretty closely.

Try it out. Works in networked multiplayer, accomplished entirely with Blueprint. Controls are WASD Q E M1 M2 Space

Do you mind sharing the Blueprint, scene files so we can open it in the editor? I am on a Mac here and Gameiteration1.exe is not very useful for learning what you have done…


Sure thing, these are the 3 main blueprints. Everything else is the actual spells and abilities.

SUCCESS!!! Figured out how to properly respawn by sending requests from client to server and possess my Pawn.
I haven’t downloaded Haha71687’s file but for me I don’t have to do auto respawn upon destroyed, the entire respawn is base on a input event(or whatever client event you’d like to define).
I’ll post my cleaned up result later today, so excited, digging through source code did paid off, I’ll also offer explanation in my respawn post(in this thread) later. :smiley:
Tested on dedicated server with 2 clients situation and both clients can respawn properly(I bind to start button and enter for a respawn event).


I end up submitted a wiki page so it can be more visible to other people in need.
Here is the page the explained things in detail.

I also got my volume spawning working already, it’s time to expand from here to all other game mechanism that I wanted. :smiley:

I haven’t read through this post yet, but if the title is any indication of the contents, I am SUPER excited to see this project develop!

Quick (and probably really stupid) question, though: does any of this involve the making of a co-op game?

Doesn’t matter, it’s the same mechanism if you want to do co-op. If you understand how replication works, other parts will fall into game design realm.

Gotcha, thanks!

This is the state of my game, coming along nicely. Blueprint is FAST for iteration, holy cow.

Run Client.bat to connect to my listen server I’ll keep up. This link will always contain the latest build of my game so you can bookmark it if you’d like to keep tabs.

Don’t know if Tom still following this thread.
I just finished exploring PlayerState, used to count kill/death etc per game.(I think it could possibly carry over to next level if I remember it right.)
Pretty basic rules to follow:

  1. you still need to set replication for you PlayerState variables.
  2. PlayerState is owned by server side Controller(replicates to local but should only update on server.)
  3. HUD can just get whatever local copy to update on screen info required.

Other things learned:

  1. when you copy a graph with a timeline node, the curves channels won’t copy properly.
  2. spring arm seems to collide with projectiles from example content.
  3. migrate asset links way too many assets, need a way to remove references after nodes deleted in graph.
  4. relate to 3, create a copy of an asset make original asset a reference, we need a “duplicate”. So after we clean up the duplicated BP, we can migrate minimum assets over.

I am still following this thread! :smiley: I’ve just been an absentee father to it :frowning:
I’m so happy to see so much discovery and success! I’ve had limited time to actually work on anything other than my Quad copter game. I’ve taken what i’ve learned here and incorporated it with SUCCESS! :smiley:

I’m also working on events and state and replication, so I’m curious to see what you find. All the fancy HID stuff I’d figured out for single player is totally broken. I’m also extremely distractable and decided to work on some level design and learning Landscapes and the texturing of those using slope to determine the texture.

Hopefully I’ll have some time today to make some headway and try out some of these demos posted!

Thank everyone. Great posts!!

I used the info to add basic Multiplayer to the rolling ball template. The hardest thing was trying to get the physics to be handled by the server. I had some great laughs as I tried to figure out what to call that would show the marble rolling properly.

VERY good job. I will be implementing this myself :slight_smile:

Thanks, that saved me today :slight_smile: It’s logical, but I just couldn’t figure it out myself :rolleyes:

I was looking over this thread and while yes it will work logically, there may be an issue with sending so many RPCs which are designed for transient actions as opposed to state. So sending an RPC for movement would be deadly in terms of a larger scaled game. Typically you don’t want to be running RPCs for movement. Unless I am wrong about this. RPCs were designed for non-reliable actions (mostly), and because movement is so important, it could cause many issues in the grand scheme of things.

I absolutely agree. I’ve been worried about that as well. What’s the better option tho?
Edit: The reason i’m using an RPC, rather than the in-built movement replication or replicating the location, etc. Is to reduce input lag and smoothness. I have ti set up right now so that it’s only replicating movement using an RPC from the server to the individual client (Not multicasting to everybody)

Well movement is already replicated if you set it to replicate. The server will handle the movement and replicate it to all the other clients that are relevant.

Indeed, that’s how the pawns replicate their position to each of the clients. Where I ended up using the RPC was to send the transform back to the owning Client as the movement, etc. is being handled on the server and the replication code doesn’t handle that right (I was moving on all the OTHER clients screens!)

I’ve also improved this call so it’s not sending the entire transform, just the location as a vector and the rotation as a Quantized vector. This SHOULD reduce the overhead.

However, your point is a good one to keep in mind. The use of an RPC on a Tick Event should be limited and avoided as much as possible, and if you’re not doing the movement server-side don’t do it!

Hi Tom,

Your tutorial has been a great resource for me while starting to learn about blueprints.  Everything seems to work, though the update rate is poor, but I've not been able to figure out how to start up a multiplayer game that connects to a different machine.  I'm clearly missing something basic in the setup - following some threads using open or travel or serverTravel failed to work.  Do you have a good pointer to some step by step instructions? Thanks.