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. pry_bar

    pry_bar

    Joined:
    Mar 9, 2017
    Posts:
    8
    I want to configure a melee weapon but the editor does not show the damage area gizmo, the gizmo is only seen in playmode.
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @z_gangan > That's normal, that's how it works. And for the last time, please use the support email.
     
    pry_bar and ScourgeGames like this.
  3. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    14
    Hello,

    Has anyone had any issues with the animator repeatedly firing transitions from "Any State" to the targeted animation? For example, when I'm "idle" the transition should only fire once until I've moved but instead fires again and again, causing the animation to start over and "stutter". I've checked my settings all over and can find nothing that looks incorrect, but there has to be something. I'm not even sure if this is a Corgi related issue.
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jeffreyjene > Nothing to do with the engine, it's just standard Unity animator.
    You probably have something wrong setup on your transition (likely "Can Transition to Self" is checked - it shouldn't, but really it's just a wild guess without any info). Don't hesitate to read Unity's documentation about transitions to learn more about it. You can also compare with the examples provided with the engine for reference.
     
  5. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    14
    Ugh that's exactly what it was, can't believe I missed it. Thanks!
     
  6. jeffreyjene

    jeffreyjene

    Joined:
    Jul 9, 2018
    Posts:
    14
    As I work through the Corgi docs I was wondering if there is any way to eliminate the "slow-in" and "slow-out" of the character movements. Just a tiny pressure on the stick will cause a slow movement in the character that doesn't match the running animation I'm using. I want the raw data from the stick to set the motion to full right away. Is there any built in way to do this?
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jeffreyjene > That's coming to the next version as a simple checkbox. It's doable in the meantime, but I'd suggest waiting for it. If you don't want to wait, drop me a line on the support email and I'll explain how to do it.
     
    ScourgeGames and Pacaworks like this.
  8. borkbork

    borkbork

    Joined:
    Jul 5, 2014
    Posts:
    64
  9. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    Yeah,that is exactly what I ask for... Like springs in many 2d platform games, which can automatically eject the player by a given force:)
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Bagazi > Then as I said at the time, you should look at the Jumper class.
     
  11. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    Oh,I see:) And is there a demo about jumper? Cause animaiton ,effect should be handled in that case...
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Bagazi > Yes, you'll find jumpers in multiple places in the demos. FeaturesPlatforms, Mesa1, among others. It doesn't come with an animation, but you can easily extend the class to trigger one, it's a one liner.
     
  13. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hey! Just a quick question on your future plans! @reuno

    Are you planning on upgrading the current water to have dynamic edges or waves? Is there any kind of water update going on? I mean, the current water mechanic is magnifique, just wondering if there's any plan on dynamic water! :)


    Thanks for your attention!
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @AesopWorks > No plans for that so far, it's super low on the todo list right now (and a bit outside the scope of the engine in my opinion).
     
    Pacaworks likes this.
  15. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    97
    Since I can not get the support form working and I am not allowed to send private messages anymore I post my last support form email here:

    Hi!

    You just wrote me a PM that I should use email communication instead of a PM.
    So In case you did not read my last reply on PM I write it here also:

    Please add this behavior (proper respawn of enemies) to an upcoming version, because now it makes no sense.
    And please add a counter how often a respawn of an enemy should take place.

    I also have some suggestions for an upcoming version of the corgi engine:

    1. I did not find a function where the player is invulnerable for a period of time after respawn. (I have such aggressive enemies in my game that my player is immediately dead after respawn).

    2.The bullets of the player and the enemy should be faster when the player or enemy is moving (It makes no sense that a character can be faster than his own bullet)

    Accordng to the retrocopter:
    For me this character is the reason why I bought your engine in the first place. But it lacks basic abilities seen in classic helicopter games as choplifter and fort apocalypse for example:

    3. The retrocopter tilts when flying but it keeps shooting horizontal. That should be changed. The helicopter should be able to shoot at the same angle the helicopter is tilted while flying (ergo should be able to shoot in an angle while flying)

    4. The retrocopter should be able to turn only by button press. ..this means that the helicopter can shoot UP when flying backwards. Also the front of the retrocopter should be able to face the camera to shoot down 90 degrees (look at fort apocalypse for example, choplifter does a pseudo 3D shooting which also would be nice..but not necessary)

    5. The helicopter should not be allowed to move sideways while it is landed, only when it is in some distance in the air.



    Please look at classic helicopter games like choplifter or fort apocalypse for Commodore 64 to get a grip what I mean.

    Choplifter


    Fort Apocalypse


    These are some of the greatest classic retro games with a helicopter, you should know them anyway I guess.



    thanks
    Andy
     
    Last edited: Feb 6, 2019
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  17. lsflet

    lsflet

    Joined:
    Aug 15, 2014
    Posts:
    6
    Hi, I would like to know whether the enemy AI can use combo weapon e.g. multiple continuously melee attacks with different damage areas ?
    And whether two different type of weapon can use at same time? for example , a melee attack move which also release a projectile weapon.
    Thanks for help.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @lsflet > There's nothing preventing you to do that right now. It might require a few tweaks here and there, but overall should be quite straightforward.
    The AI can use combo weapons out of the box, you just need to setup the proper delays in your brain (no code required).
    As for the two weapons at once, you'll want to create a new action for that, targeting the Secondary Handle Weapon ability instead of the main one. Or you can have your AI change weapon the next frame, easier, but you'll have a one frame delay between both attacks. Negligible in most cases, but really depends on what you're after.
     
  19. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    Ok 2 problems.

    The one on the box is him animating as he is jumping onto the box (seems to be a collision glitch).
    2nd one is i can dash through colliders for some reason... Is there a certain way to deal with colliders?

    Also, is there a way to have the same health throughout all scenes?
     

    Attached Files:

    Last edited: Feb 7, 2019
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @o0neza0o > I'm not sure I understand the problem on both images, I'd need more details.
    If you think you've found a bug, I'm happy to take a look.
    Please use the support email, and provide more details, and steps to reproduce the issue in any of the demo scenes, thanks
     
  21. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    sent you the email.
     
  22. Bytewizards-SE

    Bytewizards-SE

    Joined:
    Aug 24, 2015
    Posts:
    14
    Finally back to working with this wonderful asset again but I do have a question:

    What would be the best way to extend CorgiEngine (without breaking functionality in case of a Corgi update) to be able to apply different types of damages like fire, acid or ice?
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Bytewizards-SE > Good question!

    So every time something gets damage, a MMDamageTakenEvent is fired, which contains info about what gets damage, by what, for how much damage, and how much health the damaged thing is at now, and how much it was at previously.

    So a good way of doing things without having to extend any class or break any functionality would be to create on your damageable objects a new component, that listens for this event, looks at what made the damage (maybe create new classes for that as well), and applies the desired effect based on that.
     
    pry_bar and Bytewizards-SE like this.
  24. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    Ok i fixed the animation glitch, it's cause i had dangling enabled. I am experiencing a new glitch as i'm using the Load Scene Mode called Additive. It keeps respawning the player, so i was wondering is there a way to have the level manager search for the correct player and spawn that player instead?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @o0neza0o > I'm not sure I understand what you mean. What correct player? Again, please use the support email for this kind of questions, thanks! And provide some more explanations, I don't know what you're referring to :)
     
  26. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    It's fine i think i should be fine. I'm rewriting the system so it's on me now xD
     
    reuno likes this.
  27. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    I'm looking at trying to save the health across the scenes by using the level manager and the progress manager. I think thats possible anyway.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @o0neza0o > You can use the SaveLoadManager class to do so.
     
  29. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    i still wouldn't know how to use it xD. I'm very basic when it comes to that lol
     
  30. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    Heya Reuno, I've been holding off updating to 5.3 because I saw there were a couple issues that you said you'd fixed in the next update. Any idea when that will be released?
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Meowx > I don't give ETAs, but reasonably, and hopefully, within a month :)
    If you really need a fix before that, drop me an email and I'll see what I can do. Some fixes are quite atomic and can be sent on their own, some have more impact on the code base and would be a mess to update without the whole thing.
     
    Meowx likes this.
  32. raingame_

    raingame_

    Joined:
    Jan 15, 2019
    Posts:
    28
    Hi, how can I freeze physics at some moments? I freeze all my animations by setting their TimeScale to 0, but I don't really get how I can to that with CorgiController. For Example when I call my Method "Freeze();" animation's timeScale is equal to 0, but I still can control my character. And also I need to save all the forces affecting on my character to bring them back after freezing process. I can't set Unity's TimeScale to 0, because I don't want everything (Ui, some animations) to be stopped.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @raingame_ > Setting the timescale to 0 would be the only way to do that right now.
    You can use unscaled time (https://docs.unity3d.com/ScriptReference/AnimatorUpdateMode.UnscaledTime.html) to have your UI and animations keep playing in the meantime, that's how it's usually done.

    Alternatively you could code a class that freezes the Controller (that's already in, called Freeze) and stores all its forces and context, then reapplies it, but timescale will be much more robust.
     
  34. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    11
    hey guys, noob question: how to detect a hold button for x seconds? for example I want the dash ability to start only if dash button is held for 0.5 sec.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Negrat > So it's not something that is built-in, but should be quite easy to implement.
    The first thing to do is to extend the CharacterDash ability into a new class, let's say CharacterDashCharged.
    In that new class, you'll want to extend HandleInput to have it work differently.
    HandleInput is called every frame, and as you may imagine, looks for input.
    In it you'll want to check if the button is pressed, and has been pressed before. The easiest way to do that is to keep track of a boolean and, over time, see if your button remains pressed. Let me know if you have trouble with that.
    In the meantime, here's an example of an ability that does the same thing (extend an ability to change how input works) that will be included in the next release :

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.Tools;
    4.  
    5. namespace MoreMountains.CorgiEngine
    6. {
    7.     /// Add this class to a Character and it'll be able to dive by pressing down, pounding the ground in the process.
    8.     /// This class is derived from CharacterDive and shows how you can very simply extend an ability to change how it detects input
    9.     /// Animator parameters : Diving (bool)
    10.     [AddComponentMenu("Corgi Engine/Character/Abilities/Character Simple Dive")]
    11.     public class CharacterSimpleDive : CharacterDive
    12.     {
    13.         /// <summary>
    14.         /// We override input detection to have it simply look at the down direction
    15.         /// </summary>
    16.         protected override void HandleInput()
    17.         {
    18.             if (_verticalInput < -_inputManager.Threshold.y)
    19.             {
    20.                 InitiateDive();
    21.             }
    22.         }
    23.     }
    24. }
     
    ScourgeGames likes this.
  36. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    11
    Thanks reuno, already implemented it using your advice :)
     
    reuno likes this.
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  38. mmntlh

    mmntlh

    Joined:
    Feb 2, 2019
    Posts:
    11
    Hello Guys! beginner question, how to make the character double jump using mobile button (just like the Minimal Level) i already have the jump ability and number of jumps are 2 and can anyone tell me what is Missing InputManager.Test,(what does it do??) its in the button pressed bindings for jump in the UIcamera.
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @mmntlh > There's nothing special regarding double jump on mobile, it works out of the box.
    You can ignore that missing warning, the ButtonPressed action isn't supposed to be bound to anything (you can select "no function for this one".
    To verify it works, you can do a fresh install of the asset, open the MinimalLevel demo scene, select the UICamera, set its Forced Mode to Mobile, press play, and tap twice (or move your mouse twice) over the A button, you'll jump twice.
     
  40. mmntlh

    mmntlh

    Joined:
    Feb 2, 2019
    Posts:
    11
    @reuno Thanks for the fire quick reply :).
     
  41. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Where exactly is the
    MMFlashEvent used in the Retro scenes?
    I am having trouble implementing it and can't find the working example.

    Thank you!
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kriyordev > That event is not used in the retro scenes.
    That said, it's quite straightforward to use, all you need is a MMFlash object somewhere, with an Image and Canvas Group components on it. Then make sure the Flash ID in your inspector matches the one in your code, and that's it.
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Good news everyone, I've just pushed v5.4 of the Corgi Engine to the Asset Store.
    As usual, it fixes all bugs known to date, makes quite a few improvements, and adds some long requested new features.
    Here are the complete release notes :

    - Adds the zipline, a new prop class allowing you to have your character grab a bar and ride along a path between two poles
    - Adds the CharacterSwap ability, which, along with the CharacterSwapManager, allows you to swap between multiple characters within a same scene
    - Adds the MinimalCharacterSwap demo scene, showcasing a setup where you can swap between 5 different characters, all living in the same scene
    - Adds a new decision, AIDecisionRandom, that randomly returns true or false based on the specified odds.
    - Adds "Instant Acceleration" option to CharacterHorizontalMovement, allowing raw-axis style movement, like in Megaman for example
    - Adds CharacterSimpleDive, an example of how you can easily extend an ability to change how it handles input
    - The RetroCopter now explodes on death, showing an example of how your character can completely disappear when dying
    - Improves input reversal for CharacterGravity, removing the need for input reversal colliders when dealing with both gravity points and zones
    - Adds support for auto respawn for AIBrain characters
    - Improves the stability of the controller when hitting corners
    - Adds an Input Threshold setting to CharacterHorizontalMovement to precisely control dead zone
    - Adds options on InventoryWeapon picks : nothing, auto equip, or auto equip if no weapon is currently equipped
    - Adds new methods on Character and CharacterAbilities to change a Character's linked input manager at runtime
    - Fixes a bug that could occur with characters equipped with the CharacterLadder ability but no CharacterHorizontalMovement ability
    - Fixes a bug that could happen when unequipping a weapon and would result in the weapon not being unequipped
    - Fixes a bug that could prevent jumping from a Grip when certain Jump conditions were selected
    - Fixes a bug that prevented the x part of the Death Force to be applied in the Health component
    - Prevents a bug that could cause a forbidden double jump to happen when jump was limited to one and two input happened in two consecutive frames
    - Fixes a bug that would cause the sprite renderer to not reinitialize properly when FlickerOnHit is disabled
    - Fixes a bug that resulted in glitches when pressing the push button, then running, then colliding with a controller pushable object
    - Fixes a bug that would not properly disconnect a character from a treadmill on death
    - Fixes a bug that would leave an InventoryDisplay in a weird state when dropping an object mid-move
    - Fixes a minor typo in inventory that could cause a target equipment inventory not to be found
    - Adds foldouts to MMTriggerAndCollision
    - Improves the way MovementForbidden resets the horizontal speed in CharacterHorizontalMovement
    - Prevents the CorgiController from trying to push static rigidbodies, avoiding useless warnings.
    - Updates Inventory Engine to v1.2
    - All Inventory Engine's Item methods must now return a bool, allowing for way more control over the result of a Use, Pick, Equip, Unequip, Drop operation, but this will force you to modify the signature of your methods if you've extended InventoryItem (just change void to bool and return true).
    - Renames CharacterAbility's _characterBasicMovement to _characterHorizontalMovement
    - Adds a missing namespace to the Colors helper
    - Removes outdated CreateNewPrefab helper
    (and @kriyordev, I've also added flashes to all retro scenes while I was at it)

    As usual you can expect a few days of delay before Unity validates the update, and note that it'll require 2018.3.4 to run. I hope you'll like this new version!
     
  44. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    Awesome news on the update reuno, thank you for your ongoing efforts. A little sad not to see a prejump/postjump implementation in this version, hopefully in the next one.

    Quick question, with the Mario-style ghost in the Retro AI demo, how would you go about making the ghost not colliding with the tilemap, if I were to keep the ghost in the enemies layer?
     
  45. Legionghost

    Legionghost

    Joined:
    Nov 30, 2018
    Posts:
    16
    Hi, first off thanks for the great engine.
    I'm having an issue and I can't figure it out. When using 3 CheckPoints (in the same scene) they work fine and I spawn on the first one when I build the game, but as soon as I add a 4th one, I start on the fourth one when I build the game. If I delete the 4th one I start on the first one again. I'm not sure what is going on, any ideas?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Grafos > I haven't forgotten about the prejump/postjump thing, it's still in the todo list.
    As for the ghost, you can define what each character considers a platform, a moving platform, a one way platform (the list goes on...) on their Corgi Controller inspector. So in this case it's as easy as selecting the Ghost prefab, setting its MovingPlatformMask value to Nothing, and now your ghost can fly through walls.

    @Legionghost > I don't know what could cause the problem, I'd need more info.
    The system supports an infinite number of checkpoints, and I'm not aware of any issue with it. Just tested it with Mesa1, added 3 more checkpoints, spaced out like below, and it works fine. If your problem persists, drop me an email with steps to reproduce in any of the demo levels, and I'll have another look.
    upload_2019-2-17_8-15-12.png
     
    Grafos likes this.
  47. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    Oh yeah, I completely forgot about this, thanks a mil!
     
    reuno likes this.
  48. Legionghost

    Legionghost

    Joined:
    Nov 30, 2018
    Posts:
    16
    I 'think' I found out why, if you move the second CheckPoint1 to the left of LevelStart you'll spawn at CheckPoint1 and not LevelStart when you build and run. You can see the checkpoint lines are not in order in the images below.
    In my scene CheckPoint1 & 2 are to the left but not CheckPoint3. Could this be why? When I move the CheckPoints to the correct order (left to right) I spawn where I should.

    m1.JPG m2.JPG
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Legionghost > That depends on how you've defined your checkpoint axis. You can set that on the level manager, and have your checkpoints ordered by x, y or z. Here it looks like it's by x, ascending. So it makes sense that if you put Checkpoint1 left to LevelStart it becomes the first one.
     
    Legionghost likes this.
  50. Nikul

    Nikul

    Joined:
    Jul 27, 2012
    Posts:
    11
    okay, have an issue, when pausing the game all looping sounds are set to mute per sound manager, when unpausing, all looping sounds remain muted?