I want to spawn an object randomly on the screen but exclude it from spawning in multiple areas on the screen, any easy way to make this happen?
you don't want that the spawned sprites are overlapped?
on creating / spawn the objects (sprites) you can check if overlapping. If so, then move the sprites randomly again. in a loop (while(!overlapping)).
Hey that is a great idea, now to figure out the code.
So I get over lapping idea, but how do I say "if over lapping any object" then respawn with out specifying every object that may be in the layout.
you could add all the objects that you want to check to a family and just check if you are overlapping "family"
Develop games in your browser. Powerful, performant & highly capable.
I'll try that, thanks
DAG and RamPackWobble good advice. it works like a charm now. Thanks.