Is high script activity always bad?

Hey, so a game I’m working has a lot of moving parts, and in general just a lot of stuff going on. It’s also a level-based game, where certain levels might have a larger number of game objects that do more intensive tasks.

I noticed for one level, the core game controller was having an activity rate of about 5-7 percent.

However, I didn’t personally experience frame rate issues.

So my question, is higher script activity always a sign of trouble? I’ve really been struggling trying to optimize this game. One mistake I did make was not taking the grid approach, where objects can be moved on a specific grid, and instead of doing a lot of raycasting on a per-frame basis, I could simply check objects’ positions in a table for the grid, e.g: Is object X on tile Y. So that’s definitely an opportunity I missed.

Just was wondering about this. Thanks.

1 Like

Yes. This is because of moving parts, all the parts are moving 1 sec/frame rate

If you have a low-end pc (potato pc) then it will crash the whole game.
To fix this you should transfer these to a local script. And add graphics settings to it.

Like local script is only working for yourself only so the server should be running smooth

To check how many frames are game using you can use HeartBeat or RenderStepped.

2 Likes