Dismiss Notice

REGISTRATION IS AFTER ADMIN ACTIVATION

DONATIONS WITH PAYPAL CLICK TO BUTTON

6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$

DONATIONS WITH Bitcoin Address:3NRs3CK3fhXifrNYxHEZKpETDd9vNLMsMD

Dismiss Notice
The registration is approved by the Administrator. It takes about 1 day to approve your registration
Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Bejeweled Clone Game Source Code For Delphi XE6

Discussion in 'Delphi Android And IOS' started by AdminDF, Jun 30, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member DelphiFan Administrator Staff Member DF Staff

    [​IMG]

    Joaquin Monedero from Embarcadero built a Bejeweled clone for Delphi Firemonkey as a CodeRage 8 demo called Jweled. Originally it was built for Delphi XE5 Firemonkey but it should work in Delphi XE6 Firemonkey (I loaded it up in AppMethod). It should run on all of the Firemonkey platforms which are Android, IOS, OSX, and Windows. The main idea behind Bejeweled is the Match 3 mechanic. Which is to say you have to match 3 of the same icon in a straight line. You do this by selecting an icon and swapping it with another icon that is next to it. When you match 3 icons together they poof and more icons drop down from the top to replace them. You have a limited amount of time to match as many icons as you can. A twist on this idea can be seen in the popular mobile game Puzzle & Dragons where you can swap an icon with any other icon on the grid. You could easily re-skin this demo and expand it into a full game. The demo includes a full local high score system. There is some interesting code in there including a function called CreateTextAnimation which creates a piece of text and animates it upwards using TFloatAnimation before disappearing. Here is that function:

    Code:
    procedure TfrmGame.CreateTextAnimation(i, j: Integer; Const aValue: string; aTextType: TTextType);
    var
    lText: TText;
    lEffect: TGlowEffect;
    lAni: TFloatAnimation;
    begin
    lText := TText.Create(nil);
    lText.Parent := BoardLayout;
    lText.Text := aValue;
    lText.WordWrap := False;
    lText.AutoSize := True;
    lText.Position.X := i * fCellWidth;
    lText.Position.Y := j * fCellHeight;
    lText.HitTest := False;
    lText.Font.Style := [TFontStyle.fsBold];
    lText.BringToFront;
    
    lEffect := TGlowEffect.Create(lText);
    lEffect.Parent := lText;
    
    lAni := TFloatAnimation.Create(lText);
    lAni.Parent := lText;
    lAni.PropertyName := ‘Position.Y’;
    lAni.StartValue := lText.Position.Y;
    lAni.StopValue := lAni.StartValue – fCellHeight;
    lAni.OnFinish := DoTextFinish;
    
    case aTextType of
    ttScore:
    begin
    lText.Font.Size := 15;
    lText.Color := TAlphaColorRec.White;
    lEffect.GlowColor := TAlphaColorRec.Black;
    lEffect.Softness := 0;
    lAni.Duration := 2;
    end;
    ttMultiplier:
    begin
    lText.Font.Size := 30;
    lText.Color := TAlphaColorRec.Magenta;
    lEffect.GlowColor := TAlphaColorRec.Black;
    lEffect.Softness := 0;
    lAni.Duration := 4;
    lText.BringToFront;
    end;
    end;
    
    lAni.Start;
    end;

    Hidden Content:
    **Hidden Content: You must click 'Like' before you can see the hidden data contained here.**
     
    SensianKang likes this.
  2. BadBlue
    Offline

    BadBlue DF Senior

    RE:

    thanks
     
  3. rubbi2009
    Offline

    rubbi2009 Guest

    RE:

    Nice)
     
  4. thousan
    Offline

    thousan DF Junior

    RE:

    thank you
     
  5. bigdata
    Offline

    bigdata DF Member

    thanks
     
  6. Pepote
    Offline

    Pepote DF Junior

    Thank you
     
  7. khc
    Offline

    khc Guest

    RE:

    Good Item.
     
  8. Jhay R Pascua
    Offline

    Jhay R Pascua DF Member

    RE:

    thanks
     
  9. OscarAlhinho
    Offline

    OscarAlhinho DF Junior

    RE:

    Obrigado
     
  10. nasedo
    Offline

    nasedo DF Member

    RE:

    thanks!!!
     
  11. HardTargetFF
    Offline

    HardTargetFFHardTargetFF is a Featured Member DF Junior

  12. perdcomp
    Offline

    perdcomp DF Junior

  13. guilhermeteodoro
    Offline

    guilhermeteodoro DF Member

    RE:

    Thanks...
     
  14. sou_o_ed
    Offline

    sou_o_ed Guest

    RE:

    thank you!!!
     
  15. chrpaz
    Offline

    chrpaz Guest

    thanks
     
  16. petrus2003
    Offline

    petrus2003 DF Member

    Thank´s
     
  17. blasterbr
    Offline

    blasterbrblasterbr is a Featured Member DF Junior DF Donator

    RE:

    LOL--- very cool!
     
  18. shibly96
    Offline

    shibly96 DF Junior

    RE:

    greate (Y)
     
  19. atek2013
    Offline

    atek2013 Guest

    RE:

    wow, thanks for the post
     
  20. yhlee304
    Offline

    yhlee304 DF Expert DF Gold User

    RE:

    thanks
     

Share This Page

Laws
Our website, law, laws, copyright and aims to be respectful of individual rights. Our site, as defined in the law of 5651 serves as a provider of space. According to the law, contrary to the law of site management has no obligation to monitor content. Therefore, our site has adopted the principle of fit and remove. Works are subject to copyright laws and is shared in a manner that violated their legal rights, or professional associations, rights holders who, adsdelphi@gmail.com I can reach us at e-mail address. Complaints considered to be infringing on the examination of the content will be removed from our site.
Donate Help To Us and Be VIP
DONATIONS WITH PAYPAL CLICK TO BUTTON
6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$
Social Block