You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.
Specifically for mechanics like building and shooting. To compensate for server lag aka the delay between when the clients presses a button and the server processing the request to spawn an actor, I will eventually try to spawn the actor on the client first and remove it later in hopes that the actor has spawned on the server by then.
The text was updated successfully, but these errors were encountered:
Client side prediction for building was implemented by first building on the client, assigning that structure an id ,adding this structure with the assigned id to an array, then calling a server rpc to spawn that exact same structure. From that rpc, a client rpc would be called to destroy that structure with that specific id by searching through an array that is only on the client side. This was implemented in 0af9b39.
Not the most efficient. A better solution, albeit it would require more space, would be to spawn all the structures ahead of time, but make them invisible.
Specifically for mechanics like building and shooting. To compensate for server lag aka the delay between when the clients presses a button and the server processing the request to spawn an actor, I will eventually try to spawn the actor on the client first and remove it later in hopes that the actor has spawned on the server by then.
The text was updated successfully, but these errors were encountered: