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

Super 3match kit - with: AI, visual editor and modular gameplay editor

Discussion in 'Assets and Asset Store' started by LuxUnity, Aug 15, 2014.

  1. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    that worked Thank you again. I just need to adjust the syntax to:
    "if (number_of_elements_to_damage > 3 && n_combo > 0 && bonus_select == bonus.none)"
     
  2. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    Maybe I'm missing something, I can't find the cursor transform in the inspector window of the controller game object.
    Where is it?
     
  3. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    It is accessible via script board.cursor
     
  4. muneeb.ali17

    muneeb.ali17

    Joined:
    Jun 15, 2015
    Posts:
    1
    Hi LuxUnity,
    I tried to make diagonal falling but not so much successful, Functions that I figured that can help me in doing that are ...
    Board_C.Start_gem_fall
    tile_C.Make_fall_all_free_gems_over_this_empty_tile
    tile_C.Create_falling_gem
    tile_C.Update_gem_position
    -- Need your help ----
    I have automated Board GUI (because it is hectic to set each level configuration in separate scene to make a game like Candy Crush which has 600 levels) , using Text File which contains 140 levels information, Each Line represents 1 level configuration, Line is extracted & controller configuration is set through coding. In this way you don't need to set controller configuration for each separate scene.
    1 Scene = ALL Levels
    I will share if you think it can improve this package.
    Regards
     
  5. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    It work in that way:
    1- Board_C.Start_gem_fall scan the board from bottom to top and when find an empty tile, call in it tile_C.Make_fall_all_free_gems_over_this_empty_tile
    2- tile_C.Make_fall_all_free_gems_over_this_empty_tile scan the column over itself and if find something that can fall:
    2a- update the Board_C.board_array_master move the gem directly on the empty tile
    2b- star the animation to move the gem sprite over the already update position of the array
    (and eventually call tile_C.Create_falling_gem if need)

    So you can make a code to call from Board_C.Start_update_board() as an alternative to Board_C.Start_gem_fall in order to rewrite the falling logic or go in tile_C.Make_fall_all_free_gems_over_this_empty_tile and rewrite the first condition
    "//interrupt the count if" that call break when find something that can fall, and instead check if in the diagonal position if there is something that can be move diagonally and fall.

    I hope this can help you.

    I also plan to invent a way to support the diagonal falling in a next update, but by now I'm busy with the conclusion of another project and so can't fork on it right now.

    And yes, I'm interested to your new text file solution.
     
  6. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    hi
    Great asset! Just got it the other day and I had very few problems getting it to work. By now i think i have understood most of the features. Anyway, I wanted to ask if you could add a few features. Actually it's all about the scores and goals.

    Could you please add the following:
    1) Reversing the win and lose factors
    As of now, you only play by fixed goals, so you win once you reach a certain score or destroy certain blocks. Why not turn it around? So you play until the time is over (or have no more moves left) and then you have a scrore that is good enough to beat the level (or you don't ;) )

    2)
    Given that we can reverse the win and lose factors:
    When playing against the time by score it could be great to have one minimum goal and one or two stretch goals.
    EG you win a bronze award if you make it to 5000 points before the time ends / you run out of moves, but you will get silver for 7000 and gold for 8000 or more ,



    Oh and I found a bug:
    When you set the goal to "destroy all blocks" and set a limited number of moves, your script will say "You Lose" even if you manage to destroy the last block with the last possible move. So you ONLY win if you destroy all blocks one move before the last one. This can't be right.
    I guess it is because you check for the rest number of moves, which is displayed as zero, which is also the lose-factor. Can you please fix it?

    Thanks!

    Anyway, I am having fun with this good asset
     
  7. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    1) I add this to to-do list
    2) 3 star system with incremental goals is supported through menu kit: star 1 is the board win condition, star 2 and 3 are optional and setup in advanced board setting when the menu kit is on
    3) Thank you for your report, I'll fix it.
     
  8. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
  9. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  10. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Hi again

    I got the Mobile Menu starter kit from the store. Basically, most of the settings still work, but I have a few problems now. I guess it's just some wrong setting or so, but even with the manual I don't seem to get a clue what is wrong in my case.

    Here is what's missing:
    Now with uGUI set up, there is music when I start everything from the home scene, but no sound effects any more. And there won't be lose-screens and win screens after a match.

    I guess that both symptoms come from the fact that my game_uGUI script looks totally different in my inspector, compared with the one in the manual. I have no public slots for sound FX and extra screens. (see attached image)

    Additionally, Unity's Console will tell me that there are two event systems, which doesn't work, I don't know what to do here. I switched both off, one at a time. Result: No more Console warnings, but still no change in other aspects. Which event system am I to use?

    Maybe these seem like stupid questions to you, but I am really puzzled and hope for help.
    thx for your time. 0001GameGuiDifference.jpg
     
    Last edited: Jun 18, 2015
  11. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi, delete the event systems in the board controller prefab and keep the one in Stage_uGui prefab

    Musics for win and lose, now are setup in Home scene > manage_audio > Game_master > Audio
     
  12. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Hi, thanks for the reply, but you misunderstood me

    1) It is not the music that is missing. I have no public slot where i can tell the uGui to load the win screen. This is why no win screen will appear at all. When I win a game, the game just stops - nothing more.

    2) Background music is playing, but I also put some sound effects for explosion and falling in the 3match controller. They do not play, i can only hear my background music. Why? Because my Sound FX are bound to the 3match controller

    I guess that uGui is supposed to manage my sound FX, but the script game_uGui does not have public slots in the array, so I cannot put sound FX anywhere. See my Screenshot from the last post.

    Just compare my game_uGUI with your game_uGUI from the pdf manual. Can it be that you commented lines of code out or something? In my version of your script, there are a lot of options missing.

    0001GameGuiDifference.jpg
     
    Last edited: Jun 18, 2015
  13. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You see the right menu. The others options are hidden because now they are auto-setup now. If you want feed manually the win and lose screens open game_uGUI script and remove the [HideInInspector] from line 20 and 21.
    As said sounds in uGui now are setup from Home scene > manage_audio > Game_master > Audio so you can do it only one time and will work in all stages.

    Sometime the import asset miss to add an important tag, so go in Edit > Project settings > tags and add "_gui_" if it miss (without the ");

    Also be sure to have delete code lines as explained in the "mobile menu kit setup.pdf" in 3match > documentation folder.
     
    Last edited: Jun 18, 2015
  14. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    AH. Okay. There is no Tag _gui_ . I added it.
    I guess now I will have to move all uGui elements to this tag right?
    Because at the current state they are all untagged.
    I also have not removed any code lines form the board controller yet, but it is the next thing i will look up. Thanks so far, I will look into all this.
     
  15. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    No, everything will be fine without change nothing. Just check if Stage_uGUI now have _ugui_ tag.
     
  16. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Thank you for your support. Almost everything is running fine now. Win and lose screens appear and are animated. Great!
    There is only one issue left - and that is the still missing sound FX while playing the game. I know the sound features in uGui, but there are still no slots for in game sound effects.

    the sound files that i added in the board controller are not audible. They are not activated for some reason.
    Can you help me with this? When this is solved, then I guess I have everything.

    0001GuGuiSound.jpg
     
  17. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    You need to use both audio setup.
    Tap sfx and tap error sfx refer to sfx for gui (when you click on start in home scene, when open the pause menu in game scene, when try to open a stage that have a padlock etc.).

    Instead the Audio sfx in the board controller is for in game sfx (explosions, bad moves, etc.) only win and lose sfx are replace from the uGui.

    So, in your image, at left there is the setup for in game sounds, and at right there is the setup for gui sfx and music.
    You need both because they cover different things.
     
  18. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Good, BUT the left ones do not work. I cannot hear anything when the game is running. It worked before I used uGUI. Sorry for the trouble.
     
    Last edited: Jun 18, 2015
  19. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Ah, ok, it is solved.
    I accidently forgot to erase one line of script.... so everything is fine now, thanks for your help
     
  20. karaokefreak

    karaokefreak

    Joined:
    Nov 12, 2013
    Posts:
    96
    Hey LuxUnity
    Now that everything works as inteded, I had time to fiddle around with your asset. This is a really good piece of software and I am very pleased with my purchase!

    However, I wouldn't be a games journalist if I didn't find a few missing features and things that would make this asset perfect. I hope you consider adding the following.

    These features would make your asset perfect:

    MINOR FIXES / Bugs:

    - Sound overlay bug
    When three or more rows fall simultaniously, the sound effect for "fall end" will overlay. Deleting horizontal lines will make the "fall end " sound very loud.
    This is not the case with vertical fills, since you can decrease the timing accuracy of the falling gems (which i did), but this does not help with horizontal fill ups.
    SUGGESTED SOLUTION: Make the engine realise when more than one gem hits the ground at the same time. If this happens, reduce the sound output to one of the gems and mute all others in the same line

    - Change praise animation
    Please add an option that allows to change the praise / score animation by speed and height and by display time. I tried to do that manually, but I cannot access your score_anim.anim. The praise words move too fast, so it is hard to read them

    - add praise sound effects
    Add an option that allows to add sounds / speech for each praise line

    - Fix the zero-moves bug
    I mentioned it a few posts before. As of now, when you manage to reach a score goal / remove goal with the last move (Remaining moves = 0), the game will tell you that you have lost, altough you have won. This needs to be fixed.

    Fix the Stars / World-bug
    I can point out how many stars it takes to enter the next world, but it is totally pointless, since the player still needs to finish all levels that come before the next world. This should be changed, so that you can access the first level of the next world, as soon as you have enough stars to unlock the next world.

    - Delay the display of the first star
    Your asset allows to delay the display of the second and third star in the win screen, but the first star is always there from the start. Can you please delay the display of the first star?


    MAJOR ADDITIONS

    - Reverse Win and lose goals
    I already mentioned it a few posts before. It were awesome if the player could play as long as the timer lasts (or play all remaining moves), and once the round is over, get a rating for the achieved score

    - Add a score count for every stage in the save file
    The way it is now, the player's maximum goal is to get a 3-star-rating.
    Together with reversed win and lose goals, it would be great if the player could still have motivation to improve the score in levels that were already solved - just by trying to beat the own high score. For that, the player must be able to see his highest score attempt. Maybe in another seperate screen, accessable from the World selection screen.

    Please note that the code for this should be easily accessable, so that it can be modified. For example if somebody wants to read out high scores for saving in an SQL database on an external server.

    - Add a "New Highscore" animation to the win screen
    New high scores should be rewarded with extra praise. A simple image flying in (in the win screen) could to that.

    --------------------

    Thanks again for the great asset. I hope you consider adding / fixing some of these things.

    cheers
    karaokefreak
     
    Last edited: Jun 22, 2015
    hollywoodcolor likes this.
  21. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Thank you for your feedback, I'll start to for on that today.
     
    karaokefreak likes this.
  22. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    Awesome list I was dealing with the same Sound overlay bug I unlinked my sound but it feels unfinished with it silent.

    Is there an easy way to check if sound is playing and do an:
    if(!soundPlaying){playSoundFX()}

    my thing is where do you put that line of code so you don't break everything else.
     
  23. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    how do I add:
    board.bonus_select=Board_C.bonus.give_more_moves;

    after I run my:
    Destroy_this_color(1);
    Script

    It keeps on giving the enemy control
     
    karaokefreak likes this.
  24. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    In IEnumerator Move_gem_to_this_tile()
    change
    Play_sfx(board.end_fall_sfx);
    in

    if (Time.timeSinceLevelLoad > board.latest_sfx_time + 0.01f)
    {
    Play_sfx(board.end_fall_sfx);
    board.latest_sfx_time = Time.timeSinceLevelLoad;
    }

    and add public float latest_sfx_time in board script

    board.bonus_select=Board_C.bonus.give_more_moves is to gain moves when play alone versus a move counter, You instead want an additional move after have used Destroy_this_color(1), so in the script that you use to call Destroy_this_color(1) add:

    turn_gained = true;
     
  25. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    I got both of those to work, Thank you so much.

    ps I don't know why but if you search : match3 or match 3 in the asset store your asset doesn't come up
     
  26. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    I want to display to the Player that they got an extra move (Show an image or text ) how do I access extra move?
     
    Last edited: Jul 4, 2015
  27. hollywoodcolor

    hollywoodcolor

    Joined:
    Jul 12, 2014
    Posts:
    35
    I want to and an animation and sound effect between when a bonus is activated and when it shown on screen.
    example starting at 2:14
     
    Last edited: Jul 5, 2015
  28. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 1.3.6 in upload with:
    - Fix the zero-moves bug
    - refined praise
    - Reverse Win and lose goals
    (other requests are in the latest menu kit update)

    and with this too.

    This is not supported by now, but you can open tile script, change the bonus void in ienumerator and use
    yield return new WaitForSeconds(your time here);
    to delay the bonus effect.
     
  29. Polywick-Studio

    Polywick-Studio

    Joined:
    Aug 13, 2014
    Posts:
    307
    Can I ask.

    Can you put a board as separate image behind the tiles. Is that possible?
     
  30. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    No, board is made by tiles.
     
  31. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 1.4 in upload with diagonal falling.

    See new last stage in the DEMO
     
  32. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 1.4 with diagonal falling ready in asset store
     
  33. kmelton

    kmelton

    Joined:
    Aug 18, 2014
    Posts:
    4
    Maybe this is already there and I'm just not seeing it in the code, but is there a way to assign different sound FX to the various bonus gems? For example, rather than playing the explosion sound when the 3x3 is clicked, have it play something else?
     
  34. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Actually no, but I'll add this to to-do list.
     
  35. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 1.4.1 in upload with support for bonus sfx
     
  36. kmelton

    kmelton

    Joined:
    Aug 18, 2014
    Posts:
    4
    That is fantastic! Great response time.
     
  37. kmelton

    kmelton

    Joined:
    Aug 18, 2014
    Posts:
    4
    I was working on adding support to the 3Match asset and the menu system for Master Audio. I have it setup using define symbols, so that it will not impact people that do not own that asset. I will revise my code to function correctly with 1.4.1. Is it possible to submit code diffs for your consideration? Is that something you'd be interested in?
     
  38. sygaki786

    sygaki786

    Joined:
    Jan 26, 2014
    Posts:
    142
    I just purchased your product. I like it very much since the code is clear and concise making it easy to extend. My problem is that I have only played Match 3 at a very basic level for a bit so I know only the basic strategy. So I am lost when I come across terms like 'destroy all tiles', 'destroy all blocks', 'tile damage', 'take all tokens' etc. Where can I get more info on the match 3 game mechanics in this kit?

    Also, what is HP? I have to dig into the code but is the AI something I can change in the code or is it encapsulated in a dll?

    Thanks,
    Syed
     
  39. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Tile are the squares that compose the board.
    Gems are the colored circles that explode when matched.
    Blocks are the square brown stuff that can occupy a tile.

    When 3 or more gem of same color are matched, they explode and damage (lose one HP point) the tiles under them and the block close to them.

    You can set the HP values in the editor window of the board.

    The asset don't use any dll.

    No, thanks. I don't have it and so I can't keep the asset update if Master Audio change something in future.
     
  40. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    Hi,

    A question on the AI.
    How difficult would it be to add an enemy sprite that will change picture when the AI is damaged or is gaining points? For example, a picture of a villain who will cringe with pain when player makes points or smile when the AI wins points.
     
  41. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Very easy.
    1- Make a new script with a sprite array to store your enemy pictures and a link to gui image that you want controll and add it to controller prefab.
    2- open Board_C.cs find "public void Update score()" and ad something like
    if (enemy_score > player_core)... show happy enemy from your new script... else show sad enemy
    3- same thing for "public Update_hp()" with current_player_hp and current_enemy_hp
    4- same thing in tile_C.cs "void Update_gems_score()" with total_number_of_gems_remaining_for_enemy and total_number_of_gems_remaining_for_the_player
     
  42. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    Thanks! I will try it out.
     
  43. Nintenjo64

    Nintenjo64

    Joined:
    May 19, 2015
    Posts:
    12
    Hi,

    I was considering purchasing this kit, however i wanted to know if a few things were possible first..
    • Can i change the board size easily? (i need a vertical static board 6 x 16 tiles)
    • Is it easy to change rules like (tiles can only be swapped horizontally? new tiles are only spawned based on a timer so i board has gaps in it?)
    Would changing this underlying match 3 rules cause problems in the code?

    BTW i'm not a good programmer (more of a technical artist..)

    Your thoughts are welcomed on this.

    Thanks.
     
  44. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    1) Yes, the match editor support values between 5 and 30
    2) you can change a lot of rules without coding using this menu:

    but horizontal only swap and timer spaw are not supported.

    Force horizontal swap colud be done working on code, timer not because falling, spaw and destroying must work together or will mess with player interaction. If you want to have empty tiles your can keep draw empty at start in match editor and/or using block that stop gem falling.
     
  45. DFG

    DFG

    Joined:
    Oct 18, 2011
    Posts:
    61
    Hi Can you do match 4 and match 5 to create a super gem?
     
  46. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    If for "super gem" you mean something like a bomb, this is supported, yes.
     
  47. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Is there a way to enable player_can_move_when_gem_falling?

    I want a skill-focused game like Bejeweled. Not an RNG-focused game like Candy Crush.

    I tried un-commenting some lines involving player_can_move_when_gem_falling and variables in Board_C.cs, but it didn't work.

    Actually, none of the edits I make to Board_C.cs seem to show up in the Unity editor. If I add a new public member, and save the cs file, nothing changes.
     
    Last edited: Apr 17, 2016
  48. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    No. I had tried out various solutions, but I don't have found a solid solution yet. Even if you these lines, it don't will work.

    You need to edit the script in edit folder too.
     
  49. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Hmmm. I tried commenting out all the "player_can_move = false" lines, even when it seemed like they wouldn't be called anyway. It almost works for the first move, but then it breaks the core gameplay unpredictably. Matching stops working and new pieces stop coming down. I'm not sure why yet... Maybe it has something to do with coroutine yields?
     
  50. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Open the asset in a new project and look how to player_can_move was disabled here.