Newbie - help with shape puzzle

0 favourites
  • 3 posts
From the Asset Store
An amazing and interesting puzzle game for kids!
  • Hi all,

    I'm still new to construct 2, and so far I'm very impressed with it. I've worked through several of the many great tutorials the community has provided and now I'd like to make my own. I want to go with something simple initially, and though a shape matching game would be an easy one to start with. It will be like a baby's toy (you know the one, baby delights in bashing his/her block through the correct hole (e.g. circle, star square, triangle). Each shape will be able to rotate (perhaps using a button for this), allowing the user to turn shape the right way up for the hole it must go through.

    However I'm still a complete novice at construct and game development generally. So I was hoping that some of you might be kind enough to take a look at my questions below and point me in the right direction for some answers.

    1. I'm thinking it will be easier to program the shapes if they are in a collective group or family, so I've looked into using families within the project. However I've also noticed that other example use a different grouping technique, by having one sprite with several different images in (e.g. sprite would hold a frame for each shape). Can anyone tell me what would be the best way to do this?

    2. I'm not sure how to go about checking that the sprite is the right way up to go through the hole. I was thinking I could use a variable to indicate the right way up. This would be fine for shapes which only have one correct position. But what about shapes which have several correct positions, do I need to create a variable for each position?

    3. I was also thinking of adding a choice of different boards and shapes, to make things slightly more challenging. So I wanted to ask how I'd go about ensuring that the correct shapes from my shape group, would be displayed for the correct board. E.g. board one has circle star triangle and board 2 has hexagon, circle and rectangle, how can I make sure I select the correct shapes for each individual puzzle?

    Sorry if my message has been a little long-winded, but as I said, I have MANY questions, but for the majority of them I'm not sure where to begin to look for the answers, as I'm still not completely sure what I'm supposed to be looking for!

    Any help you kind constructors could offer would be really great

    THANK YOU ALL.

  • Hello, the game is pretty easy to build, it depends on the number of holes and shapes.

    1. I think that the best way is to create separate sprites, and use the family method only if you want to have many colours.

    2. Fist, you have to check if the position of the sprite is the same as the hole position, for example (x:200,y:100), and then check if the sprite is under a certain angle, ( you will use Set Angle in order to rotate the object). I suggest to set a tolerance(about 5 degrees) or whatever suits your game.

    3. Use an array for shapes and one for holes(e.g. 0 for circle, 3 for triangle and so on)

    I hope that this will help you. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks wildmedia, I will try this out!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)