Match Your Bonbons (Templates)

Discuss Scirra's 2D Asset Store

Post » Fri Oct 24, 2014 12:12 pm



Match Your Bonbons — Now for sale in the Scirra Store!
https://www.scirra.com/store/royalty-free-game-templates/match-your-bonbons-405

1. Welcome to Match your Bonbons, a Match 3 Construct 2 template. There are plenty of comments in this template that should help ease your understanding of what's happening.

2. The rules of Match your Bonbons is similar to what you might find in the The Treasures of Montezuma series - great Match 3 games from Alawar Games.

3. Most of what you might find in a Match 3 game is implemented here including:

a. Continuous matching until no matches are found based on sprites that use the Platform and Solid behaviors. The game alternates between matching, destroying matched tiles, and replenishing of missing tiles until a steady state is reached.

b. The game allows for matching of 3, 4, or 5 tiles, although there are no special bonus features implemented.

c. A scoring system is in place in the game.

d. You can see for yourself how many matches remain while playing the game. This feature is dependent on a standalone matching function that makes use of arrays.

e. A reset button is enabled when there are no matches left.

4. As an exercise in understanding the template, you may want to to implement the following features:

a. Prevent swapping from taking place when no valid match is found. (Hint: See the function found at line 164).

b. Provide a hint to the next match. (see above hint).

c. Implement bonuses, music, and more.

5. If you have any burning queries, send us an email at the contact below.

Most of all, have fun with this template and share with us your creations pn the Store forums!

PS - Artwork courtesy of "luminae" at Open Game Art.

Ref URL - http://opengameart.org/content/candy-pack-1



Use this topic to leave comments, ask questions and talk about Match Your Bonbons
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,744

Post » Fri Oct 24, 2014 2:45 pm

Here is some more information about this template:

  • There are altogether 266 lines in the template... so don't think that this is a tiny one.
  • The template includes two implementations for performing matching. The first one found from line 5 until line 97 relies on tile sprites employing the Platform and Solid behaviours. The second one found from line 164 onwards is a function that relies on the use of arrays to check for matching.
  • To understand the template better, some features (listed above) have deliberately been left out for the user to implement. It will do well for the user to learn the template and to implement these missing features.
  • The template currently employs 8 different 64x64 sprite images and it is very easy for a user to add more or fewer sprite images by just modifying a single variable (known as I_NUMBER_OF_SWEET_TYPES in the code).
  • If there is a demand, we may one day provide an update with the missing "Hint" and "Check for valid swap" feature.
Thanks.
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,744

Post » Sat Oct 25, 2014 6:37 am

Version 1.0.1 was released today to rectify a minor bug. Scirra has not gotten around to approving the release yet. Expect to download it on Monday. Thanks.

Change List -
  • Line 128 event/action added in.
  • Line 130 has a new condition added. This will prevent an illegal swap from taking place.
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,744

Post » Thu Nov 13, 2014 12:00 pm

Tips on implementing the following:
a. Prevent swapping from taking place when no valid match is found.
b. Provide a hint to the next match.

Suggestions for "a"
Head over to line 129. This is the line where a check is made to see if a swap has been completed. Perform a quick match check here; you can do this by either adapting the "CheckForMatches" function at line 166 or the matching algorithm at line 7. Instead of checking the entire grid, you only need to check the swapped tiles for matches. Duplicate a similar call to line 110 to reverse the swap motion (since there is no valid match found, we have to move the tiles back to their original positions).

Suggestions for "b"
Adapt the "CheckForMatches" function at line 166 to store the valid match results in a new array. After X seconds has passed, randomly choose one of the entries from the array and flash the corresponding tiles to indicate a hint to the player.

Hope that helps.
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,744

Post » Thu Jan 08, 2015 7:30 pm

This is a great template!

I would like to have one piece of candy that is a center-of-three wildcard, meaning it can be used if two pieces of candy on either side of it match.. How would I do that?
B
29
S
14
G
9
Posts: 80
Reputation: 6,003

Post » Fri Jan 09, 2015 12:43 pm

Thanks.

I would only match the 2 on the sides, since the centre candy is essentially a "don't care" case. There is however a need to always check at least 5 candies in a row - that being the best possible match.

Hope that helps.
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,744

Post » Sat Jul 29, 2017 4:18 pm

is there any Unofficial plugin used here? like Rex Board and other?
B
18
S
8
G
5
Posts: 22
Reputation: 3,955


Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 0 guests