How can I optimize my game?

I’ve been working on my game for around a year now and I am now facing a poor framerate both in Studio and in-game.

My game is made up of multiple rooms of varying detail connecting without any method. It is primarily handmade, studio builds and pretty simple scripts I found on Youtube or on the DevForum.
It was all running fine until I placed a large model I made in a different world, since then my framerate has been halved when I am looking directly at my project (60fps to 15-30fps). This has happened to me before when spawning in massive models on different games but this time its crucial.

I use future lighting, however the problem persists even with lower graphics.
I will provide any needed information to help find a solution.

Check out game here

Images of project

COMPATIBILITY LIGHTING




FUTURE LIGHTING


Thank you for any help !

1 Like

Actually, its running quite well for me. I know future lighting is a little more performance intensive compared to shadowmap, but if the problem is still happening with lower graphics, I’m not sure what could be causing the issue.

From what I’ve read, lowering the graphics essentially changes the lighting environment to something like voxel (starting at level 1) all the way up to future (level 10). Environments like compatibility and shadowmap are somewhere in the middle, unless you have shadowmap selected in the lighting property, which would make level 10 a shadowmap environment in-game.

What large model did you put into your game? Do you experience any FPS game from lowering the graphics or changing from future to shadowmap through the studio lighting properties?

1 Like

In studio, I get 30~fps in compatibility and 20~fps in future. I would use something less intense instead of future lighting but the flashlight I use does not work nearly as well in anything but future with 4+ graphics, but maybe I should experiment a bit with player lighting.

Future lighting preformance

ShadowMap lighting preformance

The large model was a 496-part set of figures that I had made, then shrunk and added a sound and a script I found on the Devforum to each. I now make the rooms in a different world and then spawn them into my game as the lag I have moving a part is too much.

The script
local badgeId = 2129872104 -- Replace the badge ID with your own obviously!
local badgeServ = game:GetService("BadgeService")
local clickDetector = Instance.new("ClickDetector") -- Insert a new click detector in the part
--local clickDetector = script.Parent.ClickDetector -- Alternatively, index an already existent one

clickDetector.MouseClick:Connect(function(plr) -- Listen for the click
	badgeServ:AwardBadge(plr.UserId, badgeId) -- Award the player the badge
	script.Parent.Sound:Play()
end)

clickDetector.Parent = script.Parent -- Parent the click detector to the part

The game itself is 15k parts but I expect it to be around 17k+ by the end of it. I guess it’s primarily the lighting and maybe my computer that’s lagging me.

I really appreciate your information and you testing my game ! I don’t actually know anyone who would have other than devforum citizens lol

Absolutely, no worries! The only thing I can think of is that possibly the figure meshes could be causing lag, but I dont really work with figures/characters. I can’t imagine it being the scripts if they are only playing a sound and I don’t know that it would cause lag in non-testing mode in studio (just building, not running and testing).

Another thing could be your computer. Do you have a laptop or desktop? What are your specs?

I figure if nothing else it’s just my computer, I actually use a Steam Deck™ connected to a dock, which isn’t too powerful but gets the job done.


sadly and surprisingly, roblox isn’t actually supported on Linux (what the Steam Deck uses) so I use a third-party software called Grape Juice to run roblox and roblox studio.

If people say that my game runs fine for them then I’ll just have to take their word for it and keep moving forward. I’ll try to optimize everything I can with removing collisions, shadows, and whatever else.
Thank you for your help ! No reply necessary

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.