How many rays would be a healthy amount for the server with 75-100 players in game?

I am not a programmer myself but I recently hired a programmer and we haven’t dealt with a large server before so we don’t really know what a healthy amount would be. We are making a bullet drop system and can’t figure out what a healthy count for rays would be. We started with a linear system but I wanted an exponential system so we want to know, with 100 players in a game together, what a healthy count is.

1 Like

You can make the bullets client-side. The only problem with this is that other players can’t see bullet droppings

Wouldn’t client sided create issues with exploiting? My programmer already addressed that issue.

I think the point is, he wants to know how many rays is a healthy amount to use per bullet shot for a bullet drop type system. He isn’t asking if it should be client-side or server-side.

It’s not about the amount of raycasts so much as the magnitude of the vector that you’re testing for intersections on. So fifty 100 magnitude raycast intersection tests may only be marginally more expensive than one 5,000 magnitude intersection test.

9 Likes

I have a game that uses raycasts for bullets. It’s a base for a war group, so the battles can get pretty insane, with maybe 150 bullets being in the air at any given moment with ~60 players in the game. The bullets have simulated physics and rays for every bullet are calculated on every client to support tracer rounds.

We haven’t ever had any performance problems regarding the amount of bullets. I’d say you’ll be fine with 150 bullet’s worth of raycasts, but it’s likely you’d be fine if you go higher all the way to 250.

6 Likes

I don’t understand why you’d ever want an exponential system for your netcode? It’s pretty much the one thing you want to avoid at any cost because at greater server loads (>50) your Big-O function becomes crazy time / resource intensive.

It’s all dependent on your games mechanics. Generally, you want the lowest number of rays, especially on the server as possible because they are really intensive on the server. It will probably be fine if guns are your primary mechanic, but in a complicated game with other components, it can easily start to cause issues.