Search Unity

Mad Level Manager - Level chooser and manager

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

  1. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello cryogee,
    That... is... a... lot...! :)

    I will add level generation tool in future releases ;-)

    Cheers!
    Piotr
     
  2. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    I have added 200 levels to my game. and that screen is shoing a delay when loading up.
    Is there a way to optimize it

    Tris=1.4k, Vert = 2.8 k
    Compared to other screens these numbers are very high :(
     
  3. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello cryogree,
    Do you mean that the FPS is low or long loading time?

    Cheers!
    Piotr
     
  4. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    take 8-10 secs to load the level screen
     
  5. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    OK, I will check that out and I will provide you a fix as soon as it is ready. I've must made a bottleneck somewhere...

    Cheers!
    Piotr
     
  6. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I was right, there was a mistake. Fixed now, will be released with 2.0.3 or 2.1.0. Please check your private messages box ;-)
     
  7. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    Slightly better. Do you know why for any reason the first time the level select screen loads it takes long time (5+ seconds) after that its back to 1.5-2 seconds which is livable.

    It leaves a bad first impression
     
  8. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    On what hardware are you testing your game? I will try to play with it on my old Android device.
    I'm not sure why on the second time loading a level select screen is faster. Maybe because some resources are already in the device memory.

    Anyway initializing a scene with 200 icons is quite a challenge, but I won't give up on this! I am thinking of creating something like late icon loading. This means that only the visible icons will be loaded at the startup, and the rest after the scene is first time rendered. It's not an easy task though, it will take me some time. Before that I will try to optimize 200-level scenario as best as I can. I recommend splitting your levels to groups by now as a workaround: http://madlevelmanager.madpixelmachine.com/doc/2.0.1/advanced/level_groups.html

    Cheers!
    Piotr
     
  9. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    OK, I've found very nasty bug in a version that I've send you before. Please upgrade to the version that I am sending you right now.

    Anyway this one changes things big time. I've changed basics of how grid layout is loaded. I believe this wouldn't break out anything, but you will never know ;-)

    Please let me know about the results. Unfortunately my Android device do not want to talk with my profiler :-(

    Cheers!
    Piotr
     
  10. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.0.2 is out!

    And because of that occasion I've created a big nice blog post about what has been changed in this version and what 2.1.0 (that will be released next week!) will introduce! :)


    I'm sorry for not copy pasting it here as I've usually been doing, but there's too much images formatting and I am a one big lazy creature...
     
  11. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    Hi

    I have decided to get rid of the level select screen as I want to be done with the first version of my game.

    Ill let you know the test results though once I get a chance to test it
     
  12. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    That's OK. Thank you for your feedback. I will make sure to optimize future versions even further. The late loading thing may be something that Mad Level Manager really needs at the moment.

    Cheers!
    Piotr
     
  13. genail

    genail

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

    If you ever thought of buying additional themes for Mad Level Manager, we just released theme pack with 3 themes in price of 2 ;-)

     
  14. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.1.0 is out!

    Finally it's here! New great features, well tested (and of course I've added a few bugs ;-)), under heavy development. Behold!


    How's about the future? I'm working on:
    - group level select screens
    - transitions
    - better animation support
    And many, many more!

    Cheers!
    Piotr
     
  15. GimpySpetsnaz

    GimpySpetsnaz

    Joined:
    Jun 28, 2013
    Posts:
    11
    Hi! I can't find the method for reloading the current level. How do I reload the current level?
     
  16. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello There,

    It's MadLevel.ReloadCurrent() ;-)

    Cheers!
    Piotr
     
  17. GimpySpetsnaz

    GimpySpetsnaz

    Joined:
    Jun 28, 2013
    Posts:
    11
    Thanks for the quick reply!

    I have followed your process for creating a level config file and a level select screen. My level select screen icons are not auto-unlocking as I progress through my game. Do you happen to have any ideas of what could cause this?

    Thanks again!
     
  18. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Please make sure that you're executing

    MadLevelProfile.SetCompleted(MadLevel.currentLevelName, true);

    In the level which should be set as completed.
    By default one level completion will unlock the next one.

    Cheers!
    Piotr
     
  19. GimpySpetsnaz

    GimpySpetsnaz

    Joined:
    Jun 28, 2013
    Posts:
    11
    Thanks so much, works like a charm!
     
  20. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    You're welcome! ;-)
     
  21. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    Hi

    I have released my game today Hoppi which uses this asset

    As I said I am not using the level select screen but still the level loading etc is done using this asset

    $Screen1iPad.jpg

    $Screen2.jpg

    $Screen3.jpg
     
  22. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello cryogee,
    Thank you for sharing! ;-)

    Can you provide a App Store/Google Play URL? I want to try it!

    Cheers!
    Piotr
     
  23. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
  24. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    for some reason I still have tons of drawcalls with the latest version... any tips?
    Edit: I fixed it by manually editing all the GUI depths, because when creating a button prefab in the configuration window, the GUI depth for all the elements like stars, lock icon, back icon are increased by a lot

    If you could just provide a quick fix in code for me, I would appreciate it :)
     
    Last edited: May 22, 2014
  25. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello johnnydj,

    I'm sorry, but I haven't received any forum notifications from past 2 days, so I missed your message :-(
    Please take a look here: http://madlevelmanager.madpixelmachine.com/doc/2.1.0/advanced/optimizing_performance.html

    Cheers!
    Piotr
     
  26. ButtReynolds

    ButtReynolds

    Joined:
    May 16, 2014
    Posts:
    5
    This may be a confusing question, but how would you recommend I set up arguments on the level select config to be parsed into multiple variables within the level?

    For example, in the levels I would like to set up an enemy struct "enemy(int, int, float, bool)" and a level struct like "level(int, float, bool)" based on the level arguments. I know how to write and read the arguements, but not how to turn the strings into different variables.
     
  27. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello ButtReynolds,

    I would write them like this:
    "1 2 3.0 false 4 5.0 true"

    So the first 4 values are for the enemy, and next 3 are for the level struct.

    then:
    Code (csharp):
    1.  
    2. string[] args = MadLevel.arguments.Split(' ');
    3. int i = 0;
    4. var enemy = new enemy(int.Parse(args[i++]), int.Parse(args[i++]), float.Parse(args[i++]), bool.Parse(args[i++]));
    5. var level = new enemy(int.Parse(args[i++]), float.Parse(args[i++]), bool.Parse(args[i++]));
    6.  
    Please let me know if that helps ;-)

    Cheers!
    Piotr
     
  28. ButtReynolds

    ButtReynolds

    Joined:
    May 16, 2014
    Posts:
    5
    Perfect, that works. Thank you!
     
  29. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    Hi,

    I`m trying to build to Windows Phone 8 but I`m getting this error. Could you please help me?

    Code (csharp):
    1.  
    2. Error building Player: Exception: Error: method `System.String System.Text.Encoding::GetString(System.Byte[])` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at MadLevelManager.MadLevelProfile/PropertyValue MadLevelManager.MadLevelProfile/PropertyValue::Read(System.String).
     
  30. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    I've just read that the version 2.0 fixed build erros for Windows Phone so I've just update my project to 2.1.1 . In order to update my unity project, I've deleted the MadLevel Manager folder and then I imported the newer version. But now I'm getting this error:

    Assets/Mad Level Manager/Scripts/Editor/Inspectors/MadLevelInputControlInspector.cs(37,5): error CS0246: The type or namespace name `MadLevelInputControl' could not be found. Are you missing a using directive or an assembly reference?
     
  31. renanss

    renanss

    Joined:
    Sep 10, 2012
    Posts:
    38
    Lol your script is looking for the MadLevel Inspector on the Examples folder. You should put this off the Example folder.

     
  32. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello renanns,
    Are you sure you've removed Mad Level Manager directory? The issue is related to importing it one over another (and I will fix that ASAP).
    I cannot reproduce it in the clear environment (empty project).

    I'm sorry for the trouble.

    Edit: Ohh I missed your last post! Oh my... I will move it to the Scripts folder. Before that the input controller was an example keyboard controller script ;-)

    Cheers!
    Piotr
     
    Last edited: May 29, 2014
  33. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.1.1 is out!

    The first bugfix release of 2.1.x line is out. All 2.1.0 users please upgrade! ;-)



    Cheers!
    Piotr
     
  34. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello, just bought it! Nice! ;-)
    I have stuck on the second level for a moment because of not understanding the rules. I made through randomly pressing all available possibilities.
    I own an iPad Retina. Please try to bump textures resolution and change compression method. You can see the gradient color space.

    Screenshots:
    https://www.dropbox.com/s/uj06mqpqmwryok8/2014-05-31 10.19.51.png
    https://www.dropbox.com/s/zkrauunl78lpgez/2014-05-31 10.19.58.png

    Keep up the good work! ;-)
    Piotr
     
  35. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I've seen that, but the problem is when I add a new level button from the Configurator, the GUI depths for each elements have some crazy values like 20-24-26 etc. so I have to go and manually change it to 1-2-3 for each sprite.

     
  36. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Whoa! That's should happen. I will check this today...

    Cheers!
    Piotr
     
  37. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I've just checked that out and I cannot reproduce the issue. Please check your icon template. Most probably it has the gui depth value set to these large values.

    Cheers!
    Piotr
     
  38. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    yes, in the prefab the GUI depths are correct. the thing is if I add more and more buttons, every time I add a new button, the GUI depths for the new buttons are bigger and bigger. right now my new buttons have GUI depth 33-35, so I go and manually edit them all :))
     
  39. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    What version of Mad Level Manager are you using? You can check the current version by clicking on Tools -> Mad Level Manager -> About in the main menu.

    Can I ask you to send me the screenshot of your layout object inspector? This is most probably a bug.
     
  40. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I'm using 2.1.0
    I don't think 2.1.1 has any updates regarding this thing.
    I wouldn't do a full update cause I have some stuff modified around (nothing related to GUI depth tho) :)
     
  41. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    I'll try to reproduce it. In order to do that I need to know how your inspector for your layout looks like ;-)
     
  42. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
  43. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    hey Genail.
    I would have a question if you could help me out.

    I have a separate PLAY button which loads the selected level from the FreeLayout. The thing is, the loading scene (extension) doesn't get called this way because I have no idea which function I should be calling to check for existing extensions, and if there is one set, load that first.

    Thanks!
     
    Last edited: Jun 8, 2014
  44. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello johnnydj,
    Do you mean that when you Play Unity from game level then the extension is loaded incorrectly? This is a known issue, and I will fix this very soon. If you want the fixed version earlier, please let me know.

    If you're talking about synchronization check, then you have to look for a class that is using InitializeOnLoadAttribute. If you cannot find it, I will send you its name by tomorrow. I am currently away from home.

    Cheers!
    Piotr
     
  45. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    hey thanks for your answer.
    I made a custom button that says PLAY.
    When I select a level from the map, I throw the selected level name in a variable, and when I click the PLAY button, that level is loaded. This is working.
    What I would also like to do, is have the loading scene to appear while loading the level :)

    I believe I should just call a method from somewhere that checks if there's an extension assigned. If there is, load the "LoadingScene".
    I'll wait until you get back home.

    Thanks :)
     
  46. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    OK so here's the thing:

    Your custom play button shouldn't break anything. Please locate MadLevelWatcher.cs and you will find there a callback using EditorApplication.playmodeStateChanged. I think that your play button will use the same callback under the hood, so there's nothing to worry about on your side.

    The extensions issue that you're experiencing is known to me. If you're playing the scene that has a loading scene setup at its extension, then the loading scene won't be played for a simple reason - the extension must be entered using MadLevel.LoadSomething(). If it is entered in a different manner (like playing directly the level) then Mad Level Manager is getting confused and in the result MadLevel.Continue() will load the current level second time (ouch!). I will fix that very soon. This issue exists only in the editor.

    If you want to configure your level to show the loading screen by force, you can write a following script:

    Code (CSharp):
    1.  
    2. private static reloaded = false;
    3.  
    4. private void Start() {
    5.     if (Application.isEditor && !reloaded) {
    6.         MadLevel.LoadLevelByName(MadLevel.currentLevelName);
    7.         reloaded = true;
    8.     }
    9. }
    10.  
    It will reload your level on start so the extension will be loaded, but this is only a workaround. Better method for testing extension is to enter it using level select screen.

    Cheers!
    Piotr
     
  47. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Mad Level Manager 2.1.2 is out!

    Today the new Mad Level Manager version has been released! This is the second bugfix release of 2.1.x product line.

    Bug Fixed
    • PlayMaker: Fixed compile errors in Unity 4.5
    • Background layer follow speed was invalid
    • API documentation: Fixed namespace
    Improvements
    • Free layout: GUI depth is preserved across all icons for better performance
    • Up/down buttons for scene ordering
    • Warnings when using icon instance as icon template instead of prefab
    • Improved MadLevel API

    Now it's time for 2.2.0 ;-) I want to introduce a lot easier icon setup, group select screens and level loading transitions!
     
  48. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    hey Genail.
    The info you provided me earlier is great and working well.

    What I would like to ask, in the GridLayout type, how could I modify the screen switch swipe sensitivity?
    when dragging from a page to another, I would like the screen to flip actually slower while dragging with the finger, because right now as I drag my finger on the screen, the page is switching faster.

    If you can just let me know the method or code line where I could tweak it.

    Thanks!
     
  49. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Hello Johnny,

    I'm not sure, but this may be what you're looking for:


    Cheers!
    Piotr
     
  50. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I saw that before, but that controls only after you release your finger.
    I would like to make the drag actually be slower while holding the finger and swiping the screen.
    In the editor is kind of ok, but on a phone, with just a little swipe it's almost instantly going to the next screen :)

    Also, if you drag to the last or first screen, and keep holding your finger or mouse button and drag, the screen will start jumping, trying to reposition until you release it.
    Can that be easily fixed somehow? :)
     
    Last edited: Jun 14, 2014