I am making a game which spawns scattered x
number of points. All Points have a constant radius of w
The points must follow these rules:
- Points may not overlap other points
- Points must be spread apart so that each point is at least
DISTANCE
away from any other points.
Can you please list an efficient algorithm to execute this?
I am also making this game in Swift Sprite-Kit. So if you know some Sprite-Kit, you can implement it in your answer, otherwise if you do not know Swift or Sprite-Kit you can explain in words.