title: Finding free space in square to spawn enemy
body: <p>I have an area where the enemy needs to be spawned to look good (they are behind a fence) and I don't want the enemies to spawn over each other so I was wondering if there is any good way to do this?</p>
  
  <p><a href="http://sv.tinypic.com/r/2zowwu1/8" rel="nofollow">http://sv.tinypic.com/r/2zowwu1/8</a></p>
  
  <p>I created a function that check if the next box (the next enemy) fits in all possible positions (pixel by pixel) but this is to slow as it is a mobile application and the enemies can be spawned rather fast sometimes. Sure there must be a nice formula that can calculate the different boundaries where the next enemy can fit?</p>