Filling up a grid with sprites (like Match3 games)

  • tanmay
    Likes 0

    Problem Description

    I am learning the Cocos2dx API by watching the amazing tutorials that you have made and I was just thinking of implementing a Match3-like game.

    I have a grid bg of 5x8 size and png of 3 gems. How can I fill all the cells with shuffled gems?

  • Sonar Systems admin
    Likes 0

    What aspect do you requir help with, the random generation and/or the placing of gems.

  • tanmay
    Likes 0

    Both. Would it be possible for you to create another tutorial for handling situations like this?

  • Sonar Systems admin
    Likes 0

    I will look into this.

  • tanmay
    Likes 0

    Thanks. Much appreciated. Hoping to see a new series soonyes Which would be better? To create a grid layout resource with cells first and fill them with gems or just create the layout resource without cells and create the cells programmatically?

  • Sonar Systems admin
    Likes 0

    Cells?      

  • tanmay
    Likes 0

    The boxes where the gems will be placed

  • Sonar Systems admin
    Likes 0

    Are you talking about before coding so the artwork?

Login to reply