Bejeweled (Plugins demo)

Show us your completed creations made in Construct 2

Post » Sun Jan 27, 2013 12:17 am

Demo
- drag two chess to swap them
(Update: 2015/03/03)

Capx

Please download the latest version of 3rd plugins/behaviors by this tool.

FSM
main loop
Image


prepare
Image


match3
Image


1. FSM object
The "FSM" plugin could help user list the status changed more clear, user could use officail function plugin and some variables to replace it.


2. swapping neighbor chess
The two swapped chess are stored in "chess1_uid" and "chess2_uid" in "main" FSM object.
Using Board condition:"Are neighbor" to test if these two chess are neighbor. (event 21)
Swapping action is at event 24 by using Grid behavior action:"Swap". User could find that chess1 was pick by condition:"pick by uid", then the chess2 was selected in Grid behavior action:"Swap".

3. Call Match 3 processing
A. the "FSM.match3.start" function
"Match 3" is done by calling function "FSM.match3.start". The parameter of this function is a "callback". The value is "FSM.main.request" (event 26). And user could find the callback "FSM.main.request" at event 27.

The execution flow is -
1. call "FSM.match3.start",
2. when "match 3" done, the callback ("FSM.main.request" in this case) will be called. To push the state to next state.

The parameter of callback ("FSM.main.request" in this case) is "matched chess count", if the value is 0 means that no chess was matched in "match 3" process.

It might be the most complex part of this capx.
The "callback" mechanism -- hang a function name, is be used when the function (match 3 processing) could not be finished immediately.
("Notify me by calling this function when you are finished")

4. Match 3
The matching rule is defined at event 54. The matching action is at action of event 53 (Matcher condition:"Get matched tiles")
Last edited by rexrainbow on Fri Dec 02, 2016 7:09 am, edited 6 times in total.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Feb 06, 2013 11:48 pm

Awesome sample!

I've seen your events, i'm quite confused how to modify when you click one purple block with nearest another 2 purple blocks would be destroyed and how to remove "swapabble"action.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun Feb 10, 2013 9:42 am

@Joannesalfa

I add some notes of this capx.rexrainbow2013-02-10 09:43:05
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Mon Feb 11, 2013 3:57 am

Amazing stuff!
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Mon Feb 25, 2013 10:19 pm

the plugin links are dead can you replace them?
B
19
S
4
Posts: 17
Reputation: 1,665

Post » Tue Feb 26, 2013 12:05 am

@wii07

Sorry, I forgot fixed these links , now they are available.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Feb 27, 2013 8:05 am

Wow this is incredible!! I've been wanting to have a go at making a candy crush (bejeweled) type game for a while now
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Wed Feb 27, 2013 9:33 am

@EyeHawk

I'm making "triple town"-like game demo recently.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Feb 27, 2013 3:37 pm

B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Tue Mar 19, 2013 12:20 am

These sound great rexrainbow, but I've been unable to take a look at your demo.
B
7
S
2
G
3
Posts: 2
Reputation: 2,629

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 5 guests