How Battle Royale Games Pick the Next Safe Zone: The Math Behind the Circle
If you’ve ever played a battle royale like PUBG, you know the feeling: the circle closes, the next safe zone pops up, and you hope it lands near you. It can feel like pure luck. It is not.
Behind every new zone is a small piece of geometry, a random number generator, and a few rules that keep the game fair and playable. In this post, we'll break down how a game can choose its next zone, and how you could build the same system yourself.
A quick note: this is a simplified model of how a zone system can work, based on a game-dev explainer. Real games tune the numbers differently from phase to phase, but the core idea is the same.
The Problem: Random, But Not Too Random
The game needs the next zone to feel unpredictable. But it also has some strict rules:
- The new zone must be smaller than the current one.
- The new zone must stay completely inside the current one.
- The new zone must be somewhere players can actually stand and fight, not in the ocean or on a cliff face.
A purely random position would break these rules all the time. So the game uses random picks inside carefully limited boundaries.
Step 1: The First Zone
The first zone's center is chosen at a random distance from the map's center. That gives each match a different starting point, so the final circle doesn't always end up in the same place.
Step 2: Shrinking the Circle
Each new zone has about half the radius of the current zone. Because area depends on the radius squared, halving the radius gives you roughly one quarter of the area.
For example, with an illustrative starting radius of 2000 meters, the zones would shrink like this:
Phase | Radius | Area (compared to the first zone) |
|---|---|---|
1 | 2000 m | 100% |
2 | 1000 m | 25% |
3 | 500 m | 6.25% |
4 | 250 m | about 1.6% |
That fast shrinking is what pushes players together.
Step 3: The Key Idea, a Circle of Possible Centers
Here is the clever part. The new zone must fit completely inside the old one. So where can its center go?
Let the old zone have radius R and the new zone have radius r. If the new center is a distance d from the old center, the new circle stays inside the old one only when:
So the new center can only be chosen inside a smaller circle of radius R - r, centered on the old zone's center. Pick a point outside that circle, and part of the new zone would poke outside the old one, which isn't allowed.
When the new radius is half the old one, R - r = R / 2. The area where the center can land is a circle with the same size as the new zone itself.
Step 4: Pick a Random Point (the Right Way)
Now the server picks a random point inside that circle of possible centers. There is a classic mistake here. If you pick a random distance and a random angle, points bunch up near the middle:
The fix is to take the square root of the random number, which spreads the points evenly across the area:
Without the square root, zones would land near the old center far more often than the edges, and the game would feel predictable.
Step 5: Check the Terrain
A valid circle isn't automatically a good zone. After the server picks a candidate center, it runs checks:
- Is the center in water or on land? Land is preferred.
- Is the ground too steep for players to stand on?
If the point fails, the server throws it away and tries again. This is why the final area is rarely all water or all mountainside.
Putting It All Together in Unity
Here is a simple version of the whole system in C#:
A few notes for a real game:
- Run it on the server. The server picks the zone so every player sees the same one. If clients picked their own, players would disagree about where the circle is.
- Limit the tries. Always cap the number of attempts, and decide what happens if none pass, such as relaxing the slope limit or keeping the best candidate.
- Sample more than the center. You could also check a few points around the new zone's edge to make sure the whole area is playable, not just the middle.
Key Takeaways
- The next zone is not pure luck. It follows rules and calculations.
- Each zone has roughly half the radius, so about one quarter of the area, of the previous one.
- The new circle must stay inside the old one, so its center can only land inside a circle of radius R - r.
- Use
sqrt(random)when picking a random point in a circle so the points spread evenly. - The server then rejects bad spots, such as water and steep ground, and tries again.
FAQ
Is this exactly how PUBG works? Not necessarily. This is a simplified model from a game-dev explainer. Real games tune the shrink ratio, add extra rules and use different values for each phase.
Why does the new zone need to stay inside the old one? It keeps the game fair and predictable in one way: the playable area only ever gets smaller, so players know they are never forced to run back into a zone that has already closed.
Why take the square root of the random number? Because the area of a ring grows with its radius. Taking the square root compensates for that, so points are spread evenly instead of piling up in the center.
Can I use this in Unreal Engine or Godot? Yes. The geometry is engine-independent. Only the terrain checks change from engine to engine.

Comments
Post a Comment