Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.0 : game feel, Cinemachine, and more]

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

  1. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    138
    POSSIBLE BUG WITH RETRO ADVENTURE HEARTS (Lives) DISPLAY

    Platform: OSX (High Sierra / Mojave) + iPhoneX
    Unity3d: version is irrelevant but today it is 2018.3.2
    Corgi Engine: all versions since Retro Adventure was implemented - today it is 5.3

    Hello, first off let me say that 'yes' I know that bug reports should be sent via email. This has been done with no satisfactory result or solution - but Reuno was kind enough to do a test (whilst on vacation which shows product support dedication) that proved me wrong about the bug/issue at his end on iPhoneX. Yet the bug or issue has been persistent at my end since the Retro Adventure demos were implemented.

    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.

    What I am asking for:
    Someone with a Mac (or iPhoneX I suppose) other than Reuno, to create a clean/vanilla project using the Corgi Engine, do a build, and let me know if you see the Hearts (Lives) display properly in the build with the Retro Adventure demo. I have been testing on a 2013 MBP and a 2015 5k iMac. If testing on a Mac I would also be interested to know what resolution you are using.

    I have held off posting about this as I wanted to do a test on a totally wiped clean Mac and install of Mojave because I wanted to be sure that the issue wasn't caused by either Unity3d or dirty/old data for CE or anything else. I did test with a manual uninstall of Unity3d and deletion of all files pertaining to CE but the result was the same - hence the need for a test with a totally clean test environment.

    So, I have a wiped drive, brand new OS, and Unity3d is the only software installed, followed by installation of CE. Yet this issue persists. For what it's worth I have tested on multiple Macs with the same result.

    If anyone would be kind enough to do a test and let me know the result it would be greatly appreciated.
     
    reuno likes this.
  2. lsflet

    lsflet

    Joined:
    Aug 15, 2014
    Posts:
    6
    Hello, I just bought Corgi Engine and I am trying to import my character with spine animation.
    I added a box collider and use Agent to add script a character needed.
    When the character walk outside a platform, it fall and touch the lower level bound, but it have a bouncing when the character touch the lower bound, how can I solve it?
    And flip when change direction seems not work on spine animation object, do I need to override the current flip method or the engine should be able to handle it?
    Thx a lot.
     
  3. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    @lsflet

    About Level Bounds, If you want the level bounds to behave differently, take a look to your "Character Level Bounds" Abilty or simply just add to your character the "Character Level Bounds" Ability if not added. This ability allows you to customize what the player will do when colliding with a limit.

    About Spine2D, first of all I would recommend you to place it as a child of your Player/Character Object. About its facing direction, take a look to your "Character" Abilty where you'll find "Initial Facing Direction", "Direction On Spawn" and "Flip Model On Direction Change". You can tweak all the previous parameters to fit your game. Also notice that if you have set up the Spine2D model as a child, you should link it to the "Character Model" property on your "Character" Ability.

    More Documentation:
    All the documentation you need about Level Bounds (Level Manager): https://corgi-engine-docs.moremountains.com/managers.html
    All the documentation you need about Animations & Spine2D integration: https://corgi-engine-docs.moremountains.com/animations.html

    Hope it helps!
     
    Last edited: Jan 24, 2019
    reuno likes this.
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @lsflet > @AesopWorks pretty much said it all :) The "bounce" you mention in relation to level bounds might be the Death Force, it's something you can set on your Character's Health component. And you'll need to nest your model/animator for a spine flip to work. Check out the links mentioned in the post above.
     
  5. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hey there!

    Does the "DamageOnTouch.cs" work with Particle System colliders? If not, any idea on how should I approach this? Tried to use the "OnParticleCollision()" method without success.


    Thanks! :)
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @AesopWorks > I guess technically it could, but that seems like a bad idea performance-wise. Usually you'll want your particles to be the visible part but actually have a regular (invisible) collider do the actual damage.
     
    Pacaworks likes this.
  7. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Yey that usually works! (the invisible collider technique), but in my case I should have to animate the collider to fit the particle visual fx. Any recommendation is welcome ^^ but let me link a gif so you can watch my case:

    ezgif.com-optimize.gif

    @reuno as you said previously, in most of the cases I use the other technique!
     
    reuno likes this.
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @AesopWorks > I'd use a circle collider for that. I don't think you could easily add a script to particles, that's not native in Unity. What you could do is create a new class that hooks on OnParticleCollision, but that seems really overkill for something that simple (and again, not the best idea performance wise).
     
    Pacaworks likes this.
  9. lsflet

    lsflet

    Joined:
    Aug 15, 2014
    Posts:
    6
    @AesopWorks @reuno Thanks for help! I nested the object to Character Model parameter and set the Death Force in Health script to zero then both problem solved well.
     
    Pacaworks and reuno like this.
  10. gamekitteh

    gamekitteh

    Joined:
    Aug 24, 2018
    Posts:
    3
    I'm having a problem in that my character always spawns twice and then you attack and it hits yourself. I can't find out how to not have this happen. Like I'll put in a prefab character and assign it in the level manager, but pressing play makes it duplicate in the game and hierarchy. Both of them are controlled at once.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @gamekitteh > Please use the support email for questions like these, and please provide some details. Does the problem happen with any of the demo levels, no changes made? I guess not. If not, what have you changed? What version of the engine are you running, what version of Unity, how can I reproduce the problem, etc?
     
  12. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    Two quick questions:

    1
    Is there a way to make the speed of a bullet relative to the player speed?
    If I fire the bullet from a moving character (retrocopter) the bullet should go faster in the flying direction than fired stationary.

    2
    Is there a way to change direction for a playable character by pressing a button?
    ..I am using the retrocopter to fly in all directions, but I only want to shoot in one direction, only when a button is pressed, the copter should turn and shoot in the other direction.

    Thanks!
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @captnhanky > 1. You can extend the projectile class for that. It gets set an Owner by the ProjectileWeapon, and from the Owner you can get the Controller, and from there the speed, and thus modify your projectile's speed accordingly.
    2. Create a new ability to do that, that would act more or less as the Handle Weapon one, but wouldn't do the flip part, and optionally would parent weapons differently.
     
  14. RadTT

    RadTT

    Joined:
    Nov 9, 2016
    Posts:
    4
    Hi! Love the engine. Got a quick question about recommended best practices and roadmap with the AI brain.

    1. Due to Decisions being components, and the fact that the same decision might be added as a separate component multiple times, the more complex the brain gets, the harder it seems it's going to be to keep all the decisions straight. For example, you might have a brain state that uses AI Decision Time In State 2-4 seconds, and another state that uses 5-10 seconds, etc, and each of these Decisions are separate components when the min and max times need to be different. Do you have any suggestion on how to keep this organized in the inspector for complex AI brains?

    2. Are any significant improvements on the roadmap for the AI brain? I'm considering writing my own (or editing yours to better suit my needs) but was wondering if there are some changes coming soon that I should just hold out for. Some ideas would be...

    - add more possible conditions for transitions (instead of just true/false)
    - have scriptable objects for decisions and/or states
    - (or easiest) add field to give each decision a Label which would then be shown in the "Transition" data above or below "Decision" (so the Decision file might be AIDecisionTimeInState and below that is a new row Label: "Time In State 2-4 seconds" or whatever the user wants to call it to differentiate it in the component list.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @RadTT > There are already labels in the engine that allow you to differentiate between decisions and actions. I'm guessing you're running an older version. They look like that :

    upload_2019-1-25_12-26-35.png
     
  16. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Thank you!
     
  17. RadTT

    RadTT

    Joined:
    Nov 9, 2016
    Posts:
    4
    @reuno ah hah! I was on 5.2.

    Now that I'm updating, this reminds me of another thing I wanted to ask about. Given that the CharacterStates class uses enums, how would you recommend going about extending this to add custom states? My current solution was to update the class directly, which will of course get overwritten when I update and I'll have to track these updates separately. Any better solution?
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @RadTT > Unfortunately no, there isn't a better solution. In the current state of C#, enums can't be extended, and I haven't found a design pattern to substitute to this one that wouldn't turn things too complex unnecessarily. I'm open to suggestions, as this, and part of the InputManager, for the same reason, are the only parts of the engine that can't be easily extended, and I'd of course love to improve that. So modifying the base class and keeping track of your changes when updating using version control is the recommended way of doing things for now.
     
  19. RadTT

    RadTT

    Joined:
    Nov 9, 2016
    Posts:
    4
    @reuno thanks for the quick replies. If I can think of a good solution I'll throw it out there. For now, updating the class directly isn't too big of a deal, and it's good to know that this restriction is only found in a couple places across the engine. Thanks for the help!
     
    reuno likes this.
  20. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Hi,

    I think there is a bug with inventory management when used together with PickableWeapon. I would like the player to be able to pick up a weapon and use it right away, and show up in the Weapon Inventory. If I added both PickableWeapon and InventoryPickableItem, the weapon will be added to the inventory, but not equiped. If I tried to equip it through the inventory screen, it will try to swap itself by calling CharacterHandleWeapon.ChangeWeapon() and ended up destroying the its own gameobject.

    Any suggestion on how to get my desired behavior?

    Thanks, Allen
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @achan_unity > Please use the support email if you think you've found a bug.
    In this case, that's not a bug, that's just not how these classes work.
    The PickableWeapon is not meant to work with inventories, quite the opposite. It's to be used when you don't have one, and you just want your player to equip a weapon when colliding with the picker (think the flower power up in Mario).
    To get what you're after you'd just need a simple class that calls Equip once the object's been picked. Extending InventoryPickableItem for that would be the way to go.
     
  22. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
     
  23. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    26
    @Boom_Shaka @reuno - Thanks guys!
     
  24. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    I just pressed reset in the unity input manager.
    Now there is an error:
    ArgumentException: Input Axis Player1_Horizontal is not setup.
    ..but there is no player_1 in the settings.

    How can I restore the corgi settings?

    Thanks
     
    Last edited: Jan 27, 2019
  25. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    111
    hi @reuno I'm getting strange behaviour when using a 3d animated character with gravity fields/zones, I've replicated the same character settings from the rectangle player just however I seem to consistently get strange behaviour like these gifs but not when using sprite renderer based characters and wondering what can be causing this?



     
    Last edited: Jan 27, 2019
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @captnhanky > Make a fresh install of the engine, grab the settings from there. Or use version control and roll back to before you did that change.
    @Mcg > I'm not sure what's wrong here, but I'm pretty sure it has nothing to do with animation. You're probably missing another setting. I'd need more info to be able to replicate and help. Please use the support email for questions like this, thanks.
     
  27. Ryofougere

    Ryofougere

    Joined:
    Feb 14, 2016
    Posts:
    1
    HI !
    I just came here for a little question, and by searching the answer i didn't found it yet. Sorry as i am sure someone must had the same question.
    I am using your engine for our next prototype and i was wondering why it has 15 animations with one frame each for the jump animation.
    Is that the way you do to have an evolution in the animation depending on the lenght of the jumping time?
    As an animator, i felt a little bit surprised but in the same time if it is that, i am sure to be able to create a really nice jump feel.

    Thanks a lot for the answer, hope you understood my question

    best regards

    Rinaldo
     
  28. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    140
    Hi here, is there a feature about spring?:) I am making a spring for character bounce-jump...
     
  29. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    Is there a dedicated place for making suggestions for an upcoming version of the corgi engine?

    Thanks!
     
  30. lsflet

    lsflet

    Joined:
    Aug 15, 2014
    Posts:
    6
    Hi I am now trying an enemy attack AI with animation
    I am following
    https://corgi-engine-docs.moremountains.com/advanced-ai.html
    to create a Patrol->Attack AI for detecting and attacking player , which exactly the same logic with the example above.

    then I follow
    https://corgi-engine-docs.moremountains.com/weapons.html
    to create a melee weapon to make a attack of punch which integrating a 1.2 seconds length animation

    At the melee weapon script, I set the transition parameter of the attack animation to the Start Animation Parameter.
    Under Damage Area Timing, I set Initial Delay as 0.3 seconds and the Active Duration as 0.9 seconds to fit my animation.
    For the attack animation in animator, I already set the transition as Fixed Duration and no exit time.

    At runtime , there have two problems:
    1. The attack animation cannot be played completely, it just play about 0.3 seconds , but the damage area timing is triggered as my config correctly
    2. After attack once, it cannot keep attack/patrol as expected ( like the RetroSwordsman), it just return to Idle state.

    Thanks for the support and sorry for my poor english and simple questions.
     
    Last edited: Jan 28, 2019
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @Ryofougere > That's a blend tree (https://docs.unity3d.com/Manual/class-BlendTree.html).
    @Bagazi > I don't know what you mean exactly. There's a jumper class, if that's what you're after.
    @captnhanky > Yes, please use the support email for that.
    @lsflet > You probably need to setup your animator's transitions differently. All the engine does is update animator parameters. What you do with them is up to you (and just standard Unity at this point). If your animation doesn't play til the end, another transition is interrupting it. Make sure it doesn't happen. And if the brain works for the swordsman and not your character, then I'm guessing you're missing a decision, or something is setup differently. Comparing with the swordsman might help, as without any info it's impossible for anybody but you to guess what's wrong here. Please use the support email if the problem persists.
     
  32. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    I think what @Bagazi ask for Sonic like spring prefabs with sound, animation and all that stuff, not just the jumper on the demo.

    by the way, some posts before, I stated that my Jumper issues were solved replacing the box collider with a circle collider. Still having that random behaviour where Jumper script doesn't apply the set force some times. Can't find why yet.
     
    reuno likes this.
  33. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    9
    Hi reuno,

    I noticed that the AI Brain component shows you the current state of the AI. It would be great if we could have something similar for the character controller so we can monitor our character states.
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @Negrat > It already does for the controller :
    upload_2019-1-28_12-43-38.png

    And also for the Character (which is a different thing) :
    upload_2019-1-28_12-44-7.png
     
  35. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    9
    Thank you! I'm feeling so stupid right now :)

    I've tested it a bit and I've found out that there is no "attacking/fighting/shooting" state. I was wondering what is the reason for choosing this.

    What I'm trying to do is to make a melee combo like described below:

    A melee attack (and its animation) has two phases:
    - the character is in the idle state
    - 1st phase - the actual attack: the attack starts and ends when the hit its delivered
    - 2nd phase - the recovery: the character returns to the initial pose, the attack ends here.

    If the player presses the attack button during the 2nd phase, the character should go directly to a new attack.

    Hope it makes sense, english is my second language.
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @Negrat > It'd be a very bad design pattern to have a "attacking" state in a context where you can equip any number of weapons and use them all at once, while jumping/dashing/whatever. And you can not only attack, but also be waiting between attacks, reloading, etc. That's why it's much better to have that state on the weapon instead. That way you can be jumping and reloading weapon1 and preparing an attack on weapon2.
    And I don't see what's preventing you from setting up an attack like the one you describe right now. Don't hesitate to look at the documentation and examples of combo weapons included in the asset, that'll explain all there is to know about weapons and will give you more info on that subject.
     
  37. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    198

    Might I suggest how they deal with the enums problem in this architecture talk? It's actually quite elegant and you could do a lot of things that would make it more friendly for non-programmers. I've used this pattern a lot and eliminated most any enum that I expected to extend.

    The talk about enums is about 45 minutes into the video.

     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @ScourgeGames > That's a great pattern, and the one I use something quite similar at work and for my own stuff.
    Unfortunately, I tried that in the engine at some point and had to revert, people didn't understand it and it made things way too cryptic and hard to use for beginners.
     
  39. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    198
    That is a bummer. It is a really good pattern. But I completely understand wanting to keep it simple for beginners. The engine is really attractive to beginners (even though some pretty advanced stuff can be done with it), and making it harder to use is not such a great idea.


    I am enjoying the code you have written and have learned a lot just from seeing how you created so much. Advanced developers or even mid level coders can extend things quite easily.


    Good stuff.
     
    reuno likes this.
  40. zmatiaki

    zmatiaki

    Joined:
    Nov 21, 2018
    Posts:
    4
    Hey Guys,
    Thanks for the tips. I will look into it and get back to you!
     
  41. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Thank you Reuno for the help so far.

    Right now, I have the same Weapon used by both the Player and the Enemies - and I set the Target Layer Mask to cover both Player and Enemies. The issue with that is that Enemy can now hit other Enemy. I suspect I have to extend DamgeOnTouch class that was initiated by the Weapon to check for Friends vs Foes.. but is there a better way?

    Thanks,
    Allen
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @achan_unity > A much better and easier way would be to have two weapons, each with their own layer mask, even if they look the same and have the same properties otherwise.
     
  43. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Yeah, I know.. but I am hoping my game will have lots of weapons - and maintaining both version kind of tedious and make weapon drop difficult (as I have to remember to drop the right version). Your idea gives me a new idea though. I extended the MeleeWeapon class and added 3 new LayerMasks (Friends, Enemies, Common) and overrode the SetOwner() and CreateDamageArea() function to check the owner and set the TargetLayerMask accordingly. It works!
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
  45. Negrat

    Negrat

    Joined:
    Oct 1, 2013
    Posts:
    9
    Thank you reuno and sorry for the late reply! Job :(

    Could you give me a starting point for the melee setup? How would you approach this?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @Negrat > As I said, look at the combo weapon examples, they're already doing pretty much what you're after. You can also look at the weapons documentation, it details how to go with it.
     
  47. F1GHTOFFYRDMNS

    F1GHTOFFYRDMNS

    Joined:
    Mar 30, 2014
    Posts:
    4
    I'm have an issue with getting doors to work with keys and I'm not sure if there's something unrelated that I'm not seeing somewhere.

    I've been building on top of the Retro Clouds demo scene (duplicated it and swapping out assets, etc) and I'm trying to add doors now. After looking at the documentation and creating keys/doors in the same way that was in the documentation and in the tutorial video, my "Opening Zones" on my doors won't open with the key that has the appropriate Key ID. I've changed my key assets to target the RetroInventory that's already in the scene and the keys are showing up in my inventory when I pick them up. They just won't open any door that they're supposed to. When I turn off "Requires Key" on my Key Operated Zone, the doors open just fine.

    I've taken a look at the Minimal Keys demo scene and even copied and pasted those assets into my own scene (again, changing the target inventory to the actual inventory in the scene itself) and the door stops working. I've tried everything that I could think of. I even tried using the RetroYellowKey that's already in the scene to open a door that I made (changing the required Key ID for the door) and it still didn't work. I have a feeling there's something going on with the Key ID, I just can't seem to sort out what could be causing the doors to ignore the key with the ID that they're looking for?
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,028
    @F1GHTOFFYRDMNS > Does the problem happen in the key demo scene as well? No changes made? If not, it may be a good starting point. Without more info I don't know what could be the problem here. If that persists drop me a line on the support email, thanks.
     
  49. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    164
    is there any reason for the player character to jump and still be stuck in the animation when landing on a collider?
     
  50. Candy-Bomber

    Candy-Bomber

    Joined:
    May 21, 2015
    Posts:
    51
    Hey there. I could use a tip please. My character uses individual body parts instead of a sprite sheet so I'm having issues with the rectangle animator. Basically I have the default idle animation facing to the right but also an idle left animation for when the player faces the left. When I face right everything is okay, but when I turn left it constantly stutter flips back to the right. I would like the character to continue facing the direction the player moved him in though.

    What would you suggest? Thank you for your time.
     

    Attached Files: