Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v8.0 : advanced damage system]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @dannythareboss > Natively you could have X melee weapons, X hitscan weapons, and one projectile weapon in the mix. If you wanted to plug multiple projectile weapons together that'd require a light refactor. Don't hesitate to request that feature via the support form, I'll be happy to add it to an upcoming release.
     
  2. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    56
    Although I want to go back to the time before 2020 when there was no coronavirus but Sir i think its 2022 now...
     

    Attached Files:

  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  4. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Hello, I have a demo is working, but when I make a build and play, the game is stuck on Loading Scene. What can I do to have feedback about what happend? any recommendation? thank you!
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > You could look at your logs, which would likely have some errors telling you what your issue is.
    My guess would be you didn't add the scene you're trying to load to your build settings. Checking your logs will confirm that.
     
  6. EarlyDarkEntertainment

    EarlyDarkEntertainment

    Joined:
    Oct 8, 2018
    Posts:
    15
    hello when the character unlocks an ability, is it better to use the inventory to save it or a separate script?
     
    Last edited: Oct 11, 2022
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @EarlyDarkEntertainment > You could, it's really up to you. I'd recommend keeping things separated, and have the inventory store equipment / physical things, abilities and skills would probably belong to a different system.
     
  8. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Greetings, @reuno

    I really can't understand why it's happening with animation or character states, but when the character starts going down a small hill (slide, slight descent), his state switches to "jump down" for a moment, and if he starts going up, it switches to "jump up"((
    I tried to adjust the slopes in char settings with different ways; on and off stickness - nothing.
    Tried to change or delete ySpeed params in animation transition settings of Jump up and down - still nothing.
    And now I have no idea how to fix it.
    You can see that "blink" moment on the GIF. It's easy to reproduce if you'll "tap" on movement direction while the char is on the slope.
    I placed a polygon collider and if you'll move straight, char will "blink" right on the start point of the slope.
     

    Attached Files:

  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cunny-Lang > It's hard to tell what your issue may be from that gif, probably some wrong transition setup in your animator, although without knowing how you setup that character, it could be many things. If your issue persists, don't hesitate to use the support form and provide steps of how to reproduce your problem, in a fresh install of the engine, in any of the demos.
     
    KOPEW likes this.
  10. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    I just take RetroCorgi prefab as a core for Sausage and only change (swap to mine) idle & walk animations - that's really all(
    Ok, if I don't find a solution, I'll contact support!
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cunny-Lang > In that gif above it seemed like you did more changes than that (collider size, at least). I don't reproduce the issue with the stock RetroCorgi in 8.1. If your issue persists, again, don't hesitate to send repro steps and I'll be happy to have another look for you.
     
  12. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Aww, yeah, of course I change the collider size! Forgot about it, sorry!
    Cuz my sprites and animations much larger than default RetroCorgi)
    And I don't set X offset at all (it's on zero, as always), I read that in the doc)
    But everything is known in comparison! I didn't think that the size of the collider plays a role here, because in relation to the scene they're kinda same.
    Corgi Engine ver is 8.1 (the last one on that moment)

    To be honest, I experienced something similar about a years ago.
    It's worth creating a Polygonal collider and drawing a small line down (slope), as at the junction of that very point, the character always went to another state.
    I separate "Game" and "Animator" views, and when the character touch "slope point", Animator shows that states changes to "Jumps" depends on upper or down direction.

    I still trying to fix it

    And thank you very much for answers! You're the best, man!
    I can’t even remember that anyone gave such prompt and competent support regarding their products!
    I love you @reuno
    Please keep sticking to your line, man! You're the all-time best! <3
     
    Last edited: Oct 11, 2022
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cunny-Lang > Yes, drastically changing the size of your characters will have all sorts of impacts if you don't adjust your raycast settings accordingly (in this specific case, ray offsets, sticky raycast length, stick to slopes y offset, and a few more could have an impact. That's why it's recommended to stick to the original prefabs sizes if you plan on modifying them (in your case, zooming your camera in instead of making giant characters would be easier).
     
    KOPEW likes this.
  14. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Thank you, the scenes are added in the build settings. The game works on play mode, but nothing happends when the exe is created. Is stuck on loading window.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > Have you looked at your logs then? What do they say?
     
  16. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    I'm going to check the logs, first I have to figure out where those files are. Mean while, how corgi engine know which is the default scene. We are using starScreen component, this is the entry point for everything, it is correct?
     
  17. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    When I create the build, I only got some warning messages, this one of those:

    Unable to find player assembly: ...\My project\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll

    When I execute the exe build, I don't know where to look at logs, is still stuck on start screen.

    This is the build folder:



    Thank you for some help about that.
     
    Last edited: Oct 12, 2022
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > The engine doesn't "know" what the default scene is, Unity does. The engine handles gameplay (your controller, abilities, weapons, etc), it doesn't do scene management, that's native Unity. And the first scene you put at the top of your build settings will be the one that loads initially.
    As for your warnings, I don't know, TestRunner.dll isn't part of the engine, and your issue doesn't seem related to it at all at this point. Once again, I'd recommend looking at your logs, this was the 1st result in google for where to find them : https://docs.unity3d.com/Manual/LogFiles.html
     
  19. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    Hello, looking around in AI system I did not found any enemy using CharacterRun: is it implementable straightforward in AIBrain as Action? Because I'd need my enemy to run when detecting the player, but just calling RunStart() from my Action does not work so I'm wonderign if I should raise the speed of HorizontalMovement and call Running in Animator or simply rely on the run component.
     
  20. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    All right, thank you very much!
    I'll check as soon as I can)
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @luigi7 > Yes, it's straightforward, all you need is to call RunStart. See attached example.
     

    Attached Files:

    luigi7 likes this.
  22. KOPEW

    KOPEW

    Joined:
    Jul 30, 2019
    Posts:
    27
    Yo @reuno !
    I just solved this issue by simply increasing Sticky Raycast Lenght from 1 to 2 :D
    Before, I consistently increased the previous values in [Raycasting] trying different combos, but as it turned out it wasn't important)

    The thing is that I need a tall and thin collider, and there're no such demo characters(
     

    Attached Files:

  23. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60
    @reuno sorry for such a dumb question. But I can’t get the multiplayerlevelmanager to make the scene end and change scene. I’ve no errors I can’t see what I’m doing wrong. Fresh install 2019.4 something (latest LTS) and latest corgi 8. Thank you.
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Sofiel > It's hard to tell what your error is without knowing what you're doing. Could you explain what exactly it is you're trying to do, and how? Knowing your exact versions, of both the engine and Unity would help too.
     
  25. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60
    Thank you @reuno I’m trying to link the level to another scene once I kill the other players. But the multiplayerendgame doesn’t execute when the other players die and don’t disappear from the scene.
    Unity 2019.4.40f1
    Corgi engine 8.1
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Sofiel > Yes, I understood as much, but how exactly can your issue be reproduced, in a fresh install of the engine? Does it happen in a demo? If yes, where?
     
  27. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60
    Sorry. Yes. In the 4 player minimal demo. All other 3 players are dead but remain on the screen and there’s no transition to the next scene despite endgame conditions being met
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Sofiel > Characters are not setup to die in that demo, and there are no weapons or anything to apply damage, so I'm not sure what exactly you mean. If your issue persists, please provide detailed steps to reproduce your problem via the support form. You'll find examples of repro steps at https://corgi-engine-docs.moremountains.com/recipes.html
     
  29. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60

    Thanks. I had provided weapons to each player. I’ll start from 0 and if I get the same situation I’ll do it via support forum.
     
    reuno likes this.
  30. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60
    O asumed the conditions would apply by giving them guns and have them kill each other. Probably not completely configured. Thank you
     
  31. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    56
    Hi,How can not pause the game when the inventory is open?
    I want disable Pause function when i use inventory.
    I checked the relevant script, which seems to be mandatory. In InventoryInputManager, there is a code about Pause;
    "bool MoreMountains.InventoryEngine.InventoryInputManager._pause = false"
    Sorry, I'm not a programmer. Could you explain what it means?Thanks))
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @wechat_os_Qy0z_aF7Nfhquhava38GLxUWU > In the demos, the GameManager is in charge of pausing the game when it gets a InventoryOpens event (see its OnMMEvent method). You could override that method to remove that if needed.
     
  33. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    56
    Thank you very much. I will try to understand and modify this part of the code. This is my fourth attempt to contact them(Coding):)
     
    reuno likes this.
  34. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Hello, I have two questions:

    1. I want to know if there is a way to leave the MMDebugOnScreen Message for more time on screen, because is working but stay for a few time in screen.
    2. When I test the game on unity player lifes system works fine, I'm using RetroAdventureUICamera, I had finnished to look in to the forum and the answer is setting up everything like in that demo, but this is not an option for me, because I had changes in this control, so I want to know what happend with life system?, How many classes are involve on start up, because the life system is change when the game is build, and I can't figure out why. I had look into a few classes, LevelManager and GameManager. Does it, I'm missing something?, please @reuno point me in the right direction please.
    Thank you!
     
    Last edited: Oct 23, 2022
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > 1. MMDebugOnScreen outputs for the current frame only, by design. If you want a message to remain at all times, output it on Update (see the demo of the same name for examples)
    2. I don't understand your question, you'll have to be more specific. The "life system" is just an int counter in the GameManager, there isn't much to it. You'll find APIs to manipulate it, they're all commented, but basically it's adding/removing from a simple counter.
     
    xacarana likes this.
  36. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Thank you for your answer,I know the lives logic is really easy, and the game works on unity player, but in the build not. I'm printing Current Lives and MaximunLives, and start in 0 in the build. I don't know why, in GameManager is setting to 3 both values. so for that reason I was asking for the classes involve in start up to look is one class is changing that value during start up whe the game is build.

    This is the code to get lives value, and is zero, but only in build version.

    Code (CSharp):
    1. GameManager.Instance.CurrentLives
    Thank you!
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > Maybe you're initializing that value to something else. I'd recommend using Unity's debug tools to make sure that's not the case. If your issue persists, and you think it's related to the engine, try and reproduce it in a fresh install. If you reproduce it consistently there, send me steps to do so, I'll be happy to have a look.
     
    xacarana likes this.
  38. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Thank you, I'm going to reproduce the issue, but is the same that this question, I'm on windows PC.

    https://forum.unity.com/threads/rel...ed-damage-system.286289/page-102#post-4135351

    • The Problem:
      On the Retro Adventure demos the Lives (Hearts) will not display on either Mac desktop build or iPhoneX mobile build - regardless of resolution etc. They appear just fine when playing/testing in Unity3d itself though.

    Everything works fine in unity player on developer mode, but when the build is finished, I play the .exe file and the hearts disappears, I was doing some debuging and I found that Lives was Zero on start up. I was looking into my code and never I have to change this value, so for that reason the engine in some point during start up change this value.

    Thank you!
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > The engine will only do what you tell it to do. Maybe you've got an incorrectly setup game manager, maybe you have another component resetting your lives. If you can provide more info about what exactly you're doing, and how to repro your issue, it'll be easy to find out what the mistake is.
     
  40. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    This is my scene setup



    And the GameManager script, initial values



    I don't have additional classes that deal with lives, that is the issue.
     
  41. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    I have the solution, I create a new Script, then I added this to RetroAdventureInspector at the end, and reasign lives, that way, it works on build.

    Code (CSharp):
    1. public class TerminarJuego : MMGameEventListener,MMEventListener<CorgiEngineEvent>
    2. {
    3.     [SerializeField]
    4.     private TextMeshProUGUI test;
    5.     private string evento_actual;
    6.     // Start is called before the first frame update
    7.     void Start()
    8.     {
    9.        GameManager.Instance.AsignarVidas(3,3);
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update()
    14.     {
    15.         MMDebug.DebugOnScreen("Maximum Lives "+GameManager.Instance.MaximumLives);
    16.         MMDebug.DebugOnScreen("Current Lives "+GameManager.Instance.CurrentLives);
    17.         MMDebug.DebugOnScreen("Evento Actual "+evento_actual);
    18.     }
    19.  
    20.     public void Prueba(string msg){
    21.         test.text = msg;
    22.     }
    23.  
    24.     /// <summary>
    25.     /// When grabbing a level complete event, we call our LevelComplete method
    26.     /// </summary>
    27.     /// <param name="corgiEngineEvent">Corgi engine event.</param>
    28.     public virtual void OnMMEvent(CorgiEngineEvent corgiEngineEvent)
    29.     {
    30.         evento_actual = " "+corgiEngineEvent.EventType;
    31.  
    32.         switch (corgiEngineEvent.EventType)
    33.         {
    34.             case CorgiEngineEventTypes.GameOver:
    35.                 //GameManager.Instance.Pause (PauseMethods.NoPauseMenu);
    36.                 MMSceneLoadingManager.LoadScene("Game Over");
    37.                 break;
    38.         }
    39.     }
    40.  
    41.     protected override void OnEnable()
    42.     {
    43.         base.OnEnable();
    44.         this.MMEventStartListening<CorgiEngineEvent>();
    45.     }
    46.  
    47.     protected override void OnDisable()
    48.     {
    49.         base.OnDisable();
    50.         this.MMEventStopListening<CorgiEngineEvent>();
    51.     }
    52. }
    And in GameManager:

    Code (CSharp):
    1. public void AsignarVidas(int actuales, int totales){
    2.             CurrentLives = actuales;
    3.             MaximumLives = totales;
    4.             _initialCurrentLives = CurrentLives;
    5.             _initialMaximumLives = MaximumLives;
    6.         }
    I don't know why, but that way it works on build.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > Are you sure you don't have other scenes besides (and/or before) that "Nivel_1", where you have conflicting settings?
     
  43. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    @reuno the scenes before are instructions and home menu, nothing to do with lives. Also I have a new issue, on build, the pause option is not working, only works on unity developer payer. This is the line to pause the game, the status is paused, but the player continue moving.

    Code (CSharp):
    1. GameManager.Instance.Pause(PauseMethods.NoPauseMenu);
    With this new bug, maybe is somenthing related with Corgi player, but only on build, in unity player works fine, is a little bit tricky.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > Are you sure your scenes before don't have a GameManager, and don't instantiate one? That'd be the only explanation for your issue. A single scene, with the settings you mention, can't lead to that outcome, you can verify that in an atomic build with just a scene and your settings above. I just did to be sure, it works fine.

    As for your pause issue, likewise, I'd need repro steps. You can see the pause working in a fresh install, no changes made, in any build at https://corgi-engine.moremountains.com/#demo If your issues persist, please provide precise repro steps, thanks.
     
  45. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Ok, thank you for your help, I was thinking that maybe another Game manager was changing the initial value, because when I tested on Unity player, it wents straight to this particular level, so in the build somenthing else could change those values. I'm going to review...

    I'm really apreciate your comments and feedback.
     
  46. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    I know what happend, the scenes before, has a UICamera with a GUI Manager attached, and that was creating a conflict with level initial values, only with remove the scripts, works.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @xacarana > That was one lucky guess then :)
     
  48. dmauldin

    dmauldin

    Joined:
    Jan 18, 2017
    Posts:
    3
    In this example, I just want to run along some curves, but I get this "bumpy" movement. It applies to running along a flat surface and hitting a ramp, as well.

    This is with the PlayableCharacters/RectangleDynamicGravity prefab. The curve is created with BGCurve, which uses an EdgeCollider2D with 15 segments in this example. I've tried adjusting the number of segments and run into other minor issues like the player getting stuck at the last rotation from the edge collider while running up the wall (until a jump resets the rotation to be flat against the wall).

    My question is how to get rid of the micro-jumps when changing surfaces. Is there some way to just move the character "up" until they're on the ground again, instead of making a small jump to ensure they're not on the wrong side of the collision line? (at least I'm guessing that's why there's a little micro-jump when changing surfaces)

     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @dmauldin > That's simply not a shape the (very experimental) dynamic gravity is designed to handle. I wouldn't use it for something like this, where a dedicated ability that just sticks to that kind of curves would make more sense.
     
  50. dmauldin

    dmauldin

    Joined:
    Jan 18, 2017
    Posts:
    3
    @reuno > Can you suggest a path forward for this? Would I need to create an ability to stick the player to a surface?

    Also, thanks for the super quick response. :)