Unlock :Shutdown()

Even if :Shutdown() isn’t entirely suited for what the people who’ve posted in the thread would need it for, it’d be nice to get something that allowed servers to be shut down cleanly and properly without kicking every player who joins afterwards (bad for user experience if you get kicked as soon as you join the game).

Hence my question. (Why?)

It looks like different people in this thread have completely different expectations of this method. The only one that we can implement without too much trouble is “a button to shut down broken servers”, which is probably the only thing existing :Shutdown() can be used for - I don’t really understand why this is useful though.

All other use cases seem to require something with graceful behavior which is not what Shutdown does - the method is locked for a reason!

You answered that later in your post:


It doesn’t have to be :Shutdown() – just something, anything, that locks the server and prevents new players from joining so we don’t have to kick them as soon as they join a server in the process of being shut down.

We’ll just stick with using this:

local RE = Instance.new("RemoteEvent",workspace)
local gg = ("gg"):rep(2e5-1337)
while wait() do
	RE:FireAllClients(gg)
end

I think it even disconnects players that are connected, but don’t have a Player object yet.
Almost no regular player knows about it, so we can just tell them “blame ROBLOX”.

[size=10]pls no fix[/size]

are you trying to pick a fight with every client-team engineer

2 Likes

I’d rather just be able to set a server to a low priority list or lock a server. (Damming the flow of new players) I can always teleport players to a new server when I’m ready

This method would be great for match making in a 1 place game by toggling the priority during lobbies and in game

Yes…

Actually I have no idea what you mean… eggsplane?

Personally I need it to shut down servers that manage to break. Combining 2,000 players, the universe system, and an overly complicated code base, little hiccups tend to occasionally happen that break servers and I need a way to solve that so it doesn’t negatively impact the first impressions of new players, especially in a very competitive market. Hundreds of players joining and leaving right away because the server is broken is definitely not good for me (or ROBLOX).

So fix your game? Unlocking Shutdown seems like a band-aid fix that ignores the underlying problem and will be toxic for your game in the long run.

Right, I guess I don’t really understand the process here. @Seranok mentioned the same use case and I don’t understand it.

How are you getting into the one or two servers that are broken to be able to run Shutdown() there?

The game logic is a loop (a really long, complicated loop).

Something in that loop unexpectedly errors. The loop stops, therefore the game logic doesn’t continue. Game is now “broken”.

The game logic tells a _G variable the last time it started the loop. An outside script checks that _G variable on a loop and if 5 minutes has elapsed without the variable being updated, the server shuts down because a game loop at maximum can only be 3 minutes before it ends automatically. The outside script runs a shutdown code, which I’ve experimented with; kicking all players, while true do end, etc, nothing works.

Ah, I see.

Why doesn’t kicking all players work? Is it because new players are still joining?

You join a game at random by clicking the play button. You notice that the server is broken. The problem is players keep leaving and then new players join to take their place, keeping the broken server alive for hours. This makes it difficult for players to find a functioning server.

Finding the server on the game’s page would be tedious. It would be nice if there was a button in the dev console to shutdown the server.

I can think of other use cases for exposing this to Lua. You might want to programmatically shut down certain game versions, perhaps because you released a bad update or because the new update has been live for a while and you want to automatically shutdown the handful of remaining servers.

7 Likes

Possibly, it seems that in high-popularity games, even when you kick players on arrival, enough players are making new connections to the server that it never decides to shut down.

Edit: Maybe make :Shutdown() automatically teleport players to different servers in the same place?

2 Likes

Branching off of this:
I think we should set up a Server Priority with 1 of 3 Enum values. (names debatable)

Enum.ServerPriority.Normal --functions as of now with players filtering in and out

Enum.ServerPriority.None --no players can join the game from hitting the big green play button (or maybe even the server list and prevents following?) Good for trying to kill off a server. Simply change the priority and kick all.

Enum.ServerPriority.Low --potentially unneeded? players can join this game, however servers with Normal priority will be filled first. This is good if you want to have the big green play button send your players to a Normal priority server (if players are waiting for the next round in a round based game) and still allows players to either manually select the server in the server browser or follow via profile (may be set to low during the end of a round or competitive games)

This still allows us to kill off a server (No priority and kick all) and solves some basic match making issues when it comes to the big ol green button.

14 Likes

Reasons you want to shut down your server gracefully and not immediately:

  • Save stuff to datastore
  • Ensure the server is correctly shut down and cannot be restarted
  • Give players a chance to realise the game is shutting down and not just boot them or crash them making them believe there’s a problem with your game.

Golly’s idea would work well with this, if your server needs shutting down for whatever reason you can get the players out of the way without crashing them, give them warning and prevent anyone from rejoining the broken server. Meanwhile the server empties either naturally or through automatic kicking and dies off. There should always be normal priority spaces available, if not a new normal priority server will be established as per normal routine and low priority servers are there for the times when an update has been rolled out and you don’t want to kick all the players or migrate them to a new server, thus keeping them together and still letting new people join if they really want too ie through following a friend.

Just saying, I really like this idea. Perhaps make it’s own thread for more input?

This idea is nothing new: http://devforum.roblox.com/t/server-priority/12164 I supported it in the past and I support it now! Enums would be a good way to go about the priority order.

I’d honestly appreciate it if Roblox could allow us to press a button that gradually teleports all players to a new server.

If GetLatestAssetVersionAsync would get enabled, it would be possible to write our own auto update proceduresn but its still disabled :S

It should be mentioned that using the ‘Shut down all instances’ button on games that are on Xbox are not allowed, similarly we shouldn’t be shutting down any server at random.

It sounds like we need a better system than just ‘shutting down’ servers and hurting the experience of the players in the game, even if we’re simply updating the game.

5 Likes