Distributing geometric figures on a board

0 favourites
  • 2 posts
From the Asset Store
Set of 21 Food plus 6 boards, for different kind of games
  • Hi guys,

    I want to distribute randomly nine quads on a board but

    they cannot be touch one another and will better if have a minimum distance between them. I thought in put them on a board that will divided into squares to allow the exact location of parts, for example: a square occupied one square (logically), a rectangle = 3 or 4 squares, trapezium = 02 squares, etc. In this case I have to use an array or just a grid? Could anyone give me some tips on how to do this, especially if you have to use array? thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I did that once by picking a bunch of random locations on the map, and then picking the location nearest each start location.

    In other words, each of the 9 start locations are predetermined, but they are only used to pick the nearest random location.

    In my case it placed a bunch of castles at random, and then picked 4 that were nearest the corners for 4 players start locations.

    ("Pick Nearest/Furthest" is under "Size & Position" in the object's conditions)

    You could also use the "Distance" expression to make sure they aren't too close together as well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)