Search Unity

How to Arrange Bricks in Bricks Breaker game?

Discussion in '2D' started by Matrix219, Sep 1, 2019.

  1. Matrix219

    Matrix219

    Joined:
    Jul 28, 2019
    Posts:
    3
    What is the easy way to arrange bricks in different form in each level like Bricks Breaker game in image?
    and How to add dynamic text on each brick?
    I think tilemap can help in arranging but is not useful with dynamic text and other effects in the game because it uses sprites not prefabs, any suggestions please?

    upload_2019-9-1_23-27-42.jpeg
     
  2. Helladah

    Helladah

    Joined:
    May 5, 2018
    Posts:
    254
    Yea, make multiple scenes and place them, ar what do you mean, about procedural generation?
     
  3. Matrix219

    Matrix219

    Joined:
    Jul 28, 2019
    Posts:
    3
    okay, but handle positioning without grid reference will be horrible job for a lot of levels, should be a technique to arrange them like in tilemap using brush to easy draw tiles.
     
  4. Emolk

    Emolk

    Joined:
    Feb 11, 2014
    Posts:
    241
    I would use prefabs. Make all your bricks 1x1 then place them so their center are grid coordinates. For example if your bricks are 1x1, place the your bricks at positions (0,0) , (0,1) etc. Then you can iterate through positions and check if a brick is there.
     
  5. Helladah

    Helladah

    Joined:
    May 5, 2018
    Posts:
    254
    so you mean procedural generation? just put a range where the camera its place and take care about overlap them



    at this video its a way to spam gameobjects and make to dont override between them

    edit: i dont remember at wicht one of the series, but it dosent have a lot neither
     
  6. Matrix219

    Matrix219

    Joined:
    Jul 28, 2019
    Posts:
    3
    Thanks, but it take a lot of time to arrange all levels, may I wish to draw each level for more easier and add prefabs on position of painted cells by code.
     
    Last edited: Sep 2, 2019