Epic gem game w/ animation - How do I set image, position...

0 favourites
  • 4 posts
From the Asset Store
Enchanted Forest & Cave 16x16 Tilemap with Environment Sprites
  • Hi all, I am new to Construct 2 as well as game engines. I am writing a game similar to Puzzle and Dragons (I have not enough points to post the links to its simulators but you can definitely search one in Google). Please see the attached image.

    I have written it in Java but how can I do this with Construct 2? I can upload the JAR if needed.

    I have an array of 6x5 JLabels with instance variables (color, x-coordinate, y-coordinate). The is an ImageIcon for each JLabel (but we don't have such thing in Construct 2 but Sprite and Array).

    I use mouse listener and mouse motion listener to trigger user mouse click position.

    Requirements

    It will have a touch area that looks like a 2D array, so I will have an array of 6x5 which each element is given its color, x-coordinate and y-coordinate (may also attach a Sprite to it).

    On game starts, gems are having random color values and fixed positions.

    Moreover, I will need an extra gem image for the action I pickup (click on) a gem and its position follows my finger movement.

    In addition, two gem images are needed for handling the gem swapping animation. Their positions are set according to the circumference formula (points around the circle).

    The array (or Sprites) should not have position swapped. Only their color (or images) are swapped.

    Some functions I need include:

      1. Change and update image (or image location) of Sprite according to the color instance variable (just like JLabel) 2. Get the exact touch position (instead of knowing the touch over an object) (just like MouseMotionListener) 3. Get the Sprite based on touch position 4. Animation concurrency
      • when my finger moves, the picked up image moves and the swap animation function of two gems is done at the same time (animation uses for loop with circle formula to calculate x y coordinates)
      • color instance variables do not mess up (each swap has its own copy of variables)
      • speed up / end animation to prevent swap animation from not following the speed of finger movement

    Questions

      1. Can I do all these with Construct 2? 2. How do I name the instance variable of an array element? array(4)(4).var, array.At(4, 4).var, array.var(4, 4), etc do not work. 3. How to have an array of Sprite? In my situation, should I put a Sprite in each element of the array or create an array of Sprite? (I used to have an array of JLabel) 4. Can I change the image of a Sprite?

    Thanks for your time guys!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No one?

  • Most people are more than willing to offer assistance, but this almost appears to be a request for the full game mechanic, which is a big ask.

    Have you looked at any tutorials? Specifically those around the Match 3 mechanic?

    I'm not sure if this is what you require, but maybe this tutorial will get you going: http://gamedevelopment.tutsplus.com/tutorials/make-a-match-3-game-in-construct-2-the-basics--gamedev-8071

  • I could help you but, what you asking is to much sorry

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