0 Favourites

Distributing geometric figures on a board

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,225
rexrainbow's avatar
rexrainbow
Unread hot topic
157 12,696
megatronx's avatar
megatronx
Unread hot topic
0 Favourites
Board Horde Stats Update
146 14,484
Dave Hailwood's avatar
Dave Hailwood