How do I make a territory claiming like paper.io?

Hello. I am currently trying to make Paper.io on Roblox, and I am currently stuck on how to make the territory claiming part. Here is a reference:


(website is https://paper-io.com)

Any ideas on how to make this in Roblox with parts? Thanks in advance

It would only be possible in a grid fasion, not a blob-like fasion as Paperio does it.

3 Likes

I agree with blueberry, making it the way they did it would be really hard. I would use a giant grid and just check at what parts the player is touching or I would cast rays to have some sort of path.

2 Likes

So would I have to make the entire map into pixels, and then fill those pixels in?

2 Likes

What I would do is have a code that creates a grid of square parts. Then change their color to the players whenever he touches it (Make sure that 2 players cant have the exact same color). Then when it detects a connection to owned territory, it looks at the path the player did outside of his territory and fill all the other parts that were within as marked territory. And so on, the player will be able to capture more and more territory.

I don’t think this is the most optimized way to do it. But definitely one of the simplest.

2 Likes

you could do it by using terrain and like making all the materials a plain white color that way you could change it and use the fill? I don’t rlly know much about terrain so I don’t know if that would work

This would be much harder because fill uses a Region3. With parts, he could just check near parts and fill up until there is no more white bricks within the captured zone.

Whit this strategy, he can cover up any shapes the player will make. (Not only rectangles)

1 Like