How can I make a game like Royal Match's Hidden Temple?

I want to make a game like Hidden Temple, with objects hidden behind blocks/things.
I have some questions:

1 - How can I make the objects spawn randomly, but inside a tile?
2 - If I have a pool of objects, how can I make a number of them spawn, while some don’t?
3 - To reveal part of the object, the player would need to click on an object. Is there an easy way to do this? I could only think of behaving like buttons, but it doesn’t seem practical to implement.

Thank you in advance.

Hi KirzeTheCat,

Welcome to the forum.
Usually, if someone asks “how can I make a game like…” the chances to get a reply is very low. This is either because people don’t know the game you are mentioning or they assume that you ask them to walk you through making an entire game.

So when I read the title of your post I thought it is very similar, but you have actually specific questions, which is much better. I would suggest that you ask one question per topic and choose a title that is somehow reflecting what your request is all about.

For your first question, you can find a solution in this thread:

which could look like this:

This spawns objects randomly on one tile (sprite-object). I guess that’s not what you actually want but it may be a start.

Hey, Drona!

Thank you for the kind welcome.
I have some parts of the game ready, like the main menu, options and general mechanics are almost fully implemented.
I just have the doubts I posted here.

Thank you for linking the other post, I’ll read it.

Welcome. I realize new users have post restrictions. Is this the type of game mechanism that you’re interested in? Where tiles are busted and they reveal items below them.

Yes, that’s it!

I don’t know how to make them spawn randomly inside the tiles.

And I’m making 8 objects, but only 5 of them will spawn. The game would spawn 5 of them randomly too.