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

Get help using Construct 2

Post » Thu Jan 01, 2015 11:34 pm

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.


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


    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!
You do not have the required permissions to view the files attached to this post.
Posts: 2
Reputation: 204

Post » Fri Jan 02, 2015 11:37 pm

No one? :(
Posts: 2
Reputation: 204

Post » Sat Jan 03, 2015 8:51 am

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
If your vision so exceeds your ability, then look to something closer.
Posts: 5,414
Reputation: 59,512

Post » Sat Jan 03, 2015 10:30 am

I could help you but, what you asking is to much sorry
Posts: 1,964
Reputation: 40,721

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, MaxxMunnn, richcoz81, Soluna Software, Yahoo [Bot] and 31 guests