Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Can't think of a way to get slow moving projectiles to sync across a network. #1

Closed
rbatistajs opened this issue Sep 27, 2017 · 3 comments

Comments

@rbatistajs
Copy link

I have been working on a small top down multiplayer shoot'em up. My problem is that I want my bullets to be slow moving so the standard raycast tricks that are normally used in multiplayer games don't apply in my case.

I do have a system for hit detection that is handled by the server but this results in bullets hitting on the server and damaging a player but on the clients screen the bullet was no where near them making it effectively impossible to dodge and results in the player feeling cheated quite frequently.

Do you know of any way to resolve this situation?

@joaoborks
Copy link
Owner

if you prefer I can answer in portuguese as well

Hey Robson, I'd suggest you to sync the bullets by using the NetworkTransform and sync the Rigidbody 3D and tweak the Network Send Rate to suit your needs. The bullet must only move server side, and the clients will have its properties synced. I can tell it works and doesn't seem cheated, beacuse I'm using this structure on a personal project.

The ideal situation with this framework would be to have a more efficient way to sync the Rigidbody than the NetworkTransform, but it is not ready to do that yet.

Hope it helps, good luck!

@rbatistajs
Copy link
Author

Vamos falar em português rsrs.

Então devo mandar um comando e criar a bala no servidor, e então sincronizar com os jogadores usando o NetworkTransform?

Não daria problemas com latência?
Pq o jogador estará um pouco a frente em comparação com o servidor,
a bala seria criada atras do jogador.

Eu estou tentando criar um jogo um pouco parecido com brawl stars.
Só que a predição de movimento quebra um pouco a precisão, pq as balas tem um certo range e velocidade lentas.

@joaoborks
Copy link
Owner

Sim, e problema com latencia é o core de qualquer jogo multiplayer. Com o NetworkTransform da pra resolver em parte o problema, nao é o ideal mas funciona. Assim que a framework tiver estável, ela vai ter um funcionamento mais eficiente que vai mascarar a latencia.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants