#Is there a way to spawn networkobjects via Client instead of Server in NGO?

1 messages · Page 1 of 1 (latest)

azure basalt
#

My current setup:
NGO - Netcode
EOS - Lobby & Relay (backend)
I have already implemented the following:
Host Migration (Doesn't require any backend)
(Player Characters) Prediction and Reconciliation
Player Host Server / Client architecture

My current roadblock:
I need to figure out a way to also include my prediction and reconciliation for instantiated objects e.g (Bullet Projectiles, these do not travel fast, they travel slow and via physics / rigidbody)
The issue is that the .Spawn command can only be called on the Server, I need the bullet to appear instantly when player client hits the fire button for the sake of prediction and reconciliation.
Is there a method to do this? I understand that there's unity's new distributed authority, but that seems to be reliance on unity's backend/multiplayer services (correct me if I'm wrong). Hence I won't be able to use that with my current setup as I'm opting for the free route. So I'm wondering if there's a workaround to this if anyone knows?

wraith furnace
#

Distributed Authority is as "free" as Lobby and Relay are.

I have seen people implement this before on Client-Server setups with NGO. At a high level, you spawn the object locally and store some sort of ID with it, you send a message to the server to .Spawn() the actual NetworkObject and store that same ID with the NO as well, and then when the NetworkObject spawns on the local client, the original local clone/ghost is found via the ID and deleted with the NO taking its place.

chilly kayak
#

DA's free tier is a bit less than than Relay's and costs a bit more when you go over the free tier

azure basalt
#

I think one way I can avoid having 2 separate bullet prefabs is to simply disable* the appropriate components if it is either an offline bullet or a network object bullet

wraith furnace
#

Distributed Authority, Lobby, Relay, etc. all have free tiers and then pay as you go pricing based on usage after the free tier is exceeded. The DA free tier is a bit less because it tends to consume less bandwidth overall (I believe)

azure basalt
# wraith furnace Probably not a bad idea.

Alright I'll give the client-server implementation a roll since my current setup is based on that. The only concern is if there's a high position mismatch between client and server (bullet object) but since other devs are rolling with this implementation I assume that isn't much of a concern or at most require some sort of correction handling. Thanks for the info.

wraith furnace
chilly kayak
chilly kayak
azure basalt
#

It's a fantasy like game where there's different type of funny type of bullets

chilly kayak
#

As long as its not Random, it will be tricky to sync up but not impossible

azure basalt
#

I'm guessing if there's too much mismatch in position what those devs implement would be:
disabling the network bullet's mesh only on the local owner client and only until the fake bullet has been smooth / lerp to the network bullet's position. Then delete the offline bullet and enable mesh of the network bullet

chilly kayak
azure basalt
chilly kayak
azure basalt
chilly kayak
#

basically. But there is always more than one way of doing things. Just disabling the mesh on the owner client might be easier