# Playmaker Forum

## Playmaker News => Work In Progress... => Topic started by: marcos on September 09, 2014, 01:21:33 AM

Title: Match 3 Prototype
Post by: marcos on September 09, 2014, 01:21:33 AM
Hey,

Another little prototype I'm tinkering with. A line drawing match 3:

Right now it's just the main linking system, there's no real game or danger. So that's next on the list to be added.

I have an idea for a theme and style, but for now i'm just making sure everything works well.

Mark
Title: Re: Match 3 Prototype
Post by: escpodgames on September 09, 2014, 02:14:37 AM
Very cool!
Title: Re: Match 3 Prototype
Post by: marcos on September 09, 2014, 04:04:57 AM
Very cool!

Cheers!

The real question is what is the mathematical probability of something like this happening?

(http://i.imgur.com/3AwI6Ps.jpg)

Because that could ruin someone's day.

Really though, what would be the chance? 5 gem types, 6x6 grid. Any maths geniuses out there?
Title: Re: Match 3 Prototype
Post by: Lane on September 09, 2014, 04:53:29 AM
That looks cool dude!

I wouldn't worry about the locked grid, with 6x6 the likelyhood of a 5 color layout with no 3 squares of the same color within 9 spaces is ... super.. super low.
Title: Re: Match 3 Prototype
Post by: Graham on September 09, 2014, 07:48:49 AM
Smooth! Nicely done.
Title: Re: Match 3 Prototype
Post by: coffeeANDsoda on September 09, 2014, 03:20:46 PM
Hey,

Another little prototype I'm tinkering with. A line drawing match 3:

Right now it's just the main linking system, there's no real game or danger. So that's next on the list to be added.

I have an idea for a theme and style, but for now i'm just making sure everything works well.

Mark

How did you do this in playmaker?
Title: Re: Match 3 Prototype
Post by: marcos on September 09, 2014, 07:09:48 PM
That looks cool dude!

I wouldn't worry about the locked grid, with 6x6 the likelyhood of a 5 color layout with no 3 squares of the same color within 9 spaces is ... super.. super low.

Cheers, mate!

haha yeah, I was thinking if it is an infinitesimally small chance, i'll just leave it. If some poor person manages to get a grid like that, they should probably just stay in bed that day  ;D

Smooth! Nicely done.

Thanks! It's nice to do a more straightforward project for a change.

Hey,

Another little prototype I'm tinkering with. A line drawing match 3:

Right now it's just the main linking system, there's no real game or danger. So that's next on the list to be added.

I have an idea for a theme and style, but for now i'm just making sure everything works well.

Mark

How did you do this in playmaker?

The bulk of it is Arraymaker.

For the linking, the first gem you click and drag on gets its tag stored, then whenever you drag over another gem it'll test against that string.  To backtrack i just test if it's the second last object, then remove the last entry from the currently linked gems array.

Then I've got game object arrays for each column, and then vector 3 arrays for the corresponding desired positions of each of the gems, which seemed more straightforward than doing the positions programmatically.

The line is just FlyingRobot's Arraylist Line Renderer action, but I'm going to figure a different solution out for that, as the line renderer doesn't have a consistent width when turning corners and so on.
Title: Re: Match 3 Prototype
Post by: coffeeANDsoda on September 09, 2014, 09:08:58 PM
That looks cool dude!

I wouldn't worry about the locked grid, with 6x6 the likelyhood of a 5 color layout with no 3 squares of the same color within 9 spaces is ... super.. super low.

Cheers, mate!

haha yeah, I was thinking if it is an infinitesimally small chance, i'll just leave it. If some poor person manages to get a grid like that, they should probably just stay in bed that day  ;D

Smooth! Nicely done.

Thanks! It's nice to do a more straightforward project for a change.

Hey,

Another little prototype I'm tinkering with. A line drawing match 3:

Right now it's just the main linking system, there's no real game or danger. So that's next on the list to be added.

I have an idea for a theme and style, but for now i'm just making sure everything works well.

Mark

How did you do this in playmaker?

The bulk of it is Arraymaker.

For the linking, the first gem you click and drag on gets its tag stored, then whenever you drag over another gem it'll test against that string.  To backtrack i just test if it's the second last object, then remove the last entry from the currently linked gems array.

Then I've got game object arrays for each column, and then vector 3 arrays for the corresponding desired positions of each of the gems, which seemed more straightforward than doing the positions programmatically.

The line is just FlyingRobot's Arraylist Line Renderer action, but I'm going to figure a different solution out for that, as the line renderer doesn't have a consistent width when turning corners and so on.

For the colors, did you make color global variables? I ask this because awhile back I was trying to figure out how to make a match 3 game via playmaker.
Title: Re: Match 3 Prototype
Post by: marcos on September 09, 2014, 09:51:47 PM

For the colors, did you make color global variables? I ask this because awhile back I was trying to figure out how to make a match 3 game via playmaker.

They're just prefabs with different tags.
Title: Re: Match 3 Prototype
Post by: xhidnoda on September 25, 2014, 07:23:27 AM
Cool gameplay dude!
When the game end? In for Android/IOS as well?
Title: Re: Match 3 Prototype
Post by: marcos on September 27, 2014, 09:07:18 PM
Cool gameplay dude!
When the game end? In for Android/IOS as well?

Cheers!

The 'gems' are going to make your character perform different actions. Basically it'll be about getting the highest score possible before you die. A sort of strategic match 3.

Yeah, this will be for both platforms!

Also, this happened:

(http://i.imgur.com/p2HldFR.jpg)

Easiest fix would be to make it so that you only need to match 2 gems to make a link, but that might be too easy.

I could also do some kind of crazy checking system that cycles through all of the gems and checks if there are possible links. If it finds a match of 3 it stops the check, and if it doesn't it refreshes the gems. I'd need a lot of coffee for that, though.
Title: Re: Match 3 Prototype
Post by: xhidnoda on September 30, 2014, 06:36:52 AM
GO GO GO  ;D
Title: Re: Match 3 Prototype
Post by: xhidnoda on September 30, 2014, 06:38:56 AM
GO GO GO  ;D
Title: Re: Match 3 Prototype
Post by: marcos on October 09, 2014, 04:04:17 AM
Little update:

Still no real graphics in game, but I put in the danger that you need to manage whilst aiming for the highest score.

Basically you attack for 7 turns (links), then the enemy has a chance to attack you for a few turns. If you defeat the enemy (no animation or anything yet), your turns are refreshed.

The gems do the following:

Red - Charge up your power
Blue - Punch the enemy
Black - Fireball the enemy for unblockable damage.
Yellow - Coins, do nothing right now

When you attack, your power goes down, and the enemy block is removed. When you fireball, your power is removed after being used.

Might be a bit esoteric to everyone except me at the moment, but that's where I'm at.

I'm also thinking about adding another gameplay element, just to add a bit more interest, not necessarily a complex strategic thing though. It might end up just being something that modifies the gems or converts some to one type. Not sure yet!

Mark
Title: Re: Match 3 Prototype
Post by: blackant on October 14, 2014, 11:59:11 PM
nice work, you have something strong in your hands.
Title: Re: Match 3 Prototype
Post by: marcos on October 19, 2014, 02:54:23 AM
Cheers! It's getting there. I feel like it needs a little bit more of a fun factor, so I'm sort of letting my brain figure that one out whilst i work on other things :)
Title: Re: Match 3 Prototype
Post by: cloud03 on November 10, 2014, 05:45:59 PM
Hi marcos, cool stuff you got going there..would you mind to share how the blocks fall accordingly and maybe re-sort the array after that?

I've succeeded to create a Match 3 also, but not the swipe one, more like Bejeweled and Candy Crush, and I've implement if found 3 matches on the horizontal or vertical axes, then the blocks get destroyed, but I'm confused on what to do next, can you shed me some light about the topics? thanks
Title: Re: Match 3 Prototype
Post by: marcos on November 11, 2014, 10:56:22 PM
I made it so that it removes the entry in the array upon making a match (and despawning the gem), which causes the entries after it to shift one space down. Then I check how long the array is, and add the required entries to fill it out. After that I use the array indices of the gems to check a vector 3 array containing destination positions, and move them into their corresponding slots.

I don't have any hardcore math in at the moment to ensure that a match is always possible. I kind of wish I didn't drop that subject as soon as I could back in high school.
Title: Re: Match 3 Prototype
Post by: cloud03 on November 11, 2014, 11:05:08 PM
Thanks a lot for the insight, I've finally succeeded doing it as I went back and forth on this thread, and found out you were using 2nd sets of array storing vector3 of each object, and that what's exactly I needed. I've couldn't done it, if it weren't for this thread, so thanks again!
Title: Re: Match 3 Prototype
Post by: SushimojiTo on January 24, 2016, 08:30:06 AM
Hi, very good work!  ;)
You have in mind to share the project for studing it?  ;D

Thanks!  :)