Do's or don'ts for SCPs

So I’m making this SCPF right, and I’ve scripted 99% of it right now, including front-end and back-end. The only thing left now is the SCPs. Are there any do’s or don’ts I have to consider?

1 Like

Do you have chosen what MTF units will be? If so, choose some SCP’s that they specialise on recontaining. You should consider what type of site do you have and what do you want to contain, is your site big enough? Is your site able to contain Euclid or Keter SCP’s? What type of GoI’s do you want to ally with? Ask those questions yourself and maybe you find the answers.

4 Likes

For scripting, you want to get the players every task.wait(1) second or half of that. You also want to make sure you fix any bugs, even if they don’t affect the scps because they can cause lag spikes in your game.

3 Likes

Don’t you think it’s better to just update a local table with game.Players.PlayerAdded and game.Players.PlayerRemoved?

2 Likes

What do you mean? If its on the client I would first fire a remote event whenever a player joins/leaves to the client.

2 Likes

what i mean is this in a serverscript handling the SCP:

local players = {}
game.Players.PlayerAdded:Connect(function(plr)
    table.insert(players, plr)
end)
game.Players.PlayerRemoving:Connect(function(plr)
    table.remove(players, table.find(players, plr)) -- i think this is how it works lol
end)
1 Like

That does work, but you could do game:GetService("Players"):GetPlayers() and it gets you a table of all the players.

2 Likes

They’re wanting to change data at a lower rate to reduce overhead, both solutions apply to certain scenarios, now we must know the full application @HeadBloxx elaborate the application of this heyooooooooo! Hope all of you are having a nice time btw!!

1 Like

To be honest. GetPlayers() is the same thing but its global. I really don’t think one is better than another, however with GetPlayers() you need (not really ‘need’) to loop. Again, it won’t matter if you take care of your game to stop most lag.

2 Likes

now we must know the full application @HeadBloxx elaborate the application of this

It’s just an SCP AI for an SCPF I’m finishing up right now.

1 Like

and yes it’s what @NobleBuild said, i want to reduce using resources for no reason (in this case going trough a for loop or .renderstepped event to update the players even tho they stay the same for a good period of time)

2 Likes

I have 90+ scps in my game. There is no way to reduce the lag unless you don’t reset the scps every x minutes. I have a maintenance script that restarts the server every 24 - 36 hours. I don’t think looping will make your game lag or use too many resources.

2 Likes

Holy mess that’s a logistical nightmare just thinking about all the extreme AI frantically roaming around… I’ve been pondering ways to achieve hundreds of AI with logic I’ll codename “Slipspace” for now…

1 Like

Yeah. I did though make my own ai scripts that only loops every 1 second, and it only gets the players. It helps a-lot.

2 Likes

I’ll take that into consideration, thanks!