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

Mad Level Manager - Level chooser and manager

Discussion in 'Assets and Asset Store' started by genail, Jul 13, 2013.

  1. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    @genail ,

    Thanks a lot for your help. Ive managed the custom font to work, and custom theme also.

    One more thing which I'm curios too much is what's going to happen in this scenario:
    Lets imagine I'll release the game in the play store. Users will download and complete some lvls, and then I release an update. So, that particular user will update the game.
    Once the game updated, is the progress going to be the same? Or should I integrate google play services?
    In case, if I want to integrate Google Play services (achievments, leaderboards) how can I add the progress to be saved in to the player's gmail account?

    EDIT: How can I change the color of the font?
     
    Last edited: May 26, 2015
  2. TribeWolf

    TribeWolf

    Joined:
    May 3, 2012
    Posts:
    14
    Hi, Piotr!

    Can you send me this script too? :)
     
  3. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    You don't need to worry about it, the player's progress will be preserved :)
    Anyway if you want to integrate MLM save system with any other 3rd party storage, it's a easy thing to do. You just have to write your own storage backend class and make it read and write from Google Play Services.

    You can change your text color in the place where it is displayed. Mad Text component has color property. It should be next to the place where you're entering your text in the inspector. If you're doing it from the code, look for "tint" field.

    @TribeWolf sure!

    Cheers!
    Piotr
     
  4. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    @genail,

    I go to prefab template for the Font, and there are actually a Tint options. But it changes the color of the background not the Font itself. The font keeps remaining white.

    Edit: Any chance to get a minimum example of MadManager + Google Play Services? My knowledge is not that enough to handle it all alone... (sorry for asking you more then MadManager does)
     
    Last edited: May 26, 2015
  5. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I think that something may be broken with 2-color font shader. Please use the text color instead and I will fix it with the next release. Please let me know if this is very important for you :)

    I've never used GPS and I'm afraid that I cannot currently provide you an example, at least one that it is working...
     
  6. meom

    meom

    Joined:
    Feb 15, 2014
    Posts:
    24
    How do I set up different loading screens for each level? Say I have three scenes (Scene-01, Scene-02, Scene-03) and a corresponding loading screen for each one (LoadingScene-01, LoadingScene-02, LoadingScene-03) and have it set up as in the image, all 3 loading scenes appear on all three levels before the level starts. What am I doing wrong?

    .
     

    Attached Files:

  7. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    You should create 3 extensions with a single loading scene instead of one extension with 3 scenes. Then assign different extensions to your levels from the main level configuration and all should work just fine :)

    Cheers!
    Piotr
     
  8. meom

    meom

    Joined:
    Feb 15, 2014
    Posts:
    24
    Thanks, that worked.
     
    genail likes this.
  9. indroe

    indroe

    Joined:
    Mar 29, 2015
    Posts:
    7
    hi,
    how to make level unlock after player invite friend or waiting?
    i know how to using facebook api, or using system.datetime, but i dont know how to use it on MLM,
    thanks before
     
  10. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi indroe!
    The logic when you want to unlock your level is completely up to you (MLM cannot handle these things). When you will know that you want to unlock the level, just execute MadLevelProfile.SetLocked("Level Name", false); and your level will be unlocked :)

    If you're on the level select screen when level is set as unlocked, you will need to reload your current scene using MadLevel.ReloadCurrent().

    Hope that helps!

    Cheers!
    Piotr
     
  11. Milo_del_mal

    Milo_del_mal

    Joined:
    Jan 27, 2013
    Posts:
    43
    I am sorry to bother you again.
    When using Easy Save 2 as saving backend. Does it saves everything as a long string? Or does it support saving everything as their own type (int, bools, strings etc)? To know if the File editor is going to be useful for easy save.
     
  12. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!

    It's saves as a long string. There's a Profile Browser tool for Mad Level Manager that allows to browse the saved data, but I planed to make it editable as well. If you need it, I will implement it soon. Just let me know! :) You can find the Profile Browser in Tools -> Mad Level Manager menu.

    Cheers!
    Piotr
     
  13. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    Hi,
    I do have another strange issue. The custom icons in the Lvl Manager screen, (left and right). They became smaller and smaller whenever I click and change the page. Imagine, I click on it first time, to get to the second page, then I click again for third page, and it starts getting smaller and smaller. Screenshots attached. How it was at the beginning and how it became after I clicked few times to change the lvl's page.
    Initially, the size is ok.



    After that it becomes like this:



    WHYY?
     
  14. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Daler,
    This may be the animation issue. Do you animate your icons scale back to original scale?
    Please send me your scene as unitypackage along with prefabs and textures, so I can better diagnose the issue.

    Cheers!
    Piotr
     
  15. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    I didn't pay attention to animations. I simply changed the left and right icon by dragging the texture from the assets folder. Also I pm-ed you a link to dropbox, for the scene.
     
  16. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Daler,
    Thanks for the scene!

    I'm writing today because yesterday I didn't get the chance to look at it :/

    Here's the solution:
    1. Select your slide icon templates
    2. Go to Mad Anim Scale component
    3. Change From field from "Current" to "Origin"
    4. Change To field from "Current Multiply" to "Origin Multiply"
    Do that and everything should be fine :) You may need to click on the Grid Layout "Rebuild" button afterwards.

    76686104-f26c-4fb2-85c0-009aafcf8b12.png

    Cheers!
    Piotr
     
    Last edited: Jun 6, 2015
    DalerHakimov likes this.
  17. kriket

    kriket

    Joined:
    Aug 28, 2014
    Posts:
    33
    dont have time to read 15 pages so pls answer,

    I have my own game art. So I wont be buying themes from your store. Can I use my own themes if I buy Mad level manager?
     
  18. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    I believe I've just replied to your e-mail message :) In case that someone else are looking for the answer here's my response:

    Of course you can! :) Here are some resources that may come in handy if you decide to create your own theme:

    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/creating_icons.html
    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/icon_animations.html
    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/creating_background.html
    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/setting_up_bullets.html
    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/creating_font.html
    http://madlevelmanager.madpixelmachine.com/doc/latest/advanced/atlases.html

    Cheers!
    Piotr
     
    kriket likes this.
  19. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
    I updated an old project to Unity 5.1, and then updated MLM to the latest version and now I'm getting the following error on every frame:
    Failed getting triangles. Submesh topology is lines or points.
    UnityEngine.Mesh:RecalculateNormals()
    MadLevelManager.MadBigMeshRenderer:DrawOnSingleDrawCall(List`1) (at Assets/Mad Level Manager/Scripts/Mad2D/MadBigMeshRenderer.cs:255)
    MadLevelManager.MadBigMeshRenderer:LateUpdate() (at Assets/Mad Level Manager/Scripts/Mad2D/MadBigMeshRenderer.cs:133)


    Is this because of Unity 5.1 or do I need to do something special to update MLM other than just importing the new package? This level scene still seems to render properly.
     
  20. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!

    It sounds like something has changed in Unity API. I won't get the chance to check it today, but I will look at it tomorrow for sure! I will get back to you as soon as I will have something.

    Thank you for reporting this!
    Piotr
     
  21. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    OK I've inspected the issue and it looks like nothing more that additional error message that wasn't there before. This message is not an exception so it shouldn't break the game. Still it is very annoying and Mad Level Manager 2.3.3 will get rid of it.

    Anyone who owns MLM and want the version without this error, please write to me with your invoice no. to support@madpixelmachine.com. Everybody else, it should be available to download withing a week :)

    @mdrotar Please check your conversation box!

    Cheers!
    Piotr
     
  22. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Does this asset work with game controllers or desktop keyboards?
     
  23. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    Yes it is! :) Please read the following documentation page to learn more.

    Cheers!
    Piotr
     
    username132323232 likes this.
  24. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    Hello,

    I do have one issue with the custom theme. When the level is locked, I want to show the level number and the locked sprite. And when the level is unlocked, I want to show just the level number.
    But MadManager doesn't work properly and says, the level number has been used multiple times. Is that possible to show the level number and the locked sprite at the same time when the level is locked?

    Thanks
     
  25. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Daler,
    Just remove the level number from the visibility section. If you want your sprite to be always visible, it shouldn't be managed. Just make it visible and save it :)

    Cheers!
    Piotr
     
    DalerHakimov likes this.
  26. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    @genail,

    Yeah its working now as it should. Thanks for the super fast response. I have to say, the support level which you do provide is at unbelievable rate. Thanks a lot. I wish if other asset creators would give support like you, at least half of what you do ;).
     
    genail likes this.
  27. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    You welcome!
    I think it's because we're working at similar day hours :)
     
  28. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.3.3 has been released!
    New version of Mad Level Manager has been released! Read on to learn what to expect from the new version!

    upload_2015-6-16_19-15-19.gif

    Better with Unity UI


    Level select screens are now meant to be combined with Unity UI! Until now you had to tell Mad Level Manager when to listen for user input and when to ignore it. Now Mad Level Manager is aware of Unity UI widgets and when something is displayed at the top of the level select screen, it will work just as expected without any additional setup!

    Swipe fixes
    Swiping is a very important part of level select screens. Swiping algorithms have been improved and work very similar to the ones used in iOS (iPhones and iPads).

    Change list
    Here's the full change list:

    New Features
    • Created Multiple Backgrounds example
    Improvements
    • Level select screen icons are now aware of Unity UI at the top of them.
    • Layout API: Added bool animate to LookAtIcon()
    • Added DragStopDraggable options to tweak swiping
    • Better drag behaviour on smaller screens
    • Improved last page swipe effect to feature that there’s nothing more
    • Possibility to activate level icon even if swipe animation has not been finished
    Bug Fixes
    • Fixed MadLevelProfile.Reset() method that was not setting locked levels properly
    • Fixed issue with changing already unlocked levels order
    • Fixed Unity 5.1 RecalculateNormals() bug
     
  29. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thanks for the quick response!
     
  30. gamedge

    gamedge

    Joined:
    Jul 21, 2013
    Posts:
    1
    Hi

    I have 2 questions :

    Can I add my game levels without using the editor extension? How do I do it in script?

    Can we display the level name instead of level number in the icon?

    Thanks
     
  31. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    Yes, you can add levels from your code, but you should do it only in the edit mode. All you have to do is to use MadLevelConfiguration API.

    You can display level name on icon, but you have to do this using a custom script. Add a MadText component to child object of your icon and attach to it a script like this:

    Code (CSharp):
    1. void Start() {
    2.     var levelIcon = MadTransform.FindParent<MadLevelIcon>(transform);
    3.     GetComponent<MadText>().text = levelIcon.level.name;
    4. }
    Cheers!
    Piotr
     
  32. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    FYI I got this error in my game - nothing to do with MLM and I reported it to Unity. Aras got back to me within a day saying he knew what it was and was going to fix it - he said the error was harmless.

    On my side I saw this issue with Curvy when I generated a mesh from a line rather than a 2D shape.

    HTH

    Nalin

    BTW good to see uGUI integration !
     
    genail likes this.
  33. sudesh

    sudesh

    Joined:
    Dec 1, 2013
    Posts:
    3
    Hi, is it possible to animate icon with mlm, or just level selection button can be animated.
    Also how can stars be animated.....like popup effect

    What I mean to ask is that is it possible to animate images, panels... so that we can animate game tittles in intro, scoreboard when user finishes the game.
     
  34. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    You can attach simple animations to your sprites:

    a2de8616-112c-49bd-82b1-29bbf18e218b.png
    Better animation control may be added in the future. I don't want to do this before I migrate MLM to uGUI.

    Cheers!
    Piotr
     
  35. sudesh

    sudesh

    Joined:
    Dec 1, 2013
    Posts:
    3
    Thanks for the quick reply
    It would be great if button option was there( tools-> mad level manager -> create ui-> button). in future updates

    1. As I want the sprite to behave as a button. How I can I detect touch input on a sprite.
    2. I want sprite(button) to animate when intro scene loads. As mad level animator does not have option for onlevelloaded how can I animte the sprite.
    I tried playonawake, but its too fast and quickly completes the animation.
    So, My question is - how to animate with slight delay( about 0.2 seconds) after the scene loaded.
     
  36. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    For the button I strongly suggest using Unity UI instead of GUI provided with MLM, because the solely purpose of these scripts was to display icon buttons, backgrounds and pages bullets. The newest MLM is aware of uGUI so if you will display something on top of MLM icons. It will act just as a single GUI system (mouse won't be intercepted by icons that are hidden under Unity UI elements). The only issue with the newest version is when you put something from Unity UI on the background. If you want to do that, I will send you the patch release before it will be released officially.

    You will find there some information about animations too :)

    Cheers!
    Piotr
     
  37. meom

    meom

    Joined:
    Feb 15, 2014
    Posts:
    24
    Do you have a tutorial on how to create the second screen on this .gif. It says something about tutorial 1 and 2 but I can't find anything. I'm looking for how to create a results/stars/high score screen like that after every level and not just go to a level select screen. I currently have an animation screen that pops up at the end of the level and I have buttons working for replay, next level, etc, but I can't get the stars to appear.

    eta: I'm using Unity 5.1.1 and uGUI for the after screen.
     
    Last edited: Jul 13, 2015
  38. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi meom!
    Unfortunately I don't have any tutorial on this matter. It's not so difficult to implement though.
    1. Create a window that will pop up and disable it.
    2. Write a script with function like ShowWindow(MadLevelIcon icon) and make sure that calling this function will display your window
    3. Switch your layout Load Level to Send Message, set the object that contains your script as a Receiver and in Method Name type ShowWindow
    4. When player clicks on the "Play" button, use the previous passed icon argument to load the level: MadLevel.LoadLevelByName(icon.level.name)
    If you're using Unity UI then this is all that you need to do :) When the window is disabled again, you can choose different level again.

    Please write if you have more questions!

    Cheers!
    Piotr
     
  39. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Hi,

    is it easy possible to achieve the following?
    Can't find some hints in the API/Doc.
    • for e.g. 10 level pages â 4 level icons (no groups)
    • each page has a different background/color and different Icons
    • the best would be with color transition but it's not a must
    Thanks.
     
  40. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!

    You can change how many icons are displayed per page using the dimensions section. Just set Grid Rows and Grid Columns to 2 and 2.

    About the backgrounds there is a example scene how to do it. It is called Example 7 - Multiple Backgrounds and can be found in the package. Please look at it :)

    How the color transition should work?

    Cheers!
    Piotr
     
  41. Incos

    Incos

    Joined:
    Feb 12, 2014
    Posts:
    4
    Hi Piotr,

    First of all thanks for all the great work you have put into this asset :)

    Just had a couple of questions.

    1)

    MLM Diagram.png.png

    I seem to have some issues with MadLevelQuery() not retrieving updated info. My main menu scene uses the CountLevels and CountUnlocked queries from all the different groups I've set up to build a custom world selection screen. Everything unlocks as intended while playing, but if I either close the app or return to the main menu (as the red arrow shows in the diagram above) the values from the MadLevelQuery() are not updated. I have to open up one of the level group scenes and then go back to the main menu for it to update. Is there anything API wise I can call to emulate whatever the MLM code is doing to update these values?

    I've also tried to run the Init and Reload functions from the MadLevelProfile class before doing the query, but that did not sort the issue.

    2)
    Not really a huge issue, but as all my level groups have the same kind of layout and background, is there anything I could pass along from the main menu scene to change the group that is used in the Mad Level grid layout and only use one scene file?


    In advance, thanks!
     
  42. meom

    meom

    Joined:
    Feb 15, 2014
    Posts:
    24

    I'm still kind of confused. Attached is an image of what I want. I'm not the strongest of coders but I have everything working in this image except the stars and new high score aren't there. This is an animation that pops up when the health value < 0 or the level has ended. You can click on the Main Menu etc and they take you to the appropriate scene. I guess I'm saying is that it would be nice if you had a tutorial or sample scene that includes generating a level over results screen.
     

    Attached Files:

  43. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Thanks for your fast response genail!

    The example scene is nice, but my scenario (planned) should be:
    • Load the level chooser scene
    • Each page contains 4 level icons (no problem cause of dimension settings, that was already working)
    • I have one background image that I want to fade to another color when I go to page 2 for e.g.
    • I have different level icons and each page should have it's own level icon prefab
    Is this possible?
    For the background I just would need a PageSwitched(int pageNumber) event or sth. like that but I can't find it in the API.

    Hope you understand my scenario. :)
     
  44. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!
    Thanks! I'm glad that it can be useful for so many people! :)

    1. What version of MLM are you using? I can recall that in earlier versions there was a bug like that, but it should be gone. Please open Profile Browser tool (it can be found in the Tools -> Mad Level Manager) and check if the state is correct.

    2. I'm currently working on 2.5.0 that will introduce a lot better support for groups and group level select screens. It will also allow to use single scene for all groups. If you're interested please send your invoice no. to support@madpixelmachine.com. I will send you the preview release as soon as it is stable enought :)

    Cheers!
    Piotr
     
  45. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045

    @meom Ouch! I think that I misunderstood what you want to achieve.
    We won't be creating tutorial like this (at least not anytime soon) but if you write to me on Skype (I will give you my id as a PM) then I can send you a result scene script of my game. Maybe it will help :)

    Cheers!
    Piotr
     
  46. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    @devandart

    You can get current page index by doing this:
    Code (CSharp):
    1. var layout = MadLevelLayout.current as MadLevelGridLayout;
    2. int index = layout.currentPageIndex;
    To get the exact moment of change you will need to watch this value.

    How different are your icons? I think that modification to MLM that will allow to add different icon prefabs to different levels may not be so difficult, but I will need one or two week due to my backlog size. Is that OK?

    Cheers!
    Piotr
     
  47. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Thanks for your snippet to get changing pages (that's a nice way!).
    And sure, one or two weeks are totally okay to wait for that feature. :)
    Would be awesome!
     
  48. HideMax

    HideMax

    Joined:
    Jul 15, 2015
    Posts:
    2
    Hi!
    Thank you GREAT asset!

    I have a problem.
    After I build the Theme2Scene for iOS.
    Screen stretched like this.(See attached image below)
    How can I solve this problem?

    i'm using Unity 5.1.1 p4
     

    Attached Files:

  49. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hi!

    Oh this is a common iOS issue :) Please switch your textures import settings to Non Power of 2. (search for this option name of this page).

    If you will have any issues with it, please let me know!

    Cheers!
    Piotr

    @devandart Alright! I will get back to you when I will have it done :)
     
  50. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Nice, thanks! :)

    One thing,
    Code (csharp):
    1.  
    2. layout.currentPageIndex
    3.  
    doesn't exist also in the latest version of MLM. :)