Author Topic: Better Brick Collision [KotaiCol]  (Read 719 times)

Rain is client-sided, and the static shapes are not ghosted, so no.
Yes.  For rain I think you have to plan ahead.  Maybe use special bricks.
I had an idea once to use a spray can to "water proof" bricks.  You would spray it on the roof of your build and it would add the physical zones to the roof bricks.
so physical zones are laggy in large numbers?

why so? they don't render do they?

so physical zones are laggy in large numbers?

why so? they don't render do they?
probably related to interiors and their performance prior to map removal. seems odd now that i think about it, yeah.

maybe related to literally doubling the object count if you generate one per placed down brick? and them not being as optimized as bricks, and more akin to static shapes? dunno really.

probably related to interiors and their performance prior to map removal. seems odd now that i think about it, yeah.

maybe related to literally doubling the object count if you generate one per placed down brick? and them not being as optimized as bricks, and more akin to static shapes? dunno really.
maybe the fact that the game has to actively calculate the rain intersection and other stuff idk

or maybe octree related, but i think blockland has a minimum octree box size of a 4x4 or 8x8 cube

Tested 40000 zones in one scene.  The client drops from >1000 fps to ~160-300.  Server is giving lag spikes, likely due to processing going on in the background.
Deactivating the zones made no difference.
When I drop ghosting, I still get the lag spikes, but fps stays around 850-900. 

Testing @20000 & 10000 show shorter spikes, but they still appear at the same rate.  At 5000 It's almost impossible to detect.

Its easy to go over 5000 bricks, so... per brick rain-block just isn't practical.
Using a tool to apply it should be restricted, so some random mumbo can't apply it to a cube of 1x1f and lag the server.

I believe the lag has little to do with rendering.  Adding extra zones affects frame rate, but it has no where near the same effect as static shapes.


I tried the same tests with Triggers instead of PhysicalZones.  It takes about 2 times as many Triggers to get the same amount of lag.  And both are similar in that they must keep track of what objects are inside of them.

The physical zones are not needed by the server to do anything.
The client is the one that needs them, for the rain.
If the client could be convinced to create the physical zones on their side, then we could set the scope of the zones needed per client.
The rain block is only so big. idk how wide, but its typically only 100 units tall.  So we could limit physical zones to the area in a 100x cube around the player.  Further, we could limit it to bricks visible to the sky.

The server could certainly determine what bricks are appropriate for the client to generate physical zones for.
Im not sure how exactly it would send that data to the client.
I also dont know if a client can generate a physical zone on its own.

The server could also combine adjacent physical zones into a single physical zone, like how the trench wars mod does with dirt bricks.