How to optimize my game?

Hello everyone! So i made tower defense game, but it lags very much!

I tried to move all other things except for map into the server storage, a little bit better but still lags very much! I tried to make all mesh parts collision “Hull” player don’t interacting with, but it still lags very much!

Well, of course it lags when 100-200 zombies are at 1 point at the same time, but how could i make it less laggy? Maybe i can use some script that will hide things player don’t see? Is there anything else i can do?

Games like tower defense simulator/tower battles doesn’t seem to have that problem (well, they are, but lag is much smaller). How can i use so much zombies at the same time and make my game don’t lag as much as possible?

3 Likes

I’m not sure on the exact specs of how performant things are, but there can be many reasons your game is lagging. I do know that mesh parts lag your game more than parts iirc.

3 Likes

Well i know that meshparts are makes game more laggy, but i can’t use my map without them.

3 Likes

Unless your map and zombies are real high poly, then it’s probably slow because of something you’re doing in one of your scripts, unrelated to rendering. Pathfinding for 200 enemies could be slow, but you would need to benchmark it yourself to find out whats lagging it

2 Likes

Use collision groups.

Set any of the unused states of a humanoid to false.

Play VFX on the client

And if it won’t break your game, set workspaces property “TouchUsesCollisionGroup” to true.

This is all I can think of off the top of my head.

1 Like

I don’t use pathfinding, i use waypoints, and also only meshes i use on my map is canyon mesh.

1 Like