As seen with the recent Jailbreak event, it seems that live events are very beneficial to a game. But I never quite understood how they work. For example how do all servers have a mutual time for when an event occurs. I wish to add this to my game Anime Fighting Simulator which recently have been getting around 15k players concurrent daily, I do not want to add anything that could potentially break the entire game. I have many questions regarding them:
Would live events need to be coded before a game comes out? For example, there’s already a large fan base and a huge amount of data behind it, would it be possible to add a live events feature after a game as already be popularised.
Would I need to shutdown all servers in order for servers to be the most up to date? Of course this can hit the player count drastically if there isn’t a large amount of players before shutdown.
What scripting aspects would I need to include? Would I need to use tick()? What else is there involved. I’m not asking for an entire script, but the right direction and guidance.
How would I create live events as games are up without having to shutdown? For example, Ninja Legends has an 1000x multiplier for a specific weekend in the future, I’m not sure if they can change these on the stop without having to shutdown servers so that servers are up to date with the latest limited time multiplier, if this is possible how could I achieve this?
Is there anything else I should know about beforehand?
If you where doing a live event you would usually have to use cross server communication for it to work. And yes you would also have to shutdown all servers so the scripts will be able to be updated. But that is a big task when doing events. So good luck.
All your servers would have to be set up to handle it beforehand. Doing a live event could be orchestrated in a variety of ways. The easiest way would be to use os.time() on the server and use that value to indicate the start/stop times of the event. The event could then be programmed accordingly. Again, your servers would have to be updated to handle it.
Alternatively, you could use an external server to orchestrate the event, but that would probably be a bit overkill for most situations.
Roblox recently added a new button to migrate servers to newer versions, instead of just shutting all the servers down. I don’t know entirely how this works, but I imagine that it simply teleports players in old servers to new ones, then shuts down those old ones.
Yes typically I announce on my server that I am going to shutdown. I am just fortunate enough to have a relatively large player base that is willing to return back to the game.
You could set it up so that your ‘post event environment’ is already part of the same update that has your event. And new servers that start after your event has ended will automatically apply your post event environment to the game.
This would require some more upfront planning but will make the transition from pre-event to post-event much smoother and without the need for shutting down all the servers.
And then shortly after, when player counts go back to relatively lower levels, you can publish an update which removes your ‘pre-event environment’ and event code. And hopefully without the need for shutting down with that update as well.