Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @Reactorcore3 > That's quite a specific request :) I can add it to the todo list but I doubt many people will have the same needs. I'd say what you're after is already doable with what's in the engine, and would only require minimal coding, and mostly visual work. Your vehicle would just be a prop in a trigger zone, and then you switch to the actual vehicle character. I don't think that warrants an additional feature.
     
    Reactorcore3 likes this.
  2. Reactorcore3

    Reactorcore3

    Joined:
    Nov 27, 2018
    Posts:
    15
    Thank you, I didn't know that could be a solution for this. :D
     
    Last edited: Dec 23, 2018
  3. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hello!
    My problem: xSpeed goes from negative value to positive value, that means that "Idle" parameter on Animator turns Active when reaching 0.0f. This causes the player to play the Idle animation when "still running" (the player only changed the direction, Left-Right).

    My question: Is there a way to make xSpeed positive? or is there a way to not activate Idle parameter when changing direction? or any Corgi2D common setup that I was ignoring?


    Thanks! :)
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @Reactorcore3 > You're welcome
    @AesopWorks > You could setup your transition's rules so that it goes back to Idle only when the Speed is below a certain threshold, no need to code anything for that :) If that's not enough, you can always extend abilities (or create a new one) to add your own animation parameters.

    Note to all : I'll be off for a week starting tomorrow. If you need support, drop me an email on the support email and I'll check it as soon as I get back.
     
  5. carolinemariast77

    carolinemariast77

    Joined:
    Nov 24, 2018
    Posts:
    5
    There is any particular reason why Health.cs doesen't have Death Sfx?
    i created
    Code (CSharp):
    1. public AudioClip DeathSfx;
    and inserted here:
    Code (CSharp):
    1. // instantiates the destroy effect
    2.             if (DeathSfx!=null)
    3.             {
    4.                 SoundManager.Instance.PlaySound(DeathSfx,transform.position);
    5.             }
    6.             if (DeathEffect!=null)
    7.             {
    8.                 GameObject instantiatedEffect=(GameObject)Instantiate(DeathEffect,transform.position,transform.rotation);
    9.                 instantiatedEffect.transform.localScale = transform.localScale;
    10.             }
    11.  

    it works perfectly, but I hope it did not do anything wrong!
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    carolinemariast77 likes this.
  7. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    144
    What is the usage of CharacterSlopeOrientation ,which is one of Character abliites? Thanks very much:)
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @Bagazi > As explained in the documentation, "This component, added to a Character, allows you to have your model perpendicular to the slope it’s on. You can define its rotation speed, the min and max angles allowed, whether the weapon should rotate too, and whether or not the angle should reset in the air."
    You can learn more about it in the API documentation or the class itself, just like all classes in the engine, it's fully commented.
     
  9. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,258
    Can not find the/a pull demo and/documentation!?
    Did i miss it?
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @RandAlThor > As explained in the release notes, pull was introduced in v5.2. It's handled by the CharacterPushCorgiController ability, and there's an example of it in the RetroPush demo scene. Make sure you're running v5.2 or v5.3 to get that feature. If you can't update to that, check out the first item of the FAQ.
     
    RandAlThor likes this.
  11. ArcaneTheWoof

    ArcaneTheWoof

    Joined:
    Jul 11, 2012
    Posts:
    3
    Hilo! New user here, and I'm trying to get a Mega Man-style instant acceleration to the movement (immediate maximum speed), but nothing I try, including digging into the movement code, seems to produce the effect I'm looking for. Is this possible?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @ArcaneTheWoof > In the CorgiController's inspector, set the SpeedAccelerationOnGround to something super high (10000), SpeedFactor to 1.
    In Unity's InputManager settings, on your horizontal axis, Gravity to 1000, Dead to .001, Sensitivity to 1000.

    If that's not enough, you can do the following change in CharacterHorizontalMovement, after line 169, do something like this (ideally extend the class to do so) :

    Code (CSharp):
    1. if (movementSpeed > 0) { movementSpeed = 6f; } // you'll want to replace that with a variable, most likely
    2. if (movementSpeed < 0) { movementSpeed = -6f; }
    3. _horizontalMovementForce = movementSpeed;
     
    ArcaneTheWoof and Muppo like this.
  13. ArcaneTheWoof

    ArcaneTheWoof

    Joined:
    Jul 11, 2012
    Posts:
    3
    I was gearing up to do it in the code because Unity's Input Manager was already set up appropriately and none of the other settings were working, but then on a whim I popped into the Corgi InputManager and disabled smooth movement and that got it working! Thanks for the help :9
     
  14. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    Is it possible to make endless levels with the corgi engine?

    Like in Williams Defender arcade game.
    ..where left and right game borders are joint together ..

    You travel in one direction and after a while you come back where you started..
     
  15. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    @captnhanky You can use teleporters for that if you don't mind camera teleports as well instead of a smooth non visible transition, otherwise you have to override camera script with your own settings.
     
  16. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi,

    I'm playing with the level called, Retro Forest, and as I can see I can fire the gun in front of me, but I can't fire the gun when I'm pointing up-word or down-ward for example, can any one let me know how to do so?
     
  17. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    218
    A suggestion regarding the CharacterJump Ability for future updates. A pre-jump/post-jump delay option with added animation variables so that we can have "before take off" and "landing" animations.
     
  18. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    I think that was already requested some time ago, @Grafos , if not, I'm in too.

    @bravery , there is an option on the weapon settings to set the max and min angle the player can shot, if that's what you're asking for.
     
    Grafos likes this.
  19. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Thanks for your reply
    I'm asking about being able to shoot/hit in 4 direction (up, down,left and right) like the game hollow knight do?
    If that possible?
     
  20. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    Yeah, absolutely.

    In that level, the RetroMachineGunPicker gives player RetroMachineGun. Just check this weapon prefab, it have a WeaponAim script with weapon rotation options.
     
  21. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    Hope you don't mind - especially @reuno - if I made a bit of spam of my little game.


    There's a new demo available on ralesizo.com if anyone want to give it a try.
    Only Windows this time, I need to check out all the touch input stuff before releasing another one on Android.
     
    Meowx, skayster and Boom_Shaka like this.
  22. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    I have download and played your game, and I should admit it's good as progress.
    Now I admit that this one is really good as a progress of development but allow to mention some points of improvements:
    1- First thing I believe there is a bug that when you have an interaction button (B) or even a dialog like the exist dialog then then the jump button is no more working, you will need to move around so the dialog will disappear and you can jump again.
    2- The time it's taking to enter the level took so long! I'm talking about the screen after the loading screen and before enter the game (I believe it's the map screen) this one took so long, and there is no progress appear at first I think that I was stuck!
    3- I manage to move around the whole level but I could not find the medicine (root)? how to reach it? I manage to move in the level for 3 times but could not find a clue where to find it? as an advice you should add some guidance in case player stuck, so the player do not lose interest in the game!
    4- The graphics is good but if you are planning to do this as commercial product and looking for hit you will need a better graphics and animation.

    keep up the good work
     
  23. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    19
    Purchased CGE, and quickly made some simple level and enemy successfully.Actually i use unity 2017 and crazily looking for ai script.Upgrade to 2018 the yay!

    I manage to manipulate the function and variable via playmaker. One thing concern my workflow, that is setting up area and offset of the weapon. The weapon area only visible during playtime,adjusting wont save the value.
     
  24. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    Downloaded and looks great! Not sure if you need any more artwork, but there's a contributor at Open Game Art that does some pretty good retro tiles and characters - https://opengameart.org/users/grafxkid

    Looking forward to the final release.
     
  25. Kelgand

    Kelgand

    Joined:
    Feb 3, 2018
    Posts:
    10
    @hoyoyo80 This is due to how Unity behaves, not anything having to do with the Corgi Engine. As you found, if you adjust any values in the Unity inspector while the game is running then they will not be saved and they will go back to what they were previously. This is normal Unity behavior.

    If you change the values of your component and decide that you like the new ones, then you can do two things:

    1) Remember what you changed them to and after stopping the game manually change each value, or
    2) While the game is running (and after you changed the values), click on the settings gear for the component and choose "Copy component". After you stop the game, click on the settings gear again and then choose "Paste Component Values". This will copy and paste the new values into the component.
     
  26. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    @bravery

    The bug you say is, in fact, how dialogue zone works out of the box. I will like to change it, but haven't done it yet as it implied changes on the main dialogue script.

    "The time it's taking to enter the level took so long!"
    That seems odd, it is not brief but not long either, Are you running the game on an old PC?

    About the goal of the game: You'll not find the medicine root because it's a demo. To collect this item you have to finish the game.
    In case you're stuck on the first level (I'm not sure I understood you) you can leave the village from the right of the level after talking to the elder, otherwise there's a barrier preventing you to go outside.

    About the visuals - and I answering @Boom_Shaka here as well - don't worry, I'm not making a commercial game, just want to make a finished one for portfolio purposes. I'm sure I can do better, but I have little time for this project and I choose the "keep it simple and finish it" path.

    So, thanks for playing!

    BTW, @Boom_Shaka, that artist for the link is really good, I'll keep an eye on him, thanks!
     
  27. MoFaShi

    MoFaShi

    Joined:
    Oct 25, 2015
    Posts:
    30
    I found in EveryFrame method of CorgiController.cs, you called SetRaysParameters method twice. is it a bug or you just do it on purpose?
     
  28. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    19
    Thanks for the clarification, i do think so too just addressing on how to combat the matter:) i know use method 1 uve posted but method two look easier:) Thanks again
     
    Kelgand likes this.
  29. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    My laptop have good specs and it's not old (16gb ram, 2.9ghz CPU, sad hard disk) so I believe you will need to test it on other machines to check if this happens on other computers as well.

    For the level, please tell me is this demo only 1level? Because I can't go to second level (if there is one) ? So if there is please let me know how can I reach there?
     
  30. MoFaShi

    MoFaShi

    Joined:
    Oct 25, 2015
    Posts:
    30
    the MMHealthBar.cs has a problem.
    if I set AlwaysVisible to true and set HideBarAtZeroDelay greater than 0(for example 0.2f), then this GameObject will not be hidden when enemies were killed.
     
  31. BigED

    BigED

    Joined:
    Jul 25, 2013
    Posts:
    16
    hey renuo,

    first - thanks for great asset!

    also I have a little question, that is the cleanest way to move character in horizontal direction in terms of corgi features, I want to build some kind of finite runner, or I should use unity3d build-in features?
     
  32. stmaddox

    stmaddox

    Joined:
    May 15, 2016
    Posts:
    9
    Just a comment. I did override on GameManager deleted its component and changed to myGameManager (and GUIManager to myGUIManager). The reason I did override worked just fine but many other things quit happening. It seems that to override these is nearly impossible. They are both called by many other classes. All these other classes need to be overridden too which is too much work. Too bad there is not a way to do a go between class that gets called by all the other classes and then passes to the correct Manager wanted to override.
    I will try to see if the overridden classes I made can be changed to their own base class and add them as an additional manager. As I said this is just a comment so nobody else tries to override these Managers.
     
  33. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    Thanks for playing it.

    I'm not sure if you mean the level selection scene (where 1-1, 1-2 an so on are located) or the "enter a house" effect.

    In the first case, is just a scene with several EndLevel prefabs, each one linked to another level.

    In the second case, these rooms are in the same scene. I'm using custom level bounds, camera controller and teleporters to achieve this effect.

    Hope this pic is self-explanatory.

    @stmaddox
    Good to know, the only manager I've customized so long is the RetroProgressManager (just the save game stuff) and all is working fine.
     
    Pacaworks and stmaddox like this.
  34. Kektastic

    Kektastic

    Joined:
    Apr 6, 2018
    Posts:
    2
    I'm not sure if this has been reported or not, but I'll just throw it here anyway:

    It's almost pixel perfect (if not pixel perfect), but it is possible to clip through the corner of a platform, and have varying results depending on the platform.

    If the platform is solid, you just get pushed backwards with varying amounts of velocity (as shown in this screenshot):
    If the platform is a one-way platform, you simply go through it. (Which I find weird considering that if you're standing, you collide with a one-way platform that's right in front of you as if it was solid instead of just walking right through it.)

    @Muppo
    I tried out your game too, it's really good so far, and pretty much all of the "issues" I found have already been reported by people, only thing is corgi engine's "corner clipping" thing also appears in your game.

    However, I do have a question. I assume for your custom LevelManager class you simply have an array of Bounds or something for sub-areas, but what did you do to to make your custom CameraManager switch from staying inside level bounds to staying inside sub-area bounds?
     
    Last edited: Dec 28, 2018
    Pacaworks likes this.
  35. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!
    Can anyone tell me how to stick a (second) camera to the player?

    I need this for a radar.

    I don't know how to do this in corgi because the player is generated at runtime.

    Thanks!
     
  36. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    This corner clipping is also killing me (not in a pixel perfect mode). Today I discovered that at 300 fps, the corner pushing gets stronger and your character, literally, flies from one side of the map to the other. Meanwhile, at 60 fps it just gets pushed a little.

    I think this may be caused by the Raycast's missing corner collision? they collide on horizontal & vertical sides, but there's a missing hole in the corners :confused:
     
    Last edited: Dec 28, 2018
  37. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    The Area Bounds you can see on the last post have their own bounds values, the custom camera check Level Bounds in Update() so, when player is teleported to the new area, the camera takes these values.

    About the 'corner clipping', I'm not sure how much percentage of this is due to Unity's tile map system or Corgi Engine, because -as far as I know- if your sprite is not 99% square at least Unity tends to round corners, making little slopes on the corners.

    One way platforms in tile map levels have an irregular behavior, yes, it seems it doesn't happen on the regular scenes, that's why I doubt.

    Let's see what does @reuno think about this.
     
  38. Kelgand

    Kelgand

    Joined:
    Feb 3, 2018
    Posts:
    10
    @Kektastic I agree with Muppo here, it looks like your ground sprite doesn't have a sharp corner. My guess is that you are hitting the edge pixel, it is being calculated as a slope that is at a greater angle than your
    MaximumSlopeAngle in the Corgi Controller, and the character is slipping down it.
     
  39. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    19
    Hi all, ive made my own character to learn more and i made one ai using melee attack.
    The problem ive encounter is if the player stay long enough in the melee damage area, after sometime the player wont receive any damage.

    Thanks
     
  40. MoFaShi

    MoFaShi

    Joined:
    Oct 25, 2015
    Posts:
    30
    this is exactly what I want. I even thought that Corgi Engine can't handle animation in this way before I saw this post.
     
  41. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    Is there a way to change the death behavior of the character?
    I just want the character to blow up and disappear instead of falling off the screen.

    In the health script there is a "destroy on death" but it does nothing noticeable.

    Thanks
     
  42. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    144
    upload_2018-12-29_20-8-25.png



    My cat can not climb the tiledmap collider which is made by composited tiledmap collider but he can climb the black block which is made of 2d box collider... By the way,he can down hill the slope both....
     
  43. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    de-select "collisions off on death"
     
  44. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    This does not work. The character is still there.

    The only effect is that the character sits on the collider below after death.
     
  45. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    Exactly -- you said you didn't want it falling off screen. It sounds like you're asking about respawn behavior - that's controlled in the level manager and camera controller script.

    You'll need to play around with the settings to get the exact effect you want, but, in a nutshell - time your respawn delay to your death fx animation. You can set "instant reposition camera on respawn" to true if you don't want the camera to pan back to the respawn point - that's probably the "disappear" effect you're looking for.
     
  46. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89


    Thank you for your effort to help me out.

    I am making a side space shooter like game and I need the player to disappear instantly (in a fireball) when hit.

    Repositioning of the camera and the time delay to respawn does not help here.
    The player must instantly vanish, like an enemy vanishes instantly when 100% damage is reached.

    I think this could be an error in the corgi engine, since "destroy on death" works with enemies as expected.
    On the player this checkbox does nothing.

    When removing the "health" script completely, the player instantly vanishes on hit (but does not respawn).
     
  47. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    I get it - I achieved that effect by tweaking respawn/camera position. "Destroy on Death" doesn't work on player characters...I'm assuming there's a specific reason for that so I didn't mess with it. Dev should be back soon, though so he'll be able to give you some more direction. Good luck!
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    I'm back! Got around 300 questions via email while I was off this week, so it's gonna take a little while for me to answer them all, but rest assured the answer is coming soon!
     
    Pacaworks likes this.
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,074
    @captnhanky > As @Muppo said, for endless levels teleporters (or using the same logic) would be a good way to go.
    @bravery > It's an option on the WeaponAim component. You can look at other weapons in the FeaturesWeapons demo scene (for example) for reference. And of course don't hesitate to look at the documentation for more details.
    @Grafos > A pre-jump / post-jump delay would be a nice addition indeed, It's been suggested already, I'll add your vote to it!
    @Muppo > I absolutely don't mind people posting links to their game here, that's what this thread is for :) And congratulations, this is really good work. I love the visuals. I think you can pick a better font for dialogs (it's too blurry, and doesn't match the scale of your pixels otherwise) but apart from that that's impressive! Didn't get any long loading time, everything seemed fine, generally.
    @hoyoyo80 > As @Kelgand said, this is due to Unity's way of doing things. Follow @Kelgand's workflow recommendation, it's the way to go.
    @MoFaShi > The ray size set is done on purpose. As for the HealthBar, no, it doesn't have a problem, it's working as intended. If you add a delay and then have the parent object get killed, there's nothing anymore to hide it. You need to make sure your character doesn't get destroyed.
    @BigED > I'm not sure I understand your question, but the CharacterHorizontalMovement ability handles horizontal movement, if that's what you were asking.
    @stmaddox > Overriding managers works just fine, and you'll find examples of that in multiple demos (the Hunt demo extends the LevelManager into a MultiplayerLevelManager for example, and there's nothing preventing you from extending the GameManager or other managers). And even though this is really just standard Unity and nothing specific to the engine, there is even a dedicated section of the documentation about this : https://corgi-engine-docs.moremountains.com/managers.html#extending-a-manager
    @Kektastic > Hard to tell what's wrong here without seeing the colliders and rays. If the problem persists, please use the support email, thanks. As for one way platforms, of course you go through them when jumping, that's exactly what they're designed for :) You can't walk through them though, that's what mid height one way platforms are for, they're a different thing.
    @captnhanky > As explained in the documentation, you can get a reference to your player via the LevelManager's Players array (LevelManager.Instance.Players[0], usually).
    @AesopWorks > I don't reproduce that 300fps bug you mention, please send more details on the support email if it persists, thanks (version, how to reproduce exactly and where, etc).
    @hoyoyo80 > Hard to tell without more details, but you usually won't want your damage area to last longer than the time it takes to apply damage.
    @captnhanky > The DestroyOnDeath option destroys (in the Unity sense) your player character's gameobject. You can add particles on death of course, if that's what you're asking for.

    Alright, that should be all. I'm still going through the emails right now (I'm at around 30%). Please use the support email if you think you've found a bug or have a support issue, and if I haven't answered your email yet, I haven't forgotten you, and the answer is coming soon!
     
    Muppo and Grafos like this.
  50. Betzalel

    Betzalel

    Joined:
    Dec 3, 2017
    Posts:
    17
    Hello! im having really having a rough time setting up my character a using the new unity 2d bones package. Any chance you may be doing a tutorial on setting up the corgi character using unity's 2d animation system anytime soon? assuming it was similar i tried using the spine prefab examples you have just replacing with my own parts and animations but its not animating at all. i also tried starting from scratch piecing the character together with the scripts in other character prefabs. unless you feel the corgi engine is not yet compatible with the unity 2d animation package could you give some pointers on how to set it up properly? im sure a lot of us could benefit greatly from it!! :) thank you for your time!