how do i- when i set on start of layout- spawn randomly 7 object but when object is spawned on top of another object this object must be pushed anywhere but not to outside layout
Develop games in your browser. Powerful, performant & highly capable.
Here is an demo with that sort of thing:
Evil Sprites Demo
Check out the events at the start.