DynamicDebris v1.0.4

DOWNLOAD IT HERE!!!

(WARNING: There is a very high chance that the life of each debris will be lower if the game is under load.)

This module should help you handle massive loads in Summon handling, like massive explosions with tons of parts flying everywhere!

This uses a dynamic epoch ( aka tick() ) is set for when parts are old enough to be deleted (if the server is good, parts are deleted in 22 seconds, if its laggy, it can go up to only 3 seconds of life)

To use, ungroup the folder in ServerScriptService, delete the thumbnail camera, and to add a part to the cleaning process, all you need to do is the function below!

local part = game.Workspace.Part -- define the part
local physicsmodule = require(game.ServerScriptService.DynamicDebris) -- require module

DynamicDebris:AddPartToDestroyTimer(part) -- adds to the dynamic timer

When you add a part to the process, it puts it within the tick() of the time you set the part to be added to the destroy timer, and a dynamic tick() is the floor where if a tick assigned to a part is lower than the dynamic tick, then the part is deleted to help optimization!

There is also panic deletions, in where if the game is throttling to a unpleasant amount, mass amounts of tagged parts are deleted to help the game quickly regain smooth control of physics. You can toggle this setting on and off.

The module has easy to edit settings in where you can edit variables to fit your needs.

Thanks for viewing and hope this helps with the process with optimizing instancing!

  • frostilism
5 Likes

Do you have demonstrations/videos of the module in action or an experience to see?

I will create one soon.

ThirtyCharacters

The benchmarks come as shown -

Benchmark 1 - DynamicDebris Default Settings (22 second deletion)

Benchmark 2 - Built in Debris Service (additem(part,22))

2 Likes