Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Jewel Match Framework

Discussion in 'Assets and Asset Store' started by kurayami88, Aug 30, 2013.

  1. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    **EDIT**
    wrong info, read post below...
     
    Last edited: Oct 18, 2013
  2. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,
    Thanks for your support! The codes are all coded on the size of 1... And then ngui will scale it based on their camera and related scripts...

    Best if you try start fresh again,

    step 1 :- camera object inside uiroot2D (NOT uiroot2D itself). You will need to adjust the AnimsCamera as well as the Camera object.

    step 2 :- in the two camera objects, adjust a property called "size". The current value is "5". The bigger the number, the smaller the board.

    REMEMBER : you will need to adjust BOTH the AnimsCamera as well as the Camera.
     
    Last edited: Oct 18, 2013
  3. EmergingMobile

    EmergingMobile

    Joined:
    Aug 7, 2013
    Posts:
    17
    Thanks kurayami88! That did it!
     
  4. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    version 2.2.0 is unofficially out.

    hopefully this solves the issues with suggestion / board getting stuck.
    As well as some other nice candies =D.

    For those of you who have not gotten the update and would like to, kindly email me at "kuraStudios@gmail.com" with any prove of purchase. Thanks!
     
  5. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    I've added a "asset future plans" section on the original post. (aka the first post).
     
  6. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
  7. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    Looking great! Keep up the awesome work!
     
  8. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    I've been working on my other project and I come back to all these awesome updates which I can't wait to download. All these little things that I was thinking that it was missing has been implemented. Leave some stuff for us to work on!
     
  9. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    aha... well guess what??
    v2.3.0 is out :p (even before v2.2.0 is officially released into the asset store =\ ... )
    unity staff really slow in evaluating my asset =( ... guess they prioritize other big game players than me boo hoo....

    To anyone interested in v2.3.0 ; please email me at "kurastudios@gmail.com" with any prove of purchase. Thanks!
     
  10. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    as with previous post... v2.3.0 is out! (unofficially of course)
    Do check the first post for the changelog~!

    -------

    I will need to make a short screen cast concerning the update. I feel it is easier to show you exactly what i did and how to use it properly (rather than you fumbling around aimlessly?)

    but until then, do fumble around aimlessly for now coz i'm tired.... will try to get the screen cast out within the next 24 hrs from this post. Thanks!
     
  11. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Wow, I can't believe how behind they are with the versions. I appreciate the current build. So far I got the examples up and running. The sound manager is a big plus. That "No" sound bit cracked me up. I can't believe people were complaining about the default sounds...seriously it's a freaking placeholder. Use your imagination, man.

    What do you recommend doing if I wanted to make a special gem that randomly changes gems on the board? Should I extend one of the scripts?

    Thank you for your hard work!
     
  12. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    There are a few things you need to do for that,
    in the customisable script folder; you will need to set how this gem is first create in "MatchType.cs". if it's a new power gem; you will need to define the behaviour in "Powers.cs"

    If it is randomly created from another gem, you can easily just create a new script that will access the gameManager script.



    In this new script, you may want a timer to change the gem on-cue. Then, you can access the GameManager script's "board[,]" variable. It is public so don't worry.

    You would want to do a double for loop; for(x; etc) { for(y; etc) { if board[x,y].piece.powerType = PowerType.(type you are looking for) { then; board[x,y].piece.powerType = PowerType.(something else) }}

    very easy to change it :) ... hope this makes sense... it's just a rough guide/explanation
     
    Last edited: Oct 25, 2013
  13. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    I was about to delay this video as I was tired and busy today... Then i was like... i promised.... oh well.... *starts recording*

    ------------
    Here you go... hopefully this is an eye-opener for some people.
    JMF v2.3.0 video explanation
    http://youtu.be/2cR9tJQ60Kc
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    What is the "gravity extra effect"? I'm wondering if that's what I was wanting or not.
     
  15. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    uhh... no... that's just the "easeInBack" cheat visual approach to show the gems hitting bottom rather than a static stop...

    the "Delayed Gravity" feature was what you were looking for....
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    ok, that sounds cool too :)
     
  17. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Beautiful, it makes sense. This will be my fun weekend thing to do. If I get stuck, I'll probably bug ya. :D
     
  18. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Guess what,

    v2.2.0 has just been approved to the asset store...
    i'll be putting v2.3.0 now....

    updating the first post and include the youtube vid explanation there too...
     
  19. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Having a new issue.

    Unity 4.2.2f1
    MacOS 10.9 Mavericks
    Jewel Match Framework 2.2.0
    NGUI Paid 3.0.3
    LeanTween (I pulled the latest from github, as the "update" was missing the plugins dir)

    I load a scene (any of them) and this happens:

    $Screen Shot 2013-10-26 at 8.34.02 AM.png

    The text goes TINY, and then this:

    $Screen Shot 2013-10-26 at 8.36.05 AM.png

    I am reasonably sure the tool works.. Ive used it, and it was great.. is this caused by a combination of updates? Or something totally boneheaded that I did.
     
  20. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    ok the second screen did not show up for me.. so adding it here: $Screen Shot 2013-10-26 at 8.36.05 AM.png
     
  21. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    I believe it's NGUI v3.0.3
    they changed significant stuff again....
    i'll test it out when i can... jsut to confirm it's 3.0.3 ... in the mean time, do you think you can fall back to NGUI v3.0.2?
     
  22. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    hmm.. I'll see if I have the previous version lying around on the filesystem somewhere... thanks :)
    UPDATE: That fixed it. Using NGUI 3.0.2 was the trick.

    Thanks!
     
    Last edited: Oct 26, 2013
  23. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    This really pisses me off that NGUI changes things during minor version updates. You'd expect this kind of behavior during major updates but not minor. I am going to work on converting this to some other GUI libraries next week unless the release of Unity 4.3 this week has the killer GUI update they've been promising.

    Kurayami88, you're a star! You update frequently and your support is outstanding. Cheers bro! Looking forward to your future.
     
  24. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Hi kurayami88,

    What is the minimal ngui version that I can use with jewel match? I saw I still used 2.6.2 for my project and upgrading to 3.0.2 did screw up my whole project but jewel match worked haha.
     
  25. Krzyk

    Krzyk

    Joined:
    May 21, 2013
    Posts:
    3
    Kurayami88 nice work! :) I bought it recently and.. The code is nice and clean. Also well commented!

    Well I didn't have time to dig in completly in the source code but I found 2 bugs (ver 2.2):
    #1
    GameManager.cs
    Code (csharp):
    1. public void increaseScore(int num)
    if you add Debug.Log(currentCombo) you will see that when you match 3 gems then the output is:
    0 1 1
    if you match 4: 0 1 1 1
    and for next combo it will be: 1 2 2.... etc

    #2
    Don't know if it's a feature or a bug but... It's worth to mention/ask ;)
    When moving special gem onto another they will trigger. For example if you move rainbow star on a vertical one all gems that share the color with vertical will change in vertical and horizontal ones and trigger. If you move normal star (for example green) onto another star (other color) they will trigger/explode.
    So the question is it a feature? ;)


    And also about frequent updates. In my opinion it's a little to fast :)
    Once per two weeks an update would be nice. Well you know everyone is probably changing some parts of code and merging requires more or less time.

    Ps. The NO sound is hilarious :D
     
  26. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi krzyk;

    Is it safe to assume you have v.2.2.0? else perhaps below... (if you do not have 2.2.0; you definitely need to get it coz 2.1.4 has the suggested piece/board-stuck bug. It is assumed fix from v2.2.0 onwards (unless someone reports otherwise)

    1#
    Coz yea... i didn't realize about the combo thing only after i added scoreHUDs ( bug went undetected till it was visual ) so i changed it/fixed it in v2.3.0 ... it's not a biggie...

    2#
    yes it is a feature.... there's no shortcut to turn it off, but you can easily remove all/any function you do not like in the "SpecialMerge.cs" script in the customisables folder.

    3#
    uhhh.... ok... if you say so... i'll work a little less (A)
     
  27. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    =.=""
    i'll have to wait and see what he does before fixing the Jewel Match UI ... in the mean time.. Please just leave and work with NGUI v3.0.2 until otherwise... you do not need the updates do you?
     
  28. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    NEWS UPDATE
    =================

    i skipped official release of JMF v2.3.0 and jumping straight for the official release of v2.4.0
    part of the reason is that NGUI update of v3.0.3 has messed up the UI (for those oblivous to this fact) and that JMF v2.3.0 still rely on NGUI v3.0.2


    thus JMF v2.4.0 is born. Made compatible with the new NGUI v3.0.3 changes. Please read the changelog for more info concerning this release.
    And as usual... please email me ( + prove of purchase if you are new) if you want to get it earlier. Thanks.
     
  29. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Bought this yesterday and love it :)

    Have some little problems and send you 2 PMs.
     
  30. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Do you mind posting the issues you encounter on the forum, if they are technical issues? Some of us may also benefit from the reply :)

    Thanks!
     
  31. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    [HR][/HR]
    [HR][/HR]


    1. at the moment, the gravity feature is complicated. I will see if I can improve on this feature; but in the mean time, the states are handled on the spot by game manager and is not easily customisable yet.

    2. you can use NGUI's animation feature. look for NGUI UI Sprite Animation.

    3. You are able to use 3D prefabs on GameManager. It is not limited to NGUI sprites. Do give it a try :)



    NGUI "UIroot2D" already has a 3D camera attached to it. It is located on the UIRoot2D object itself. If you do need a new camera object, you can try using a new 'layer' and assign your new prefabs + the camera to only work on that specific layer.
     
  32. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    if anybody is experiencing issues or bugs... please do share...

    currently there's 1 user whom is experiencing poor FPS/lag/low-performance even on a fresh package. Profiling reveals that UIPanel is hogging a lot of resources.
    If anybody experience the same, please do share. So far I have not. But I have no access to the profiler because I do not own Unity Pro. So I cannot profile the package myself. The best i could do is assume and work my way towards good logic and implementation.

    Thanks
     
  33. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    IMPORTANT UPDATE

    With response to the lag issue a user has pointed out... *tested on galaxy s4 i9505*


    *EDIT POST*
    dammit... maybe this is related to the UILabel error I reported. The new UILabel feature in v3.0.3 is still unstable~!
     
    Last edited: Nov 1, 2013
  34. vastar

    vastar

    Joined:
    Apr 6, 2013
    Posts:
    25
    simply amazing!
     
  35. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi people...

    using NGUI v3.0.3(x) is at own discretion. Who knows, maybe future updates are better... but as of right now; it sucks... badly.

    If you wish, i can patch JMF v2.4.0 to be compatible with NGUI v3.0.2 again. (or if you are familiar with NGUI, just re-create the UIFonts re-update all the affected UILabels - easy)

    -----------

    Also... a show of vote to perhaps switch to 2D Toolkit
    https://www.assetstore.unity3d.com/#/content/908

    OR

    to drop WYSIWYG editing and fall back to Unity GUI + GUIText (kinda sucks). Perhaps wait for Unity 4.3 for the 2D Sprites.

    OR

    snag it out with NGUI v.3.0.2 until future releases improve?
     
    Last edited: Nov 1, 2013
  36. snowflaketrail

    snowflaketrail

    Joined:
    May 14, 2013
    Posts:
    8
    Switch to 2D Toolkit please
     
  37. Tauz

    Tauz

    Joined:
    Oct 31, 2013
    Posts:
    4
    I never had any problems with 2D Toolkit yet, so it would be my choice too. :)
     
  38. isacan

    isacan

    Joined:
    Jul 18, 2013
    Posts:
    37
    Switch to 2D Toolkit. i think it is best choice :D
     
  39. Krzyk

    Krzyk

    Joined:
    May 21, 2013
    Posts:
    3
    Game finished before all gems settled (there was rainbow star and it triggered after that the game instantly ended):
    $JMF0.png
    and text is really readable :D (after resizing it went back to normal).

    EDIT: The issue with early game ending could be due to heavy load[lag] (well my graphic card was under heavy load and processor was like 70%)

    And about changing to 2D toolkit. It would be best to know before the sale ends. Or wait for Unity 4.3.
     
    Last edited: Nov 1, 2013
  40. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    1) game ending before time is a new feature. To showcase the "convert remaining time moves to specials". The score limit is enabled in the "Winning Conditions" script section.
    ** the premateur release of 2.4.0 (before i re-distributed it again with the bugfix under the same version) has a bug whereby the convert tries to convert a rainbow and fails *(because you can't convert rainbows back to a color) ... sorry it is fixed now

    2) Text corruption. You would know about this if you read the changelog...
    btw, please get my new hotfix release for NGUI 3.0.2 backwards compatible asset.
     
    Last edited: Nov 1, 2013
  41. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    I Made this new package as a hotfix for the current situation regarding NGUI v3.0.3 performance issue. Please review what you need. Thanks.

    http://ask me - JMF v2.4.1 (supports both NGUI v3.0.2 v3.0.3 + minor hotfix)
    http://ask me - leantween v1.17 ( if you are annoyed @ the default warnings of 1.181)
    http://ask me - NGUI v3.0.2

    Thank you for your patience.
    ------
    Your feedback would be appreciated for this current poll :-
    A) continue using NGUI and wait for it to get better.
    B) Switch to 2D Toolkit - https://www.assetstore.unity3d.com/#/content/908
    C) remove 3rd party support as well as WYSIWYG feature and stick with Unity GUI
     
  42. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    I vote for A - I'm already in it, and the new unity will have the 2d stuff built in.. why wast the time now, if we are likely to switch to new Unity and new way of doing things later anyway?
     
  43. Krzyk

    Krzyk

    Joined:
    May 21, 2013
    Posts:
    3
    Oh yeah the changelog ^^

    And about game early I meant: the game finished special gems started to trigger/blow/whatever gems started falling and then there was only rainbow star it triggered gems vanished and the game ended but as the print screen shows the gems didn't fall. As if the game checked if the gems are falling not if the gems can fall.
     
  44. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    So this is totally non-specific to the JMF; but sort of relevant, and hopefully some kind hearted person will help this C# newbie.
    If I wanted to play a specific animation in the middle of the board (using "int myXpos = gm.boardHeight/2 ; int myYpos = gm.boardWidth/2, then play the animi at that position), based on a score, how would you do that?

    I tried to latch onto the CustomAnimations part; and just repeating stuff in there, but I just could not make it work - I also could not find where to call the current score...

    So the idea is if the score >= some predetermined amount, then play an animation and a sound. Like a firework and a "WOOHOO!" or something.

    Any ideas? :)

    Thanks!
     
  45. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    You can try to make a new animation call in "Custom Animation" first.
    Then either make a new script or latch on to "Winning Conditions". In winning conditions, there's a routine check for the score if it is a score game. you can follow that example.

    so the code will look something like :-

    *during a coroutine check*
    if ( gm.score > *something* ) { gm.animScript.doAnims(*myanim*) };
     
  46. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    please stay with ngui
     
  47. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    +1 - but if you do go with 2dtk, i went ahead and bought it cause its cheap right now.
     
  48. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Hope me makes a test run with 2dtk to find out how much speed improvements he get.

    I don't mind to have ngui just for the gui and 2dtk for jewel match.
     
  49. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I have no problem if you will make a 2D Toolkit version and also stay with ngui ;)
     
  50. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Scripts/customisables/WinningConditions.cs(102,36): error CS1061: Type `GameManager' does not contain a definition for `animScript' and no extension method `animScript' of type `GameManager' could be found (are you missing a using directive or an assembly reference?)

    Is there a using statement that is required? I tried including CustomAnimations, I tried calling the anim various ways, I'm having fun with this.. learning learning learning....

    from WinngConditions.cs:
    Code (csharp):
    1.  
    2.     if (numStars <= 2) {
    3.             if(gm.score >= scoreToReach){
    4.                 gm.animScript.doAnims(gotStarAnim);
    5.                 numStars++;
    6.             }
    7.         }
    8.     }
    9.  
    From CustomAnimations.cs:
    Code (csharp):
    1.  
    2.  
    3. public enum animType{ARROWH, ARROWV, ARROWVH, ARROWTX, STAR, GOTSTAR, RAINBOW, BOMB};
    4.  
    5. public class CustomAnimations : MonoBehaviour {
    6.    
    7.     public GameObject horizontalAnim;
    8.     public GameObject verticalAnim;
    9.     public GameObject starAnim;
    10.     public GameObject rainbowAnim;
    11.     public GameObject bombAnim;
    12.     public GameObject gotStarAnim;
    13.  
    14. ....ORIGINAL CODE HERE....
    15.  
    16.         case animType.GOTSTAR :
    17.             if(gotStarAnim != null){
    18.                 Instantiate(gotStarAnim,gm.board[x,y].position,Quaternion.identity);
    19.             }
    20.             break;
    21.