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

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Ohh ok then, i will try to find what to do, thanks a lot for your answer.

    Best regards =D
     
  2. clammy2017

    clammy2017

    Joined:
    Feb 21, 2018
    Posts:
    27
    Hi

    I was looking at your engine, and it seemed all very positive. But trying out the demo on your website, and it's littered with issues.

    I can "wall jump" from corners, and in the "demo that started it all", I can jump through some of the thin platforms at an angle (on the left of the world), and there are quite a few other "physics" issues where it doesn't "feel" right playing it.

    Have these been improved since the demo? Or would I need to go into code and fix these issues myself (and indeed, can I do that?)
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @clammy2017 > I'm not sure what you mean by "wall jump from corners". And the thin platforms are one way platforms, so yes, you can jump through them, it's by design. Some people actually want that. Nothing to fix or improve here :) Feel free to contact me via the support email if you want to know more about it.

    Edit : as for modifying or extending stuff, yes, that's actually what the engine is built for. I'd suggest looking at the documentation to learn more about all that. Whether or not you can do it depends on your skills, it's hard to answer such a question.
     
  4. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    Hi all,

    Did anyone successfully rotate a 3D character instead of flipping?
    I haven't downloaded the latest corgi installment yet so I am not sure if this is covered
    Consider this as a pro-active/pre-active question.

    I remember trying this in earlier versions which is okay, but the weapon attachments gave issues.
    Again. I plan to start a new project this weekend so I kinda would dive in prepared.

    Cheers for the insight
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @zero_equals_zero > I'd suggest differentiating the logic (or the logical parts of your character) from the visuals.
    As long as you're only rotating visual elements you won't get in trouble. If you start rotating parts used by the controllers, things are bound to get weird if you're not careful. It's really a general advice, nothing specific to the engine really :)
     
  6. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    Cheers @reuno I know what to do then :) all the best!
     
    reuno likes this.
  7. Fabioisriva

    Fabioisriva

    Joined:
    Feb 3, 2016
    Posts:
    15
    hii i notice something,while the character is walking and suddenlly the game enter the pause mode or inventory,the SFX of footsteps keep playing,is this by designs? or i did miss something?
     
  8. Levrault

    Levrault

    Joined:
    Jan 22, 2018
    Posts:
    29
    Hi, I think I notice a bug with simple ladder and the character's jump ability.

    Here I make it happen
    • I open the demo scene "mesa1" from corgi2d demo
    • I set my character to be able to jump only once and to jump from the ground (see screenshot)
    • I put my character under the ladder and make him jump
    • While jumping, I press the "w" key to make him climb the ladder
    • Event if the character is not on the ground, he's still able to jump
    If I make the character directly climb the ladder without make him jump, he will not be able to jump from the ladder.
     

    Attached Files:

  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Fabioisriva, @Levrault > Please send these with more details (version number, etc) on the support email, otherwise it's very hard to track and fix. Thanks!
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Levrault > Thanks for the details, I've sent you an email with a fix, let me know if there's any problem with it.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Fabioisriva > I've managed to reproduce and fix the problem. I'll include the fix in the next release. Hit me up on the support email if you want the fix earlier.
     
    Fabioisriva likes this.
  12. Fabioisriva

    Fabioisriva

    Joined:
    Feb 3, 2016
    Posts:
    15
    hii thx for the swift response will send you an email ASAP..!
     
    reuno likes this.
  13. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @reuno I was wondering what your suggestion would be for using CharacterDash on an AI. StartDash is controlled by the input manager and obviously an AI isn't using the input manager and I can't access the protected Dash coroutine without changing it from a protected to a public method, I wondered if you may have already figured out a solution to this.

    For now I've simply made a copy of the CharacterDash script and removed the if statement that checks the input manager to see if the player is pressing down or not. If there's a better way than this, lemme know. If not, maybe there could be an AI bool or something that get's rid of the input manager check in a future build?
     
    Last edited: Feb 23, 2018
  14. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    As I was reading this forum with the suggestions as a highlight, I thought of something
    Aka my sincere apologies for throwing yet another suggestion, the list must be huge :)

    Would it be possible to have wall climbing mechanics, like for example: ori and the blind forest?
    Hugging a wall and using a dedicated key (From what I remember it's the RT key),
    the character is able to walk/climb and cling to the wall, instead of jumping / hopping.
    Hard to find a gif from this, but this one seem to show a few climbing parts.
    https://i.imgur.com/FKT3fQh.gifv
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @NAiLz > The solution would be to make that StartDash public. I can change that for the next release if you want.
    @zero_equals_zero > It's already been suggested (at this point it's hard to find ideas that haven't been suggested), I can push it up a little :)
     
  16. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    I can try it!! Make a character behave like in the game Gex (the old 2d game). that character walk in walls, roofs and even "bend" in corners. I haven't seen anything like that in modern games.
     
  17. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @zero_equals_zero if you take a look at the ladder climbing script I bet you could modify it pretty easily to require holding a button through input manager to accomplish what you're talking about.
     
  18. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @reuno That would be awesome if it's not too much trouble and won't cause any problems.
     
  19. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    Hello,
    i was wondering if there is a sword as weapon that i can use?
    If not how can i add a sword?

    Maybe i can use the handle-weapon script with a very low shooting range?
     
  20. Fortitude3D

    Fortitude3D

    Joined:
    Sep 7, 2017
    Posts:
    155
    ahh thats a cute corgi, goodwork! :)
     
    reuno likes this.
  21. weberdls

    weberdls

    Joined:
    Dec 24, 2017
    Posts:
    7
    Demos > Retro > Prefabs > Weapons > RetroMeleeAttack
     
    knuppel likes this.
  22. frankiecavanagh

    frankiecavanagh

    Joined:
    Dec 13, 2015
    Posts:
    11
    Hi I'm having an issue where firing the animations for weapons, the bool for idle weapon ( pistol for example) works great, but when I switch weapons the bool doesn't turn off so I end up with every idle animation bool turned on,

    Additionally is it possible to start the game with multiple weapons in your inventory?

    Thanks in advance
     
  23. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @frankiecavanagh I've done this by making inherited clones of the HandleWeapon script and then using input or other conditions for enabling one script while disabling the other for weapons switching.
     
    frankiecavanagh likes this.
  24. frankiecavanagh

    frankiecavanagh

    Joined:
    Dec 13, 2015
    Posts:
    11
    @NAiLz thanks that's really helpful to know it's not just me, I think I can code around it , maybe just something simple in stop shooting to kill the bool, but I wasn't sure if it was my setup or a code issue
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @jocyf > The Gex thing seems pretty specific :)
    @NAiLz > I'll change the StartDash to public, no problem.
    @knuppel > There is, and there's a whole tutorial about how to create them. Look at the documentation.
    @frankiecavanagh > Of course you can start with multiple weapons. And how/where does that bool thing of yours happen? Please send more details on the support email so I can help, thanks!
     
  26. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    Is there a feature that will spawn or drop an item, like health or a coin when you kill an enemy AI? I can see that being a cool gameplay mechanic. Imagine having to defeat a boss or particularly difficult enemy before they will drop a key which you need to complete the level.
     
    AtomDesign likes this.
  27. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Yeah I have been using an Aron Granberg's A* project. But trying to find the best way to handle slopes. Creating the graph is the tricky part. I could paint waypoints into the level using a point graph, or I could try and use the grid graph but that doesn't math up well with slopes, plus I would have to paint individually all of the "unwalkable" areas.

    If anyone would like to chat in more detail over a PM that would be great.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @pjooren > No but you can look at the bonus block script for inspiration, it's pretty much the same thing.
     
    pjooren likes this.
  29. Fabioisriva

    Fabioisriva

    Joined:
    Feb 3, 2016
    Posts:
    15
    email received and works like charm thx a lot,anyway is it possible to adding unity mixer to sound manager?..because to be honest its kinda a hard creating depth and panning to the music and sfx with the existing sound manager
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Fabioisriva > Just extend it to add whatever you prefer :)
     
  31. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    Thanks, I'll take a look at it. I'm having a lot of fun working with the engine btw.
     
    reuno likes this.
  32. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    Is there away to have a weapon that is a pickup automatically become equipped with the weapon inventory system? I see a function SwitchWeapon in character inventory but it is declared protected.
     
  33. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Hello, quick question, if i want to start a project from scratch, without using demos nor sprites,animations, anything visual, which things are mandatory to import from the engine, to make it work ?

    Sorry in advance if its a super noob question
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @codejoy > You're looking for CharacterHandleWeapon's ChangeWeapon method.
    @CHEMAX3X > I never understand the point of partially importing libraries, not much to gain from that, but if that's really what you're after, look at the documentation, it's all explained.
     
  35. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    @reuno thanks. I got it somewhat working. Created a new class SetPickedItem and overrode the PickSuccess


    Code (CSharp):
    1.  Debug.Log("HERE IN PICK SUCCESS");
    2.             CharacterHandleWeapon chw = LevelManager.Instance.Players[0].gameObject.GetComponent<CharacterHandleWeapon>();
    3.             Weapon iew = ((InventoryEngineWeapon)Item).EquippableWeapon;
    4.             if (iew)
    5.             {
    6.                 Debug.Log("EQUIP WEAPON: " + iew.name);
    7.                 chw.ChangeWeapon(iew);
    8.                 MMEventManager.TriggerEvent(new MMInventoryEvent(MMInventoryEventType.ItemEquipped, null, Item.TargetInventoryName, Item, _pickedQuantity, 0));
    9.  
    10.             }
    I only attach this one on my weapons. Works well but the item isn't picked graphically in the UI i am trying to figure out why, I thought the trigger event for item equipped would do it. I guess I am missing another method to call?
     
    Last edited: Feb 26, 2018
  36. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @reuno Awesome thanks! I also wondered why there's no camera shake for the multiplayer camera controller. I guess I could just use the regular camera controller for multiplayer but I'm not sure how that'll play out if some of the other players get outside of the camera bounds.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @NAiLz > Or you could just add the camera shake to the multiplayer camera. That seems easier to do.
    @codejoy > At this point I'd suggest reading the inventory documentation and looking at how the examples work. I can't debug that for you :)
     
  38. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    That's true. I just don't want it to be erased in an update so I guess I'll just extend the script. Thanks.
     
    reuno likes this.
  39. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @reuno I'm winging it with this one so please let me know if I copied and added unnecessary code. It works like a charm so there's no problem there! I added the Shake method to my own copy of the MultiplayerCameraController script and then altered the MoveCamera method as follows:

    Code (CSharp):
    1.     /// <summary>
    2.     /// Moves the camera to the newly computed position.
    3.     /// </summary>
    4.     protected virtual void MoveCamera()
    5.     {
    6.         // Smoothly transition to that position.
    7.         transform.position = Vector3.SmoothDamp(transform.position, _newPosition, ref _moveVelocity, DampTime);
    8.  
    9.         Vector3 newCameraPosition = transform.position;
    10.         Vector3 shakeFactorPosition = Vector3.zero;
    11.  
    12.         // If shakeDuration is still running.
    13.         if (_shakeDuration>0)
    14.         {
    15.             shakeFactorPosition= Random.insideUnitSphere * _shakeIntensity * _shakeDuration;
    16.             _shakeDuration-=_shakeDecay*Time.deltaTime ;
    17.         }      
    18.         newCameraPosition = transform.position+shakeFactorPosition;
    19.  
    20.         transform.position =newCameraPosition;
    21.     }
     
    reuno likes this.
  40. Ohamallama

    Ohamallama

    Joined:
    Feb 8, 2018
    Posts:
    2
    Amazing engine, thank you!

    I am having issues with the melee attack/weapon though. I can't seem to get a whole slashing animation to play. The idle always overwrites it and only plays like 1 frame(if even) of the attack animation. I don't want a delayed attack, just an attack animation to play all the way through. I gave the attack animation an exit time as well and that didn't help. I've viewed the Retro level with the sword but that animation is only like 1-2 frames anyway so that doesn't really help my situation either.

    Any help would be greatly appreciated, thank you!
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Ohamallama > I've answered your question via email already :)
     
  42. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    I apologize if this has been addressed already, but my playable character is able to swap out weapons and aim them. The sprite for each gun includes the hands of the character similar to the RectangleWithInventory prefab in the minimal FeaturesWeapons Demo. The problem I'm having is that when my character goes to climb a ladder, the gun sprite stays in place which looks awkward with the hands on the gun and the hands on the ladder too. Is there a way I can swap out the gun sprite with a different sprite or at least temporarily remove/hide the gun sprite when the character is on a ladder since he can't shoot on a ladder anyway? Also, and this isn't as big of a deal, but I would love to be able to effect the y position of the equipped gun when the character ducks or crouches.
     
    Last edited: Feb 28, 2018
  43. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @pjooren Take a look at this script I wrote. I use it for ladder climbs and wall hanging. Maybe it'll help you out.


    Code (CSharp):
    1. sing System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using MoreMountains.CorgiEngine;
    5. using MoreMountains.Tools;
    6.  
    7. public class WeaponDisable : CharacterAbility {
    8.  
    9.     public override string HelpBoxText() { return "This component handles the disabling of weapons during both wall hanging and ladder climbing.  This is to create a more visually pleasing situation and should be supplimented in the animator with animations that include the weapon in the position the designer would like it to be in while clibming or wall hanging"; }
    10.  
    11.     private GameObject weapon;
    12.     private GameObject weapon2;
    13.     private GameObject weaponSpecial;
    14.     private CharacterHandleWeapon weaponScript;
    15.     private CharacterHandleSecondaryWeapon secondaryWeaponScript;
    16.     private CharacterHandleSpecialWeapon specialWeaponScript;
    17.  
    18.     public bool secondaryWeapon;
    19.     public bool specialWeapon;
    20.  
    21.     [HideInInspector]
    22.     public bool usingSwitch;
    23.  
    24.     void Awake ()
    25.     {
    26.  
    27.         weapon = transform.Find("WeaponAttachement").gameObject;
    28.  
    29.  
    30.         if(secondaryWeapon)
    31.         {
    32.             weapon2 = transform.Find("WeaponAttachement2").gameObject;
    33.         }
    34.      
    35.  
    36.         if(specialWeapon)
    37.         {
    38.             weaponSpecial = transform.Find("WeaponAttachementSpecial").gameObject;
    39.         }
    40.  
    41.         weaponScript = GetComponent<CharacterHandleWeapon>();
    42.         secondaryWeaponScript = GetComponent<CharacterHandleSecondaryWeapon>();
    43.         specialWeaponScript = GetComponent<CharacterHandleSpecialWeapon>();
    44.  
    45.         usingSwitch = false;
    46.     }
    47.  
    48.     void Update ()
    49.     {
    50.         if(_movement.CurrentState == CharacterStates.MovementStates.LadderClimbing || _movement.CurrentState == CharacterStates.MovementStates.WallClinging || usingSwitch)
    51.         {
    52.             DisableNormalWeapons();
    53.             DisableSpecialWeapons();
    54.         }
    55.         else
    56.         {
    57.             EnableNormalWeapons();
    58.             EnableSpecialWeapons();
    59.         }
    60.     }
    61.  
    62.     public void EnableNormalWeapons ()
    63.     {
    64.         weapon.SetActive(true);
    65.         weaponScript.enabled = true;
    66.  
    67.         if(secondaryWeapon && secondaryWeaponScript != null)
    68.         {
    69.             weapon2.SetActive(true);
    70.             secondaryWeaponScript.enabled = true;
    71.  
    72.         }
    73.     }
    74.  
    75.     public void EnableSpecialWeapons ()
    76.     {
    77.         if(specialWeapon && specialWeaponScript != null)
    78.         {
    79.             weaponSpecial.SetActive(true);
    80.             specialWeaponScript.enabled = true;
    81.         }
    82.     }
    83.  
    84.     public void DisableNormalWeapons ()
    85.     {
    86.         weapon.SetActive(false);
    87.         weaponScript.enabled = false;
    88.  
    89.         if(secondaryWeapon && secondaryWeaponScript != null)
    90.         {
    91.             weapon2.SetActive(false);
    92.             secondaryWeaponScript.enabled = false;
    93.         }
    94.     }
    95.  
    96.     public void DisableSpecialWeapons ()
    97.     {
    98.         if(specialWeapon && specialWeaponScript != null)
    99.         {
    100.             weaponSpecial.SetActive(false);
    101.             specialWeaponScript.enabled = false;
    102.         }
    103.     }
    104. }
    105.  
    You can see that it utilizes the VERY USEFUL character states built into CorgiEngine to find out what the character is currently doing and disables or re-enables weapons when the character is in a state where we don't want them present.
     
    Zehru, Muppo and reuno like this.
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @pjooren > It's hard to answer this one better than @NAiLz. Nothing built in to do that (too specific), but easy to extend / add a class for that.
    @NAiLz > Can I add this to the public extensions repo ?
     
    NAiLz likes this.
  45. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88

    @reuno of course! What an honor! :D
     
  46. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    For anyone interested, I've been working on some AI and dynamic lighting in my game. I freakin' love Corgi Engine. ;) Can't wait to release this sucker later this year.

     
  47. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @NAiLz
    That looks like a neat atmosphere, congrats!

    Also thank you for sharing your weapon disabler code :D
     
    NAiLz likes this.
  48. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @Muppo No problem! Glad to help.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @NAiLz > I've added your script to the public repo, thanks for sharing!
    Love these light effects by the way :)

    By the way, here's the link again for anyone who'd have missed it : https://github.com/reunono/CorgiEngineExtensions
    Don't hesitate to contact me if you want to contribute.
     
    NAiLz likes this.
  50. xpachin

    xpachin

    Joined:
    Feb 6, 2014
    Posts:
    62
    nice lighting effects!
    what are you using?