Projectiles vs Coins

Why are projectiles spawning is managed differently from coins and why they’re not added to the network prefab list?

Coins and Projectiles are different. Coins already exist on the client. They are placed where the server tells them to be placed, and hidden when the server tells them it got picked up, but they already exist on the client. There will always be x amount of coins (200 in the course) no matter what.
Projectiles are created on your client (the visible client version), and then it needs to also be created on the other clients, so the server creates it’s own invisible copy to track it, and tell all the other clients to spawn the client versions. We could have them ‘already on the client’ and hidden, but you don’t really know how many to create before you start because there could be 2 players or 100 players, all shooting bullets at the same time. It’s pointless having 10,000 invisible bullets hanging around in case there are 100 players

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms