PS: I'm dying here for the Reconciliation tutorial.
@mrlarrydapuppet43376 ай бұрын
Now to wait for the recconcilation tutorial :) Hopefully it comes soon..
@minima_studios Жыл бұрын
hey! just wondering if a part 8 is in the works
@bluzenkk Жыл бұрын
thankyou for tackling this part of netcode~~~ good luck~
@Flarvain Жыл бұрын
Thanks bluzen, its been a learning experience for me too! Appreciate the comment :)
@GaLzZy.4 ай бұрын
Will you still do the Reconciliation video and also show how to add interpolation? :O Thanks!
@miguelrito6378 Жыл бұрын
Thanks for the tutorial, i can´t wait for part 2.
@monopixelart Жыл бұрын
You help me a lot with camera tutorial thanks man you the best :)
@Flarvain Жыл бұрын
You're welcome! 🙏
@HitregStudios6 ай бұрын
I too am waiting for part 8
@PuffoPufferfish Жыл бұрын
Is the Reconciliation tutorial coming out soon?
@MomasGameDev Жыл бұрын
Omg thank you so much for someone finally explaining client side prediction in a way I can understand it. There are some bad tutorials out there and this is the only one that makes any sense.
@Flarvain Жыл бұрын
You're welcome!
@mrtnt1666 Жыл бұрын
Hey great video, I've tried to implement this into my game and the movement does work but for some reason on the position of the host player is transferred across clients and I am getting and error saying "object reference not set to an instance of an object" do you know what I might be doing wrong? I've gone over the video a couple times
@hound6870 Жыл бұрын
I think the error appears if the other players are not spawned yet. For me simply putting an if statement there fixed it (currentServerTransformState.Value != null).
@j.p.bikes22 Жыл бұрын
best youtuber
@forkmor1661 Жыл бұрын
Getting Null Reference Exception on the currentServerTransformState, followed along exactly
@hound6870 Жыл бұрын
I think the error appears if the other players are not spawned yet. For me simply putting an if statement there fixed it (currentServerTransformState.Value != null).
@1_8t Жыл бұрын
I have a problem when I start the game I can control on the client side but I can't control on the host side. Note that I do not use the server only the host and the client
@FourFeaturesStudio Жыл бұрын
Why do you create tikret and delta time yourself? The NGO already has these parameters
@Xeriarc Жыл бұрын
What happens if the clients framerate is higher than the tickrate? won't the ProcessLocalPlayerMovement skip the if statement for some frames, meaning that you might miss some input from the player This is probably not noticeable with movement/rotation as they are usually pressed for multiple frames, but what about button inputs that might only be pressed for one frame? Nice series so far, looking forward to the reconciliation video
@Flarvain Жыл бұрын
Hey there, i hadnt actually considered this, heres my thoughts :) In my examples we've talkes about frames and the delays being quite large to demonstrate the issue but i think in practice these frame rate differences are 0.0x of a second different so i dont think you'd ever really trigger this. Its definitely possible based on the code but i think the same potential to have input not recognized would exist on any computer with lower specs and a lower frame rate. I would be curious to see the final impact because ignored input is definitely a possibility, but i think in actual game play its likely to not be recognized. Thanks for bringing it up though, theres plenty i still am learning myself 😀
@polihayse Жыл бұрын
@@Flarvain I was wondering this too. I was considering adding the inputs into a buffer, and then calling the server RPC for all of the items in the buffer at once for a Netcode tick. Idk if this will work. I also don't know how interpolation is supposed to happen without using a NetworkTransform component. I'll just read more Netcode documentation and try to wrap my head around it.
@LiteralPain355111 ай бұрын
Is there a way i could alter this to work with mirror? ive been struggling to find a good prediction tutorial for mirror
@Flarvain11 ай бұрын
Sorry i dont know enough about mirror to comment one way or the other
@LiteralPain355111 ай бұрын
@@Flarvain all good thanks for replying though. ive been struggling with it for ages -_-
@simonwitt2994 Жыл бұрын
Is the host faster then the clients for anyone else?
@jhonisjhoniss111 ай бұрын
It's happening because the Move(moveInput); inside ProcessLocalPlayerMovementis being called twice as a host. To fix it, just ensure the server doesn't call the move function inside the ProcessLocalPlayerMovement public void ProcessLocalPlayerMovement(Vector2 _moveInput) { tickDeltaTime += Time.deltaTime; if(tickDeltaTime > tickRate) { int bufferIndex = tick % buffer; MovePlayerWithServerTickServerRPC(tick, _moveInput); if(!IsServer) Move(_moveInput); HandleStates.InputState inputState = new() { tick = tick, moveInput = _moveInput, }; HandleStates.TransformStateRW transformState = new() { tick = tick, finalPos = transform.position, finalRot = transform.rotation, isMoving = true }; _inputStates[bufferIndex] = inputState; _transformStates[bufferIndex] = transformState; tickDeltaTime -= tickRate; if(tick == buffer) { tick = 0; } else { tick++; } } }