How would i go about increasing performance in my game?

I have a game, that runs perfectly fine in studio (+60 fps) but as soon as i go an play test it i get 35 fps max, i have tried StreamingEnabled but it doesnt improve performance at all (it may be decreasing it but i could be wrong).
I have tried some tips such as StreamingEnabled, Voxel Lightning, …

So does anybody have ideas/tips to improve performance?

Thx in advance!

7 Likes

That is strange. Studio is always slower for me compared to the client. Maybe you have studio on low graphics mode.

2 Likes

Can you provide any images/videos of what the game may look like?
The issue can lie in meshes or certain models not rendering in studio.

2 Likes

no, i have studio on the highest graphics lvl

3 Likes

sure, here are some pics from the map/game





while it does have a lot of trees (~1700) the map used to have ~4400 trees

4 Likes

maybe you have a lot of things in server storage or another storage and it slows down your game

1 Like

no, i only have things the game needs in Server/ReplicatedStorage

1 Like

Are there lots of things in server storage?

1 Like

nope, in serverstorage there are only the tanks for the game, effects for the game and debug things and in ReplicatedStorage there are only RemoteEvents

1 Like

idk maybe try putting them in workspace and see how that goes or just removing models

1 Like

what would that change, also what models should i remove, i cant cut down the trees otherwise the map just look emtpy

1 Like

The issue for studio running better is probably because the screen in studio is normally much smaller than the screen in the default roblox game. Your computer can render much less depending on how small the screen is.

If you have alot of unions/meshes in the game it will definitely lag out. Try to pinpoint laggy objects by going near them and see if your frames drop. And if you can replace those objects with something less laggier.

1 Like

If you only lag in playtest you need to check your scripts. If you don’t lag in studio and your scripts are perfect you shouldn’t lag in playtest. If you don’t lag in Roblox Player then check your server scripts. If you do lag in Roblox Player check your local scripts.

2 Likes

well i lag when playtesting in studio and in the roblox player but i even used the profiler to maybe find the issue but i didnt so, what should i test/look out for?

1 Like

well the area of lag is the whole map, if most of the map is in view the fps drops, altho i have tried to replace trees with trees with less parts and so on and it kinda improved perfromance.

1 Like

But i did notice when i was aiming/in the scope the fps went back to +60 so it could either be a issue with a cam script ot the amout of objects in view

1 Like

You could try adding some fog so it doesn’t have to render so much or you could turn off shadows for some parts or objects that have a lot of shadow that’s not that visible!

1 Like

Sadly i cant really turn up the fog cause you need to be able to see things in a distance, and i have tried to turn off shadows for the trees and bushes but it didnt do anything performance wise. Maybe i used the wrong settings for StreamingEnabled but im not sure
Edit: idk if its relevant but, i only get the fps drops on the client, when i playtest and the go to the server view the fps are fine again

1 Like

Then yeah, it might be the camera script you’re using.

1 Like

ok, if you want to take a look at the cam scripts:

(sets the cam to the scope view)

local UpdateCam = function()
	RunService.Heartbeat:Connect(function()
		if InScope == true then
			Camera.CameraType = Enum.CameraType.Scriptable
			Camera.CameraSubject = TankObj.Tank.TurretGroup.BarrelGroup.BarrelParts.Barrel.ScopePart
			Camera.CFrame = TankObj.Tank.TurretGroup.BarrelGroup.BarrelParts.Barrel.ScopePart.CFrame
		end
	end)
end

(sets the cam view to the menu background cam)

Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = MainMenuCamPart.CFrame
Camera.CameraSubject = MainMenuCamPart	

(sets the cam view to the player)

Camera.CameraType = Enum.CameraType.Custom
				Camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
				Camera.CFrame = game.Players.LocalPlayer.Character.Head.CFrame
				Camera.FieldOfView = 70

and these are all the scripts that use the cam i think

1 Like