715 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
majd_abdul says

Hi,

I’m working on a bejeweled style game in AS3 . So far it’s working out alright, I’m at the part where I have to resettle all the items in the holes created after matching tiles.

I’m not sure how to approach this part. I thought of going through all the tiles checking which ones are higher vertically and renaming them accordingly. Is this the correct way?

Better still, is there a bejeweled style tutorial in AS3 ?

Thanks

4392 posts Community Mod Building awesome stuff for your mobile devices!
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helps us moderate the forums
  • Has sold $125,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+14 more
Enabled Moderator says

I don’t know anything regarding bejeweled, what I do know that tutorials on activeden equal a big ban :)

We are not allowed to use, modify, get data from other sources.

5389 posts The Dude Abides
  • Located in United States
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
+9 more
CodingJack says
I don’t know anything regarding bejeweled, what I do know that tutorials on activeden equal a big ban :) We are not allowed to use, modify, get data from other sources.

He didn’t say he was going to sell it here :P

715 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
majd_abdul says

@enabed: It’s not for ActiveDen.

I managed to rename the tiles by checking the height of all the tiles in each column, which caused another problem I’m missing right now.

I’ll try to move on to the next part, tweening the tiles down to their places.

Still, if someone has any suggestions as to how I should do it, or a tutorial it would be great!

4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says

Hey majd didn’t see you for a very long time i guess this is something to do with the heat as the rest of the world frizzy your winter is like hot water….. go figure :P

What you need to do I ithink is name your diamonds in numbers like array but make them as group base on each color so you can make panels on each group something like this lets say you have 2 colors groups .

 function sort(a:Panel, b:Panel):Number
    {
        if (a.y < b.y) return 1
        else if (a.y > b.y) return -1;
        else return 0;
    }

Then lets say after you click them you need to remove them or tween it just an idea throwing code out of my head if you can think like me that’s good :P if not that’s life …..
private function remove():void
    {
        this.play();
        var found:Boolean;
        for (var i:int = 0; i < yourPanal.length; i++)
        {
            found = false;
            for (var y:int = 0; y < 10; y++)////10 lets say it the amount of objecets

            {
                for (var x:int = 0; x < 10; x++)
                {
                    if (yourPanal[i] == panels[y][x])
                    {
                        for (var yy:int = y; yy >= 1; yy--)
                        {
                            panels[yy][x] = panels[yy - 1][x];
                        }

                        found = true;
                        break;
                    }
                }
                if (found) break;
            }
        }
        for (y = 0; y < 10; y++)
        {
            for (x = 0; x < 10; x++)
            {
                var panel:Panel = panels[y][x];
                if (panel == null) continue;
                tweensomthing(panel, { y:y * size(or what ever your object) }, null, 0.6, Bounce.easeOut).play();
            }
        }

 
715 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
majd_abdul says

Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says
Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

Its amazing February and i hear everyone is on the beach i just hope there will be drinking water on the summer :P

Shenkar- that’s a great school i am happy for you, hope you benefit from this really great reputation for this institution, but once you finish your study there your next step is to fly to a new country to find a good job because it’s a hard living for designer on the holy smoky grass land unless you are a developer.

Really good luck Majd …….

715 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
majd_abdul says
Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

Its amazing February and i hear everyone is on the beach i just hope there will be drinking water on the summer :P

Shenkar- that’s a great school i am happy for you, hope you benefit from this really great reputation for this institution, but once you finish your study there your next step is to fly to a new country to find a good job because it’s a hard living for designer on the holy smoky grass land unless you are a developer.

Really good luck Majd …….

Thanks! I’m getting a great opportunity to turn a hobby into something real, I’ve already been given a freelance project with the help of one of the teachers. This bejeweled game is part of it.

BTW , I managed to solve the part I asked about, now I’m focusing on effects and animations. I’ll show you the result when it’s done.

Thanks again for the advice!

by
by
by
by
by
by