Hello everyone!
-
What do you want to achieve?
I would like to make a system that generates parts randomly, but with some constraints, across a uniform space. This is similar to how the game Agar .io generates small pellets all over their map. I would also like to spawn in players (as they control a part) into the game. This is also just like Agar .io -
What is the issue?
I do not know how to check if a position already contains a part. If I do not check, it ends with players and the “pellets” being spawned/generated within another player (remember all players are parts) and being eaten instantly. -
What solutions have you tried so far?
Currently, my system is completely random and doesn’t check if the things it generates are in unacceptable positions.
How can I check if the position randomly generated is unacceptable?
Thanks in advance for all the help! The dev forum has been a great resource as I progress with my game!
Edit: If anyone thinks this would be better named as “Check if a position contains a part” say so below. I used the “Agar .io” name to help people understand what I am going for.
Someperson576