Help with random block placement please

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm sure there's a simple way to do this but for the life of me I can't think of it!!

    What I want to create is a playing field made up of blocks but everytime the game is played I need it to be randomized.
    The problem is that the blocks aren't all the same size. Lets use Tetris blocks as an example although this isn't going to be for a Tetris game.
    Some of the Tetris blocks may be long, some tall, others may be T shaped etc. How do I make it create a random playfield out of different size blocks with no gaps?

    All ideas would be appreciated :)

    Thanks
    Marc

    Addictive 247 Games - Please login to see this link.

  • I'm not sure there's a simple way to do this XD
    but would be happy hearing some creative idea on this

    What I can think of is:
    1) creating a grid of square blocks (say, an array of cells)
    2) randomly connect them (i.e. block 3,3 with block 3,2 make for a "I" block)
    3) use some "autotiling" procedure to make blocks fit each other:
    i.e.: Please login to see this link.
    and give them an apt color (maybe based on number of squares) if needed

    the bad thing is this could result in some too "complex shaped" blocks, unless you strictly code step 2

    another approach may be preparing a set of predetermined blocks,
    and a procedure (>>> loop) placing them one by one from top-left corner and trying to fit them each other
    making sure you can use "single blocks" to fit in empty spaces that will surely pop out

    a selection of my Fusion examples can be found Please login to see this link.

  • You are seriously underestimating the complexity of what you're trying to do. This a very, very difficult problem - the kind of thing university maths students might write a thesis on.
    For example:
    Please login to see this link.
    Please login to see this link.

    Of course, if you allow gaps (or just fill them in with smaller polyominos like Popcorn does), that makes things very much easier.

  • You are seriously underestimating the complexity of what you're trying to do. This a very, very difficult problem - the kind of thing university maths students might write a thesis on.
    For example:
    Please login to see this link.
    Please login to see this link.

    Of course, if you allow gaps (or just fill them in with smaller polyominos like Popcorn does), that makes things very much easier.

    wow.
    i opened those and closed them immiedatly again lol

    Please login to see this link.
    Please login to see this link.|Please login to see this link.|Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!