BungeeBlox - Server Manager

**BungeeBlox**
-
A global server management system.

BungeeBlox is a open source module that allows users to manage their servers ingame globally. This system is inspired by BungeeCord. It’s planned to be used for any type of games with Lobbies. More updates might be coming soon. If you’re using this system you don’t have to give me credit but feel free to message me if you’re using the system. I’d like to check it out and how it works!

Please note that this is a early version of this system.
It has never been tested / used in a big game before.

This system is able to work using

How does it work?

BungeeBlox works mostly with MessagingService. Every Server created with the System gets their own unique Code using the following system.

Code creator
function GenerateCode()
	local temp = ""
	for segment = 1,3 do
		for char = 1,4 do
			temp = temp .. keys[math.random(1,#keys)]
		end
		if segment < 3 then
			temp = temp .. "-"
		end
	end
	return temp
end

With this Code it has their own listener with MessagingService, beeing able to message a specific server trough the Lobby. Using OOP every server has their ReservedCode (TeleportService:ReserveServer) stored in the data which allows the system to teleport a player to the specific server.

How can all Lobbies be synced?

Now this is a bit more complex but not too complex. First of every server has their own data stored aswell using TeleportData. To get every running servers data a command is beeing executed with MessagingService. During this a new listener gets started for 5 seconds. In this time all servers have time to respond using the new listener. If they don’t respond in this time, its not going to be in the Lobby.

Syncing all Lobbies
function Whisper:GetRunningServers()
	CoreData.Services.MessagingService:PublishAsync("GetServerData","")
	
	local Servers = {}
	
	local connection
	
	connection = CoreData.Services.MessagingService:SubscribeAsync("ServerData", function(message)
		local data = CoreData.Services.HttpService:JSONDecode(message.Data)
		local found = false
		
		if #Servers >= 1 then
			for i, v in pairs(Servers) do
				if i == data[1] then
					found = true
					break
				end
			end
		end
		
		if not found then
			Servers[data[1]] = data
		end
	end)
	
	wait(5)

	connection:Disconnect()
	
	if #Servers == 0 then return end
	
	CoreData.Servers = Servers
end

How can I get the system?

You can get BungeeBlox by editing this game. This source can be copied. A example is included aswell. Don’t forget to also copy the second places source. Its important for the system to work correctly.

How can I report bugs?

If you find any bugs in this system. Please direct message me on the forums about this problem. I will respond ASAP.


Now this should be enough information for now.

Feel free to ask questions, give ideas or feedback below!

11 Likes

Sounds like BungeeCords, Looks pretty cool tho!

3 Likes

Could you please add a setup guide?

Will do ASAP! Thanks for the suggestion. Thought the example in the place was enough, but thats still a good idea.

2 Likes

Could you also add the source code here please?

Sure! Will do that too when i create the setup guide.

2 Likes

Could you also add some documentation.