Optimizing Dropper Physics in My Tycoon Game – High Physics KB/s + Ping Issues

Hello, ive been working on a tycoon game, and im currently handling all dropper drop physics on the server. The system works fine, but I’ve noticed that my game’s ping averages around 200ms regardless of how many players are in the server.

When I check the Physics KB/s in the developer console, it’s around 150, which seems really high for a tycoon game. The only physics-heavy elements in my game are the dropper drops, which fall and move through the tycoon system. Here is a screenshot of the server stats in an active server with a few players:

I currently have these functions in the main tycoon handler script that clones these drops, which in my case are “seeds”, every 5 seconds on the server:

local function spawnDrop(dropper, player)
	if not player and player ~= ownerValue then return end

	local dropModel = seedFolder:FindFirstChild("Seed1")
	if not dropModel then return end 
	
	dropModel = dropModel:Clone()

	local drop = dropModel:FindFirstChild("Seed")
	local dropMain = dropModel:FindFirstChild("Main")

	if not drop or not dropMain then return end 

	drop.Color = dropper:FindFirstChild("DropColour") 
	drop.Material = dropper:FindFirstChild("DropMaterial")
	
	dropModel:SetPrimaryPartCFrame(dropper.Drop.CFrame * CFrame.new(0, -1, 0))

	dropModel.Name = dropper:FindFirstChild("DropType") 
	dropModel.Parent = dropsFolder

	for _, part in ipairs(dropModel:GetChildren()) do
		if part:IsA("BasePart") then
			part.CollisionGroup = dropCollisionGroupName
		end
	end

	local cash = Instance.new("IntValue")
	cash.Name = "Cash"

	local cashValue = dropper:FindFirstChild("CashValue")
	cash.Value = cashValue and cashValue.Value * cashMultiplier or 1
	cash.Parent = dropModel

	local billboardGui = dropMain:FindFirstChild("BillboardGui")
	if billboardGui then
		local valueText = billboardGui:FindFirstChild("ValueText")
		if valueText then
			valueText.Text = "$" .. cash.Value
			cash.Changed:Connect(function()
				valueText.Text = "$" .. cash.Value
			end)
		end
	end

	debris:AddItem(dropModel, 10) 
	
	dropMain:SetNetworkOwner(player)
end

local function startDropperLoop(dropper, player)
	local running = true
	local function dropLoop()
		while running and ownerValue.Value == player do
			task.wait(5)  
			spawnDrop(dropper, player)
		end
	end
end

I’m wondering if there’s a more efficient way to handle the dropper physics to reduce the network strain and improve performance. Should I consider moving some of the physics calculations to the client, or is there a better approach?

Any advice would be greatly appreciated. Thanks.

did you know about this?https://create.roblox.com/docs/reference/engine/classes/Workspace#PhysicsSteppingMethod

1 Like

No I did not, ill try it out and see if it fixes anything. Thank you.

Using this on the client:

  • Eliminates performance issues affecting the server. It becomes a client issue.
  • Oops! StreamingEnabled fixed that.

It is entirely to your advantage to use this on the client!

If drop rewards were handled on the client, how would I make sure that the player is properly rewarded with cash for each drop?

What if you make each dropper a proximity based LocalScript? That way, it only appears for the player when they are close. Simulate the amount that would be generated elsewise and add that to the total

Actually not sure about that. You just don’t have to create a perfect system, whatever way you decide.