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

[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. Reactorcore

    Reactorcore

    Joined:
    May 19, 2011
    Posts:
    105
    Question:

    How would I make a character that can shoot a held weapon while climbing on a ladder?

    Would the best way to do this be to make an invisible character that only handles weapon and inventory stuff as a child gameobject of the actual player character that does all the rest, like movement, health and collisions?
     
  2. Reactorcore

    Reactorcore

    Joined:
    May 19, 2011
    Posts:
    105
    Another thing. I'm confused about is how do I replace animations in the Animation Controller / Animator.

    The documentation says this:

    "In most cases you’ll need an Animation Controller to setup your animations. The asset includes a bunch of these, I’d recommend using the RectangleAnimator one as a starting point for yours as it includes all animation parameters, so you won’t have to enter them all again. You can simply duplicate it, and then drag your animations into it, replacing the Rectangle ones as you go."

    So I followed the unity tutorial on how to make sprite animations, which was -
    1. Select player character
    2. Open animation window
    3. Drag animation frames from assets to animation window
    4. Name the animation clip as player_[action name]. When done, this creates an animation controller for the player character.
    5. Then keep adding more animation clips to populate the animation controller. this happens via animation window with the "create new clip" option.


    Ok. Makes sense for regular unity stuff. But in regards to Corgi Engine, I feel lost. How do I replace the existing animation of the RectangleAnimator without losing the existing parameters? What is the step by step process to do this correctly?

    What if my sprites are smaller size than the rectangle's sprites are?
    What if I have less frames than the rectangle does?
    How do I do the blendtree part in the RectangleAnimator? (like jumpAndFall)
     
    Last edited: Dec 20, 2019
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Reactorcore > You could certainly create an invisible character and all that, but that seems quite complicated, when you can just extend the shoot ability to have it allow shooting from ladders. That's a one line change basically :)
    And regarding the animation questions, I'm not sure I understand them. Frame count has no impact whatsoever. If your sprites are smaller you'll probably want to resize your collider. And I'm sure Unity has a blendtree documentation (yes, they do : https://docs.unity3d.com/Manual/class-BlendTree.html). Don't hesitate to read a bit more than one tutorial, animation in Unity can get quite complex. If you have more questions like that please use the support form, thanks.
     
  4. Zoo4125

    Zoo4125

    Joined:
    Oct 5, 2019
    Posts:
    9
    I'm having an error that has to do with the Standing on Variable being unassigned. When on a moving platform and attempting to jump the character will get stuck on the moving platform and not be able to move vertically any longer, he can however move horizontally. If I build the game the character gets stuck on any platform type not just moving ones. Any idea on how I might be able to fix this? The Link is an image of the character being stuck and the error
    https://prnt.sc/qdmq0f
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Zoo4125 > I'm not aware of any situation that could cause this, and without any context it's hard to guess what you could have done to do so. But please send me more info and repro steps via the support form and I'll be happy to have a look.
     
    Reactorcore likes this.
  6. Reactorcore

    Reactorcore

    Joined:
    May 19, 2011
    Posts:
    105
    Thanks, hearing that editing the shooting ability is easy gives me confidence to try it.

    I'll use the support form next time, got it. I'll just finish this topic here.

    About the animations, its just I'm overwhelmed and fearful of how to actually do it. It often feels like a blackbox, I have no idea what is automated and what isn't - both regarding Corgi and Unity - and what can be done with an editor tool and what requires scripting?

    My animation question was more about this:

    "ok so I want to make a brand new character, and the CE documentation tells me to copy the rectangle and replace the animations as I go, but my character's spritesheets are way smaller, have less frames and maybe the timing is different too when compared to the rectangle character.

    Do I need to tell Unity's Animator or Corgi Engine in some inspector field that my sprites are of X size and only have Y frames compared to the minimal rectangle character - so that it would work properly - or does it just work automatically somehow when I make the animation clip and slot it in there?

    Meanwhile in the "jumpAndFall" blendtree it has threshold values -13 and 5. Where did it get those? What if my jump is longer and slower than rectangle's? Does it matter? Will it just automatically update the values somehow when I tweak the character ability? The documentation didn't say anything about this."
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    There is a whole section of the documentation dedicated to the few specifics of the engine when it comes to animation. As explained there, all the engine does is send and update animation parameters (including the ones used by the blend tree to answer your question). The rest is just regular Unity, absolutely nothing else. Again, I’d recommend reading Unity’s documentation as it will answer all your questions. And again, please, use the support form for support questions, thanks!
     
    Reactorcore likes this.
  8. Reactorcore

    Reactorcore

    Joined:
    May 19, 2011
    Posts:
    105
    Thank you, this helps!
     
  9. yunusbbayram

    yunusbbayram

    Joined:
    Jan 10, 2017
    Posts:
    3
    Collect 130 coins to unlock the next level.
    Many games use this feature.
    This feature is not with a new demo scene.
    Maybe you could incorporate this feature into retro advanture.
    It would be very easy for you. But for us it is very difficult. I couldn't do that I tried too.
     
    Last edited: Dec 22, 2019
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @yunusbbayram > I can't implement all possible scenarios. You'll want to collect 130 coins (why 130?), others will want to collect 3 stars, others will want to kill X enemies, etc. That's why there's an API, and that's why it's documented. In this case all you have to do is store an int per level, which is actually exactly how it's done with stars. So technically you just have to replace a 3 with 130. I wouldn't say it's "very difficult". And if you've got trouble with that, don't hesitate to use the support form, I'll be happy to help you out.
     
  11. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    I use a similar idea for my project, player must collect a fixed amount of item in order to open new worlds. What I did is using the Score value to keep the amount of collected ones, and the doors to next worlds have a custom extension of ButtonActivated which read the score and open the way if the requirement are fulfilled.

    I used Score but you can use whatever value you like to store progress, or maybe taking coins or items from inventory... it's up to you.
     

    Attached Files:

    reuno and Boom_Shaka like this.
  12. yunusbbayram

    yunusbbayram

    Joined:
    Jan 10, 2017
    Posts:
    3
    I think I told you wrong.
    I didn't say it was necessarily 130. I gave an example. it doesn't matter what the number is. Ok thank you for your interest.
     
  13. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Forgive me for interjecting, but you're right: coding is very difficult. That's why we use a tool like Unity and an asset like Corgi Engine in the first place! That said, it does get easier and this is actually a good project to hone your coding skills.

    For starters, think about what you're trying to do and map it out. You did most of that already in your posts - you have a desired outcome and the conditions to reach that outcome. All you have to do is put it together in a step-by-step list. I'm old skool so I use pen/paper but use whatever works for you. Once you have that list, you'll know what game objects you need and which variables you'll have to track.

    Be sure to bookmark the API document as it will be your best friend. It has a reference to every class, every variable, every script in the engine. Use it to find out if the variables you need already exist and how/where to access them. It's also a good idea to review script comments.

    Ask Google. Most of the customization you'll want to do with the engine isn't specific to the engine but rather Unity itself. 99.9% of your questions will have already been asked and answered online. It just takes a little legwork to find them. Yes, there's a learning curve, but the more you learn about Unity the more you'll realize how much you can do with Corgi Engine. I came into Unity with some coding and game design experience but no knowledge of c# - after about 300 hours, I'm just getting to the point where I feel like I can produce a commercial quality release (I still consider myself a noob).

    Once you've done all your research, you'll be ready to write your code! Thanks to Corgi Engine, you can usually do it with just a few lines. If you get stumped, try the Discord server, it's pretty active. Just remember that everybody else has their own projects and real life to deal with, so try to be as specific as possible with your questions.

    Hope this helps. Good luck with your project(s)!
     
  14. Emphy

    Emphy

    Joined:
    Feb 7, 2014
    Posts:
    33
    I'm pondering about all the layers that are prefilled if you load the MinimalLevel scene. There are 'just' 31 layers but Corgi uses about 27 of them. Is there a good way to know which ones are really needed?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Emphy > There is a part of the Collisions section of the documentation that goes in details over each layer, and which ones are mandatory. And of course you can know what each one is used for by using your IDE's search features if that's not enough and you want more details.
     
  16. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    upload_2019-12-27_0-25-9.png
    When players glide through OneWayPlatforms, characters pass through OneWayPlatforms. In addition, if you finish sliding on both sides, the player will be bounced far away.
     
    Last edited: Dec 26, 2019
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @hippobob > If you think you've found a "BUG" (why the caps?), please use the support form to report it, and provide a bit of context and repro steps, ideally in any of the demo scenes, no changes made from a fresh install, to make sure you don't just have a setup issue somewhere, thanks.
     
  18. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    In addition, if you finish sliding on both sides, the player will be bounced far away.
     

    Attached Files:

  19. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    @o@
    You were quick to answer the question.!
    Sorry, my English is not good. This is translated by the translation software. Ha ha

    That's weird. I tried another scene. No problem. I haven't made any changes. I'm just learning.
     
  20. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    Scenes in the Retro folder are fine.
    Problems with the RetroAdventure3 scene in the RetroAdventure folder.

    Glide in from this Angle. If you release the space bar on the edge, it will bounce off!

    I didn't make any changes to the plugin! Really, I'm just learning! In addition, my English is poor, I will learn to report the mistakes with the form.

    upload_2019-12-27_0-45-27.png
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @hippobob > As I said, please use the support form to report bugs, not the forum, thank you.
    And again, I'll need context (what version of Unity you're using, what version of the engine, etc). It's all listed next to the form. Please do so and I'll be happy to have a look.
     
  22. KDB44

    KDB44

    Joined:
    Feb 12, 2017
    Posts:
    5
    @reuno - Hello.

    I have a question about respawning enemies. The auto respawn script doesn't account for the initial AI behavior/Animation States correct?
    Not a big deal just checking before I do my own solution.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @KDB44 > No, it doesn't, they're two separate systems.
     
  24. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    33
    Code (CSharp):
    1. void OnCollisionEnter(Collision collision)
    2.   {
    3.         if (collision.gameObject.tag == "Player")
    4.         {
    5.             Debug.Log("Happy New Year” +  collision.gameObject.Name);
    6.        }
    7. }
    Remember to attach to 2020 year gameObject!
     
    reuno likes this.
  25. Luremaster

    Luremaster

    Joined:
    Dec 17, 2016
    Posts:
    9
    Hi Reuno!!!

    I haven't checked Corgi Engine updates for a long time. Theres any build in solution for level mapping like in Castlevania 2D games where you press a button and a map is show with the player position?
    I'm not gona lie, i'm little lazy and didn't check all the new stuff. :D

    Keep doing this amazing work!!!

    Happy New Year!!!
     
    Last edited: Dec 31, 2019
  26. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    It doesn't yet but it must be on his ToDo list because it was requested quite a bit, aswell as Castlevania stairs like system.
     
    reuno likes this.
  27. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    @reuno Evening friend!

    I am attempting to make the new unity input system work with the corgi engine and wondering if there are plans to make this asset and the unity package work together?
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Kellyrayj > Sure, if/when it gets released out of preview one day and finally works as promised, then I'll definitely add support for it. Right now it's still a bit too unstable and unfinished to spend time on it.
     
    Kellyrayj likes this.
  29. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    I'm trying to create a character selector that carries multiple Characters over to the level by extending the game and level managers. However, I'm having issues getting it to recognize the new GameManagerExtended class instead of just the regular GameManager class. I'm probably missing something obvious, any suggestions?
     
    Last edited: Jan 5, 2020
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    You should probably check the dedicated section of the documentation, it explains exactly how to do that.
    In this case, as the errors in your console are probably telling you, you're trying to call methods on a class that doesn't have them. You'll want to cast your manager as a GameManagerExtended.

    As explained in the documentation, it's done like this :
    (NewGameManager.Instance as NewGameManager).Hello();
     
    Boom_Shaka and Meowx like this.
  31. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    33
    Hi,

    Here is what I'm using for my game. Based on AIActionPatrol. Hope it serves as a point from which to start.



    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using MoreMountains.Tools;
    5.  
    6. namespace MoreMountains.CorgiEngine
    7. {
    8.     /// <summary>
    9.     /// Inherits from AIActionPatrol but also detects walls and holes and allows character to crawl them
    10.     /// </summary>
    11.     public class AIActionPatrolCrawl : AIActionPatrol
    12.     {
    13.         /// <summary>
    14.         /// BoundsMethods determine whether the bounds will be defined based on the starting position of the Character, or the position it was at when entering the state
    15.         /// </summary>
    16.  
    17.         // Force initial base rotation
    18.         private string currentBaseRotation = "up";
    19.  
    20.         // When movement is reserve, we need to move hole detection to othe side
    21.         private Vector3 HoleDetectionOffsetReverse;
    22.  
    23.         /// <summary>
    24.         /// On init we create a hole detection for reverse movement (down and right directions)
    25.         /// </summary>
    26.         protected override void Initialization()
    27.         {
    28.             base.Initialization();
    29.             HoleDetectionOffsetReverse = new Vector3(-1 , 1, 0);
    30.         }
    31.  
    32.         void Update()
    33.         {
    34.             CheckForWall();
    35.         }
    36.  
    37.         /// <summary>
    38.         /// Checks for a wall, if found rotate character and update base rotation
    39.         /// </summary>
    40.         protected void CheckForWall()
    41.         {
    42.             if (!ChangeDirectionOnWall)
    43.             {
    44.                 if (_controller.State.IsCollidingLeft)
    45.                 {
    46.                     transform.RotateAround(transform.position, Vector3.forward, -90);
    47.                  
    48.                     if (currentBaseRotation == "up")
    49.                     {
    50.                         currentBaseRotation = "right";
    51.                     }
    52.                     else if (currentBaseRotation == "right")
    53.                     {
    54.                         currentBaseRotation = "down";
    55.                     }
    56.                     else if (currentBaseRotation == "down")
    57.                     {
    58.                         currentBaseRotation = "left";
    59.                     }
    60.                     else
    61.                     {
    62.                         currentBaseRotation = "up";
    63.                     }
    64.                 }
    65.  
    66.                 if (_controller.State.IsCollidingRight)
    67.                 {
    68.                     transform.RotateAround(transform.position, Vector3.forward, 90);
    69.                  
    70.                     if (currentBaseRotation == "up")
    71.                     {
    72.                         currentBaseRotation = "left";
    73.                     }
    74.                     else if (currentBaseRotation == "left")
    75.                     {
    76.                         currentBaseRotation = "down";
    77.                     }
    78.                     else if (currentBaseRotation == "down")
    79.                     {
    80.                         currentBaseRotation = "right";
    81.                     }
    82.                     else
    83.                     {
    84.                         currentBaseRotation = "up";
    85.                     }
    86.                 }              
    87.             }
    88.         }
    89.  
    90.         /// <summary>
    91.         /// Checks for a hole, if found, calls function to rotate character, update base rotation and move position one tile
    92.         /// </summary>
    93.         protected override void CheckForHoles()
    94.         {
    95.  
    96.             if (currentBaseRotation == "up")
    97.             {
    98.                 if (_character.IsFacingRight)
    99.                 {
    100.                     HoleRotator(HoleDetectionOffset, -90, 1, -1, "right");
    101.                 }
    102.                 else
    103.                 {
    104.                     HoleRotator(HoleDetectionOffset, 90, -1, -1, "left");
    105.                 }
    106.             }
    107.          
    108.             if (currentBaseRotation == "left")
    109.             {
    110.  
    111.                 if (_character.IsFacingRight)
    112.                 {
    113.                     HoleRotator(HoleDetectionOffsetReverse, -90, 1, 1, "up");
    114.                 }
    115.                 else
    116.                 {
    117.                     HoleRotator(HoleDetectionOffset, 90, 1, -1, "down");
    118.                 }              
    119.             }
    120.  
    121.             if (currentBaseRotation == "down")
    122.             {
    123.  
    124.                 if (_character.IsFacingRight)
    125.                 {
    126.                     HoleRotator(HoleDetectionOffsetReverse, -90, -1, 1, "left");
    127.                 }
    128.                 else
    129.                 {
    130.                     HoleRotator(HoleDetectionOffsetReverse, 90, 1, 1, "right");
    131.                 }
    132.             }
    133.  
    134.             if (currentBaseRotation == "right")
    135.             {
    136.  
    137.                 if (_character.IsFacingRight)
    138.                 {
    139.                     HoleRotator(HoleDetectionOffset, -90, -1, -1, "down");
    140.                 }
    141.                 else
    142.                 {
    143.                     HoleRotator(HoleDetectionOffsetReverse, 90, -1, 1, "up");
    144.                 }
    145.             }
    146.         }
    147.  
    148.         protected void HoleRotator(Vector3 HoleDetection, float turn, float x, float y, string RotationDirection)
    149.         {
    150.          
    151.             // prevents more than one execution, if base rotation is correct, exits function
    152.          
    153.             if (currentBaseRotation == RotationDirection)
    154.             {
    155.                 return;
    156.             }
    157.          
    158.  
    159.             // we send a raycast at the extremity of the character in the direction it's facing, and modified by the offset you can set in the inspector.
    160.             Vector2 raycastOrigin = new Vector2(transform.position.x + _direction.x * (HoleDetection.x + Mathf.Abs(GetComponent<BoxCollider2D>().bounds.size.x) / 2), transform.position.y + HoleDetection.y - (transform.localScale.y / 2));
    161.             RaycastHit2D raycast = MMDebug.RayCast(raycastOrigin, -transform.up, HoleDetectionRaycastLength, _controller.PlatformMask | _controller.MovingPlatformMask | _controller.OneWayPlatformMask | _controller.MovingOneWayPlatformMask, Color.red, true);
    162.  
    163.             // if the raycast doesn't hit anything
    164.             if (!raycast)
    165.             {
    166.                 // we rotate character
    167.                 transform.RotateAround(transform.position, Vector3.forward, turn);
    168.  
    169.                 // set new position one tile more
    170.                 transform.position = new Vector2 (transform.position.x + x, transform.position. y + y);
    171.  
    172.                 // update base rotation of the character
    173.                 currentBaseRotation = RotationDirection;
    174.             }
    175.  
    176.         }
    177.  
    178.     }
    179. }
    180.  
    Note: It's not designed for all games. BoxCollider2D must have the same size of the sprite, for example.
     
  32. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    It looks like right now, the character switch script never actually returns to the initially instantiated character.

    In the MinimalCharacterSwap scene, the LevelManager instantiates the Rectangle player character, but when you start switching through characters, it never goes back to that initial character - just a duplicate created by CharacterSwitchManager (CharacterSwitch_0). IE any damage etc applied to that first character is no longer relevant since it never gets switched back to.



    Is this intended behaviour?
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Meowx > CharacterSwitch and CharacterSwap are two different things, I'm not sure what you mean. MinimalCharacterSwap doesn't switch characters or create duplicates, it swaps control over different characters.
    CharacterSwitch completely replaces a prefab by another, it's not supposed to carry over damage.
    And in general if you think you've found a bug, please use the support form to report it, and provide exact repro steps, I'll be happy to have a look.
     
  34. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    Oops! Sorry, I mean the MinimalCharacterSwitch scene.

    Correct; while the CharacterSwitch function changes prefabs completely, it never switches back to the prefab initially instantiated by the level manager. So in the case of your demo scene, when running, there are two completely different instances of the "Rectangle" player character prefab - one labeled "Rectangle" and one labeled "CharacterSwitch_0".

    The code is functioning just fine, I was more wondering if never being able to switch back to the original character was your intention with the function.
     
    Last edited: Jan 5, 2020
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    Yes, that's what the class is designed to do.
     
  36. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Running into a strange bug! When I restart the scene, the input manager seems to get lost and I get this error:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MoreMountains.CorgiEngine.CharacterJump.HandleInput () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterJump.cs:178)
    3. MoreMountains.CorgiEngine.CharacterAbility.InternalHandleInput () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterAbility.cs:126)
    4. MoreMountains.CorgiEngine.CharacterAbility.EarlyProcessAbility () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterAbility.cs:151)
    5. MoreMountains.CorgiEngine.Character.EarlyProcessAbilities () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:330)
    6. MoreMountains.CorgiEngine.Character.EveryFrame () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:294)
    7. MoreMountains.CorgiEngine.Character.Update () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:283)

    Everything works normally and as it should when I switch to a new scene. This only occurs when I use the MMSceneRestart.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Kellyrayj > Please use the support form and provide exact repro steps to your issue, without knowing what you're doing exactly, and what you changed, it's quite hard to help :)
     
  38. gamesbyangelina

    gamesbyangelina

    Joined:
    Jun 23, 2013
    Posts:
    20
    Hey Reuno!

    I bought Corgi a while ago to experiment with smaller platformer stuff. However, today I'm considering porting a procedural game to it. Before I get really deep into it, I wondered if you could let me know:

    1. If I want to generate level geometry at runtime, is there anything that will confuse Corgi? I assume if everything uses Collider2Ds, the system should be fine and play nicely?
    2. If I want to generate level geometry continuously, i.e. have a level that dynamically grows or a level bounds that scales up, is there anything in Corgi that will start to get unhappy? The demo levels are relatively small (which makes sense, they're demos!) but I'm wondering how big stuff can get before Corgi kind of wants you to break it up into two smaller levels.

    Thanks for making such a great asset.

    Mike
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @gamesbyangelina > You can absolutely generate level geometry at runtime.
    And the engine itself doesn't have issues with large levels. Most of the issues you'll have are Unity ones (performance, floating point errors, that sort of things), but nothing I can think of on the engine's side.
     
  40. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    Another question about the CharacterSwitch function - right now, prefabs maintain their direction and velocity when airborne/dashing. This can lead to some really jarring switches where you're suddenly getting shot off in a different direction when you switch, and will sometimes cause the state machine to break if you swap while dashing.

    Would it be difficult to transfer the prefab's facing direction and velocity over to the switch prefab like the position and state is transferred?

    (To see what I'm talking about in action, press the "switch" key while dashing back and forth in the air in the MinimalCharacterSwitch scene.)
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Meowx > No, it wouldn't be difficult, you can implement that in one line (getting the current velocity, applying it to the new prefab on switch. That's one line if all goes well. You'll see examples of that being done at different places in the engine, getting in and out of gravity zones for example.
     
    Meowx likes this.
  42. wayloon

    wayloon

    Joined:
    Oct 2, 2015
    Posts:
    8
    @reuno ,How to implement glide in mobile mode and jump and glide share a key?
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @wayloon > As explained in the documentation, you just have to bind a button to that specific action. Either another one, or the same one as jump. One button can have more than one action bound to it, no problem.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    Good news, I've just pushed v6.2 of the Corgi Engine to the Asset Store.
    As usual, this new version fixes all reported bugs to date, and comes with a pack of new features, the biggest ones (and the most requested) being Castlevania-like stairs, as well as a Room system also seen in Castlevania, or Hollow Knight, or Super Metroid (etc, etc).

    Here are the full release notes, I hope you'll like this new version (and as usual expect a few days of delay until Unity validates it) :

    - Adds support for stairs (like in Castlevania for example), one-way slopes that the user can decide to go up or down on, or ignore and keep moving forward
    - Adds the CharacterStairs ability that lets Characters handle the stairways mentioned above
    - Adds MinimalStairs, a minimal level showcasing how to setup stairs
    - Adds the CharacterSpeed ability, letting you set specific speed multipliers for each movement state
    - Adds the Rooms system, which lets you cut your level into isolated sections, each with their own contained camera, and link them together via doors/teleporters/portals/etc, letting you create the same kind of navigation seen in Super Metroid or Hollow Knight for example
    - Adds the RetroVania demo scene to showcase that Rooms system
    - Improves SurfaceModifiers' force application method
    - Renames Singletons into MMSingletons to avoid conflicts with other assets that wouldn't properly namespace classes
    - Adds more options to the SaveLoadManager, including json and encryption support
    - Adds an option to not instantiate characters when a scene starts but rather have them already in the scene before play
    - AIActionChangeWeapon can now also be used to unequip the currently equipped weapon
    - Adds support for multiple AmmoDisplays
    - Adds an option to CharacterMovement that lets you define the duration (in seconds) during which the character has to be airborne before a feedback can be played when touching the ground
    - Adds default bindings for xbox dpad for all 4 player input settings
    - Adds an option to CharacterCrouch to prevent crouching while in movement
    - Fixes the scale of the Mesa2 Heavy Corgi
    - Fixes a jump that could lead to jumps on moving platforms not happening correctly when pressing down + jump
    - Fixes a bug that could prevent grounded only ButtonActivatedZones from being activated when entering them via the air
    - Fixes the size of the HeavyCorgi in Mountains
    - Fixes a bug that could result in a wrong state reset after a dash done airborne and parallel to a surface close to the feet of the player character following a jump
    - Jumps done during the jump time window now trigger the grounded jump feedback instead of the air jump feedback
    - Fixes the crouch resize settings on a few playable character prefabs
    - Fixes some improperly setup one way platform colliders
    - Fixes a bug in the RetroCorgi's animator that prevented sword animations to play while in the air
    - Removes an outdated line in OneWayLevelManager that could cause errors to pop up with certain settings
    - Adds comments to the Bomb class.
     
    mbosoftgame, ILJI, Quinn221 and 5 others like this.
  45. christophercasey2

    christophercasey2

    Joined:
    Jan 28, 2019
    Posts:
    1

    Change your sorting layer to player and you can remove the sprite renderer for the corgi if you want it gone maybe?
     
  46. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    33
    Thanks for the update @reuno.

    Amazing as always.
     
    reuno likes this.
  47. xpachin

    xpachin

    Joined:
    Feb 6, 2014
    Posts:
    62
    Nice, do you have a video to show the ROM system?
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
  49. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Nice update, Rooms system looks pretty cool, gotta give it a try!
     
    reuno likes this.
  50. xpachin

    xpachin

    Joined:
    Feb 6, 2014
    Posts:
    62
    hey reuno, i was playing with the demo retro roms on the website, and it' s an excelente work, but the transitions looks a little "off", i mean when you enter a door, the camera moves to the other scene, but you can still see it and then it suddenly disaapears , perhaps with a transition will it look better? fade in or fade out or something like that? just to hide the camera movement..
    amazing work!!