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

    are you using JMF v2.4.0 / v2.4.1 ? coz i think i only set up the link to anims after I found it necessary... lolx... whoops?
    if your version of GameManager does not include the animScript as a variable (which is clearly states is doesn't know what the heck it was from the error log) then you will need to do this...

    in the script you want to do it. or add this to the GameManager script;

    *in the class declaration scope*
    [HideInInspector] public CustomAnimations animScript; *or any name u like besides animScript*

    and in the "OnAwake()" or "OnStart()" ; declare the script using this line...
    animScript = GetComponent<CustomAnimations>(); * as long as your script is attached to the GameManager object...*
    else you will need to find the object via this code
    animScript = GameObject.Find("your game manager object's name").GetComponent<CustomAnimations>();

    so then you can call anything from animScript (which is actually CustomAnimations script... so you will most likely want to create a new function (because my "doAnims()" function requires the position of the board as well which you do not want since you wanted it in the middle of the screen.

    so you can do this for example...

    animScript.showBoom(); *showBoom is your new method... any name you like*

    then... in the CustomAnimations script...

    public void showBoom() {
    instantiate(*my anim object*);
    }

    thats about it... dont forget to declare a GameObject for your new anims *like the rest of the anims GameObject declared in the CustomAnimations*
     
  2. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    i'll make it easier... in case u couldn't follow all those mumbo jumbo i vomitted out earlier...

    go to the GameManager script... and ctrl-f ... look for this similar codes..

    Code (csharp):
    1. [HideInInspector] public MatchType matchScript;
    2. [HideInInspector] public AudioPlayer audioScript;
    3. [HideInInspector] public CustomAnimations animScript; <--- and add this...
    then look for this...

    Code (csharp):
    1. // support sub-scripts initialization
    2. powersScript = GetComponent<Powers>();
    3. mergesScript = GetComponent<SpecialMerge>();
    4. matchScript = GetComponent<MatchType>();
    5. audioScript = GetComponent<AudioPlayer>();
    6. animScript = GetComponent<CustomAnimations>(); <--- add this...

    only then, could u use the "if ( gm.score > *something* ) { gm.animScript.doAnims(*myanim*) };" i was talking about...

     
    Last edited: Nov 3, 2013
  3. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    WOOHOO! Thank you!
    (happy dance)
     
  4. NeoUnity

    NeoUnity

    Joined:
    Sep 4, 2013
    Posts:
    156
    I want to know whether the designated(=reserved) piece(=gem, jewel) is destroyed(=matched) or not.
    - My new winning condition is the destroyed piece's number counting as Candy Crush Saga.
     
  5. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    at the moment, the matching conditions does not save any history on which type is destroyed. if you want the game to know, you will need to alter "MatchType.cs" script in the customisables folder to do exactly what you want when a match happens. ( in this case, you will probably want the script to tell another script that a particular type is being destroyed)
     
  6. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Hey everyone, finally getting around to updating and testing out 2.4.0 with NGUI 3.0.3. I wanted to chime in and suggest what another user mentioned. If it were me, I'd wait for Unity 4.3 because of the 2D tools. In the meantime run what seems to be the most stable version 3.0.2 until it's compatible with any current build.

    Are you still offering the hotfix for the NGUI 3.0.2 version? I might need it after checking out the updates.
     
  7. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi, I just only stepped out... Will pass it to you when I can... Latest is JMF v2.4.1 which is compatible to both NGUI 3.0.2 and 3.0.3
     
  8. kurayami88

    kurayami88

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

    Initial tests confirms that 2D toolkit performance is much better than NGUI. There were a few complications though. Especially since 2DTK does not support dynamic fonts. And the UI input receiver is different too.

    But i love the resolution handling. Though auto-adjusting board/pieces size may or may not be available. The system is so different that the new "pixelSize" adjustment for NGUI version is not compatible with 2DTK.

    still on the verge on converting all the systems ( only converted the main functions to test speed performance). May take a while longer. Thanks for your patience...

    P.S.> i'm still keeping NGUI version of JMF (v2.4.1), though i think i may drop NGUI support for future releases.

    ============
    side note, for those looking foward for Unity 4.3 release of 2Dsprites. Please be aware that it is not the sprites i'm after but the WYSIWYG text support for UI. So far i have seen WYSIWYG for sprites but not text.

    I will try and keep two versions, both 2DTK and NGUI and will wait for official release of Unity 4.3 then only will re-evaluate the situation.
     
  9. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Yo! I tried 3datlas from the assetstore that uses ngui atlases to show a sprite from an atlas on a simple plane with 8 triangles.

    Massive speed improvements!
     
  10. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Oh.. very cool. How massive?
     
  11. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    On my iMac when there is a big full screen combo it dropped to 80 fps now its stays at +- 170 fps.

    iPad3 dropped to 12 fps and now it goes never below 30.
     
  12. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    NEWS UPDATE

    JMF v3.0.0 is ready for public release! it uses 2D Toolkit instead of NGUI !
    Those interested to use 2D toolkit over NGUI are more than welcome to request for it by emailing me (as usual; + prove if needed) thanks :)

    the performance is much better than NGUI at the current moment. However, you may need to learn how to use 2D toolkit if you are unfamiliar with it.

    -----------------
    P.S.> NGUI 3.0.4 (which is actually 3.0.3g) is no better... still lags =(
     
    Last edited: Nov 5, 2013
  13. juan_mejias

    juan_mejias

    Joined:
    Jun 5, 2013
    Posts:
    19
    Hello, I'm new, just bought JMF 2.2.0 on asset store. By the way, congratulations and thank you, is the best Match-3, is exactly what I was looking for.

    I have NGUI 3.0.4 and Lean Tween Ngui V.181, and nothing works.
    I see you've changed to 2D Toolkit. I I have also 2D Toolkit.

    Like right now nothing works, do you recommend?

    I hope to come out JMF 3 in the asset store and do a clean installation free of problems?

    When version 3 will be released to asset store?

    Thank you.
     
  14. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    replied in PM ... thanks :)

    as to when version 3 is officially released.... ask Unity QA... they are really slow... *submitted today 5th Nov*
     
  15. FitzSoft

    FitzSoft

    Joined:
    Feb 15, 2011
    Posts:
    21
    Hi, and thanks for your updates on this really cool kit.

    Would it be possible for you to add a video on how to switch out the default Gems for some new/other prefabs. You could do a small example to change one item to show people who are new to unity and the kit, and especially now you have moved away from NGUI.

    Thanks and regards


     
  16. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    So - this is whats been brewing.
    Is there emigration tool to go from NGUI to 2DTK?
    Ugh.. I need an artist.. badly.

    $cdu_ss.png
     
  17. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493

    sorry... no auto migration tool :(

    your game looks cool :) ... much cooler than my lame default kit
     
  18. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    thanks :) A lot of the assets are from an iOS ObjC game I did earlier this year.. unfortunately, I never got the eps or psd files from the artist, so I'm using the png's as placeholders till I find a good art person to recreate the assets...
     
  19. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    I made this video for intro to JMF v3.0,0 and 2d toolkit...and in the later parts, explaining about swapping out the default gems :)

    http://youtu.be/gT894QTamgg
     
    Last edited: Nov 5, 2013
  20. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    very very cool. I plan to migrate my game to the new version this evening to see how well it works. Hopefully it gives me a marked improvement with mobile - I was getting some lag with the explosions you see in the screenie in a previous post. I think that had more to do with the animation prefabs themselves than with JMF though..
     
  21. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    please don't spam the board...
    I gave you the link via private message since the first time you posted. Please check your notifications. Thanks.
     
  22. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    How sweet. *hug*
     
  23. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    The 2DTK support is a huge difference. Everything looks sharper and I like how you can use 3D objects too. Without this video I would have been totally lost trying to figure out how to use 2DTK.

    Thanks!
     
  24. FitzSoft

    FitzSoft

    Joined:
    Feb 15, 2011
    Posts:
    21
    Fantastic update! Video really helped to add 3d prefabs :)

    Keep up the good work!
     
  25. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    I'm so pumped about the update too. I was hesitant with 2DTK at first but I found so much value in it that I can't believe I wasn't using it. NGUI is meant for UI stuff so it does make sense to use it as such. The whole scaling aspect to the new build is what I've been wanting too. Should I need a portrait layout, I can do it easily. It seems like using 2DTK has solved all those weird laggy bugs.
     
  26. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Bug Report (JMF v3.0.0)
    -------------------

    moving the game manager panel away from xyz 0,0,0 may seem normal... at first... but when power gems start spawning, it spawns out of position (depending on how far you moved the board from 0,0,0). It will return back to it's original box once it drops by gravity and you can see it flying back to position. The board calculation/activity remains un-affected.

    just position memory error. Will get a fix out asap. Not a big deal.
     
  27. kurayami88

    kurayami88

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

    i fixed the bug mentioned above... ( i told you it was no biggie...)
    and also added something new ;).. something some users have been asking how to do/requesting
    if you are wondering what that something new is, try loading the demo webplayer and check out scene 2 - "4 gems 5x5" ... lalalalala~~~~~

    http://goo.gl/lAKpUA <--- demo webplayer link... (remember, webplayer needs admin rights)

    -------

    i can release the new feature... but i cannot record the video explanation as of yet till tonight... i need my room to record .. it's nice and quiet there...
     
  28. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Ok - I am drooling now.
    How do we get this update? :D
     
  29. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Super cool update, nice work!
     
  30. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    ok... it's ready for release. usual step applies... let me know by email or pm (with purchase invoice for newbies)

    Just so you know... the contributor of the visualize grid has more features that can be enabled, so i'm looking into the posibility of fully integrating it with my asset. The new features of the grid work will include :-

    1) a re-size gizmo on the grid itself so you can resize the grid like a picture. (but not board width height boxes)
    2) a known scale for the board box size. What this means is that, no more manual scaling of custom objects. (and need of sliced-sprite for auto-resize to work) ... it will resize ALL GameObjects to fit the board nicely (hopefully)


    v3.0.1
    -------------------------
    * fixed board positioning bug when specials is made

    * added auto-add-support-scripts for custom piece prefabs ( so that you dont need too manually )

    * added "get number of pieces" game condition into "Winning Conditions"

    * Youtube explanation for v3.0.1 - http://youtu.be/38MtEQ4m8po
     
    Last edited: Nov 7, 2013
  31. isacan

    isacan

    Joined:
    Jul 18, 2013
    Posts:
    37
    how to use in portait mode and can you send me v3.01?
     
  32. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    you will need to re-adjust the GUI layout for your own needs for screen ratio and screen size. The default provided is set up for landscape HD mobiles 1280x800.

    as for the new update, i'll pm you the link. Thanks
     
  33. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Ok - for #2, that would be AWESOME. Not sure about #1, because I am not sure what that really does :)
     
  34. Tauz

    Tauz

    Joined:
    Oct 31, 2013
    Posts:
    4
    1) means a visual, green handle on the right side of the grid. With it, you are able to resize the grid simple per mouse drag, to fit your needs. :)
     
  35. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    oh thats cool... :)
     
  36. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    JMF v3.0.2 is ready for release. If you want it early, please email/pm me (with purchase invoice number for newbies)
    Youtube explanation for v3.0.2 - http://youtu.be/hsbpvGnf9cY


    ##############
    Changelog
    ##############

    v3.0.2
    -------------------------
    * improved scene visual grid to be more informative and helpful
    - includes scene drag handle for easy board value adjustment
    - tooltips display for users
    - added padding value and padding visualizer to easily judge desired looks
    - main contributor -> "sebastian" aka 'Tauz'

    * auto-scaling of ALL prefabs used as game piece to suit desired board size
    - Please keep in mind that animations are not auto adjusted. You will still need to adjust animations yourself.

    * tidy up revise GameManager BoardLayout inspector tab

    Thanks!
     
  37. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Good thing I'm not using 3D objects because it seems like it can do a number with all those draw calls. I can't stop playing with this framework... it's so sick. Thank you for the update!
     
  38. Tauz

    Tauz

    Joined:
    Oct 31, 2013
    Posts:
    4
    Really nice update!

    Keep up your good work (and don't forget to take day or two off sometimes!) :D
     
  39. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Looks like Unity 4.3 with 2D is now available :)
     
  40. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    cool... will check it out :)
     
  41. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    to those curious...

    EDIT ** 2dToolkit has a new version out for compatibility with Unity 4.3 **

    I will look and check if converting to Unity GUI is a good move.
    1) currently i do not have a clue how to handle resolution and ratio.
    2) how to have anchors on normal Unity GUI
     
    Last edited: Nov 12, 2013
  42. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Annnd... got my ngui stuff converted over to the 2dtk - I didn't realize how much actual hacking I did on the C# stuff till I started the conversion process :) both irritating and exciting at the same time...
     
  43. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304
    Hopefully you'll land on a 2d environment and stick to it :)
    I would be most interested in finding out if the 2dtk and JMF work with Unity 4.3... then I don't have to convert my stuff again...
     
  44. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Phew, was about to see if there are any conflicts. 2DTK seems stable at this point but naturally let's test to see if there are any significant improvements.
     
  45. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    i took a quick look into the new Unity GUI.
    and i'm not impressed on first impressions. their sprite system is very basic. and it still takes a draw call each for non-uniform scale size. a problem 2d toolkit addressed by having an internal scaling.
    and they still do not have WYSIWYG for text... they are still using GUIText which is only visible via their GUILayer script and shown in play-mode only.

    it has 2d features - yes... but it's very basic in functionality.

    ======

    my current opinion... stick with unity 4.2 ... wait for 2d toolkit to update their asset to be compatible with 4.3. and then use unity 4.3 with 2dtoolkit support. the features of 2dtoolkit (or any gui kits for that matter) has its uses.
     
    Last edited: Nov 12, 2013
  46. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Thanks for the tips! :)
     
  47. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    Nice, I figured it's going to be buggy and super basic. The 2DTK guys are probably updating stuff as we speak.
     
  48. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    lol... speak of the devil... 2d toolkit has pushed a release for unity 4.3 support
     
  49. VectorNector

    VectorNector

    Joined:
    May 22, 2013
    Posts:
    62
    LOL They make a fine product so it was expected.
     
  50. rickcollette

    rickcollette

    Joined:
    Mar 17, 2013
    Posts:
    304