How would I make Competitive Rank System?

Hello, I’m making a fps game with Tiers like other games with ranked mode.(LoL, Valorant, BedWars, etc)

So how do I create a Ranking System like this? for example:
Player get assigned in a tier(gold, platinum, diamond…) and If a player beats a better player after the game, the player’s rank goes up a lot, and If the player loses to a worse player, rank goes down. but I have no ideas. how to make this??

Thanks for any help!

2 Likes

Just when the round ends you can just check whoever won and whoever losts’ tier and then do stuff accordingly

2 Likes

im not a good coder so correct me indeed)

local plr = game.Players
local kills = Instance.new("IntValue")
kills.Name = "Whydididothis"
local diamondtier = Instance.new("Folder")
local goldtier = Instance.new("Folder")
tiers{diamondtier,goldtier,platinumtier}

if plr kills == > 150 --i dont have studio opened
print(goldtier)
plr.Teams.goldtier = true

Correct me if im right :wink:

3 Likes

This script is completely wrong you messed up in many ways like forgetting an end and using the infamous == > method (it’s =>), not setting instance parents, calling variables in unknown ways, and more… I can’t write a script cuz I’m in school but I’ll reply later today if nobody does lol

2 Likes

I just cant code lol thanks for the help though

2 Likes

I would say that going into stuff like if a PRO players loses to a worse player is useless.

I would say the rank up/down should be about the kill count, the contribution, and some in game stuff like MVP etc. After that you could do solid %

If you do less contribution you get less points and vice versa

2 Likes

Good start, you could try something like this:

local Players = game:GetService("Players")

local function updatePlayerTier(player)
	if player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("kills") then
		local killCount = player.leaderstats.kills.Value

		if killCount >= 150 then
			local goldTier = game.Teams:FindFirstChild("goldTier")
			if goldTier then
				player.Team = goldTier
				-- Maybe send a notification to them? Like, game.ReplicatedStorage.LevelledUp:fireClient(player)
				local event = Instance.new("RemoteEvent")
				event:FireClient()
			end
		end
	elseif not player:FindFirstChild("leaderstats") or not player.leaderstats:FindFirstChild("Kills") then
		local leaderstats = Instance.new("Folder", player)
		leaderstats.Name =  "leaderstats"
		
		local kills = Instance.new("NumberValue", leaderstats)
		kills.Name = "Kills"
	end
end

Players.PlayerAdded:Connect(function(player)
	updatePlayerTier(player)
end)

for i, Player in pairs(Players:GetPlayers()) do
	if Player:FindFirstChild("leaderstats") and Player.leaderstats:FindFirstChild("kills") then
		Player.leaderstats.kills.Changed:Connect(function()
			updatePlayerTier(Player)
		end)
	end
end
2 Likes

I think that this question should go into game design, but whatever.
There are many types of ranked matchmaking systems. Some are better, some are more casual, some are completely broken, and some don’t even have a meaning; you are just globally ranked on some leaderboard, and that’s it.

The games you refer to use the most common “ELO” system. Most commonly, it is split into several rank categories; the higher your “elo,” the higher your skill. It starts low; with every win, you get more points depending on how you did that match; if you get a lot of kills, you get more as a bonus. If you lose the game completely, then you lose Elo. Higher ranks tend to have bigger multipliers of losses, so it is harder for people to maintain them. This isn’t the most ideal system if implemented bare bones since “smurfing” exists where high-ranked players play in low-elo matches. You can even implement your own ranking system if you want; you just need some imagination. I like the weighting system more, which can be seen in most rhythm games like osu! That is simply based on your rank being a sum of your best scores. For FPS shooters or other strategic games, it really isn’t something that works from a community perspective. Also keep in mind that making a properly balanced ranking system is quite hard and will require a lot of complex algorithms to calculate the player’s rank fairly.

Again, I think this should go into game design since scripting support means if you have an issue with a particular script you made, it’s not really just to get free code. Try to build something from scratch yourself and see how that would work. I mean, if you don’t know how to script, then learn it; no one can actually help you script it, as that would be spoon-feeding. There are many resources online on how these algorithms work, so you shouldn’t have trouble making them. Good luck and happy coding!

Useful resources from the internet that might help you make the right decision:
osu!'s performance points system
osu! ranking explained in detail
the elo rating system
deep dive in valorant’s rating system

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.