Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.6 : ability split, recoil, hitscan...]

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

  1. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    I had the same trouble, 1/5 tries, it got stuck in the ceiling, a partial solution was to decrease the speed of the Crusher object and my character didnt go through the ceiling (or floor again).
     
  2. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    The problem is that somehow I deleted the objects that represent the doors/tunnel thing (but I could still use the teleporter objects to between rooms... Thanks!
     
    reuno likes this.
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @Dr-Neko > I don't think the manifest has anything to do with it. I'll try and run automated tests to repro the issue.
     
  4. Cunny-Lang

    Cunny-Lang

    Joined:
    Jul 30, 2019
    Posts:
    15
    Everytime I have the same problems but also with a polygon collider) I have a "curve" platforms, like symbol ~ , so easiest and fast way to make a floor - is to place polygon2d. Otherwise I need to connect boxes (box2d col) pixel by pixel, or my character makes "micro-jumps" at the edges of connections, means he playing 1 frame of jump animation for like 0.1s
     
  5. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    I installed Universal pipeline renderer 7.4.1 and 2D renderer for 2D lighting in my project, the only issue I am having now is the UI camera now has a solid blue background in the Game view.

    Any advice on what/where I should be looking or learning about would be awesome

    Edit* the 2D lighting works fine in the game view if I disable the UI camera

    Capture.PNG ui.PNG
     
    Last edited: Jun 27, 2020
  6. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    For damage feedbacks and the MMfeedback component, I want to put a damage feedback animation on an enemy. I used auto build AI character and created a child of the enemy, called it damage feedbacks and added the MMfeedback component. What do I drag into the bound animator field?
    I have an animator for the damage animation, but it won't let me put that in the field.

    Thanks
     
  7. DrNeko

    DrNeko

    Joined:
    Oct 5, 2012
    Posts:
    9
    Hello @reuno,
    Thanks again for taking a look at this. I was wondering if it's possible to change the speed of the crusher at each direction (fall fast, but slowly climb up) and have it activate when a player is from a certain distance (similar to spiked crusher from Metal Man in Mega Man 2) or below from raised crusher (similar to Thwomp in Super Mario). I tried tweaking it but been unsuccessful at either.


    @piccolodmq I changed the speed but doesn't seem to make a difference (tried speed of 20 and 10).
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @SupremeSmash > That's one of the many issues of URP. You can find more info about it online, or in this post : https://forum.unity.com/threads/rel...-crush-detection.286289/page-128#post-5572327
    @jjkrr > MMFeedbacks and animations are two completely different things. I'd recommend reading the documentation on feedbacks to learn more about how they work, and look at the many examples in the asset (most characters, if not all, have feedbacks setup on them).
    @Dr-Neko > You can do that by extending its script, for sure, or by creating a new class that triggers it based on proximity (or when entering a certain trigger). You can even use some of the MM classes that let you bind that.
     
    SupremeSmash likes this.
  9. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    reuno likes this.
  10. Azerkit

    Azerkit

    Joined:
    May 22, 2019
    Posts:
    133
    Hey guys, bit of a noob question, but I've tried reading through the documentation and playing around with some stuff, but I cannot for the life of me figure out how to change the size of the camera in the Minimal Level scene. It's permanently stuck at 5 and will not go anywhere else. Is it even possible to change it and if so, how?
    And on a similar note, is there an easy-to-understand explanation on how to setup ProCamera2D with Corgi, if that's possible?
     
  11. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    Reuno, first of all thanks for this amazing project. Thanks for listening to our many questions and requests, this is what makes the difference between a good engine, and an awesome project, like yours.

    Having said that, is there a proper way tom make suggestions for future updates?

    1- Something that could be fun is a way to make melee attacks that go in different directions ( think of Link on Zelda 2, upward and down slash attack) where, depending on what key combinations (up down), you are having. I have tried, unsuccessfully to make this myself.

    I know you can customize the current melee system, to aim anywhere, and another way is what you suggested to implement an external keybind system, to the corgi engine( I tried this with some buggy results). So yea there is that.

    2- Another request would be, extending an option for when you Stop Movement while using an attack, to exclude while you are not grounded, (currently if you are jumping forward, and use an attack with this option you physics stop and you fall like a rock mid air).

    Again I know this are personal requests, but hopefully you can think on adding them in the future.

    Do you keep up to date with update on all your other, engines as you do in this one?

    Thanks for your work!
     
  12. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    Changing the the Orthographic size in the CinemachineVirtualCamera game object worked for me
     

    Attached Files:

    Azerkit and reuno like this.
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    Azerkit likes this.
  14. Cunny-Lang

    Cunny-Lang

    Joined:
    Jul 30, 2019
    Posts:
    15
    Yeah man, you need to change settings at Cinemachine Virtual Camera, not on default)
     
  15. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    One question, I made a Copy of the Retrovania Scene, and added my own Grid with my tilesets, and this alone brings the FPS down to 15. I have literally more than 2000 tiles divided into different palette. Could this be the reason for the FPS drop? I did an experiment where I took, the retrovania scene deleted the Grid and putted my own, (wich is basically same as yours, but with a bigger palette and same result.

    Or could be it be something else?

    Thanks
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @piccolodmq > If that's the only thing you changed, and it was working fine before, and not after, then it looks like that's the issue indeed. I have to admit I've never used 2000 tiles with Unity's tile system, it usually shows its flaws way before that.
     
  17. jhaypee1683

    jhaypee1683

    Joined:
    Mar 15, 2015
    Posts:
    5
    Hello good day. Im planning to make a sample scene using proximity manager. But im having problem replicating the minimalperf scene. Is there any step by step tutorial with this? Because when i play the scene all the game objects disappear.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @jhaypee1683 > No, there's no step by step tutorial, it'd be a bit overkill. It's quite a simple system.
    As explained in the documentation, all you need to do is add a ProximityManager to an empty object in your scene, and add ProximityManaged components to all the objects you’d like it to manage.
    If the issue persists, maybe compare with the demo scene, and if that doesn't help, don't hesitate to use the support form, and provide a bit more details about what exactly you're doing.
     
  19. jhaypee1683

    jhaypee1683

    Joined:
    Mar 15, 2015
    Posts:
    5
    @reuno > Cool thanks for the quick reply. I think i have to redo my scene i might have missed something.
     
    reuno likes this.
  20. Azerkit

    Azerkit

    Joined:
    May 22, 2019
    Posts:
    133
    Hey everyone. I'm trying to figure out how to make smooth animation transitions on a jump as well as differing idle animations.
    I got a jump and fall animation working, but I'm looking to make a transition between the jump and the fall at the peak of the jump as well as a landing animation.
    I'm also looking to randomly play a different idle animation after some time passes. For example, after playing a standard idle for a few seconds, it plays one of 4 idles at random before going back to the standard animation.

    I realize this is probably more of a Unity animation issue and I apologize for asking it here, but I've been banging my head against a wall trying to figure it out. I read through Unity's docs on the subject and found them to be rather confusing (doesn't help that a lot their tutorials for it are really not that great). Any advice on this though would be greatly appreciated.
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @PhantomFox128 > That's indeed not specific to the engine (at all), but hopefully I can give you some pointers.
    In the animation section of the engine's documentation you'll find a list of animation parameters that abilities automatically update. You can use the HitTheGround parameter to know when you just touched the ground, and use it to transition to a landing animation. The NewCorgi3D prefab does that. For transitions between jump/fall, I'd recommend using a blend tree. As for playing random animations, I usually do that using sub states, with a script that feeds it a random parameter I update at the frequency that makes sense (it's usually not per frame, but really depends on your use case).

    And yes, Unity's documentation on animation can be confusing, unfortunately I agree with that. I think it's worth taking the time to learn and understand its possibilities, it's very satisfying to setup animations once you're not fighting the system at every step and have better (mental) tools to debug things when they don't go your way.
     
    Azerkit likes this.
  22. Azerkit

    Azerkit

    Joined:
    May 22, 2019
    Posts:
    133
    Hey, thanks for that!

    If I may make a suggestion: coming from another engine (that's no longer being supported), I think having the option to assign animations to specific abilities and tweak them in the Inspector without having to use Unity's solution would be really helpful. I'd imagine it would be a bit work on your end, but I think it would go a long way to make Corgi more accessible in general. Just a thought. Either way, thanks again for the help!
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @PhantomFox128 > It may make it more accessible, but then also way more limited. It'd be impossible (and/or useless) to recreate the entire animator system in an inspector. You wouldn't be able to setup blend trees or sub states from an inspector, and you'd end up with very basic and unsatisfying animations. I prefer encouraging people to learn how to do things properly, and use the appropriate tool for the job. It's also generally considered bad practice (to hardcode animations), I really wouldn't recommend doing things that way :) But thanks for the suggestion!

    Edit : if you really want to do it though, it's doable out of the box with the engine (at least without requiring any coding), using the MMFeedbacks system, which lets you trigger animations. Every ability's got feedback slots, so you'd get something like what you describe. Again, I'd recommend investing the time to learn how the animator works, you won't regret it :)
     
    Last edited: Jul 1, 2020
    javi_unity402 and Azerkit like this.
  24. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    187
    Hi @reuno,

    I think I might have found two little bugs while trying to create my shooting routine, i hope it helps!

    * If there is no bottom under the character, it's not considered to be Airborne as the _controller.DistanceToTheGround returns -1. (the map ad a level boundary not that distant)
    * The option that prevents all movement while shooting doesn't seem to work correctly as it sets speed and force to zero before checking if the character is airborne at all. So it will block the movement in any case.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @drHogan > If you think you've found bugs, please use the support form to report them, thanks! And please provide context info (Unity version, asset version), and ideally repro steps, I'll be happy to check them out and fix them for you.

    Edit : I've added them manually in case you miss that message. The first one had already been reported and fixed for the next version. Drop me a line if you need the fix. The second one I don't reproduce on v6.5 / 2019.3.3f1, the option seems to work as intended (killing your horizontal speed if airborne, and dropping you to the ground). If you can provide me with more info on that one I'll be happy to have another look.
     
    Last edited: Jul 1, 2020
  26. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    187
    Ah ok. No worry, I fixed them for my needs already. They way I did read the
    Code (CSharp):
    1. _horizontalMovement = _character.Airborne ? _controller.Speed.x * Time.deltaTime : 0f;
    was that while Airborn speed had to be kept as controllerSpeed*Time.deltaTime, and zeroed only otherwise (probably wishful thinking because I need it to be so ;), and that setting previously the speed to zero would override that part of code. I nevertheless fixed it for my needs, just thought it was a bug for the intended behavior!

    If you don't mind, I have a tiny additional question. Do you happen to have any example of a character without visible weapons? In detail, we have our character shooting energy balls with one hand, therefore she has a shooting animation and i did create her an invisible weapon to handle that.
    I do really struggle in balancing out the syncronization of animation and projectile spawning, and I was wondering if there was some example I might have missed to take inspiration from.

    Cheers and thanks for the always fast answers!
     
    javi_unity402 likes this.
  27. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    26
    Hi @drHogan. I also have invisible weapons. Weapon animations are passed to animator character, so you just have to configure a trigger and setup the animation in the player.
     
    drHogan likes this.
  28. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    187
    Yep, I am doing that, but I seem to really struggle to sync the bullet spawning. At times the FixedUpdate and Update probably have some small desyncs and the bullet one and then spawns before the right frame in the animation. I had considered adding an event to the frame, but it would make the logic dependent on the animation, while i would have liked to do the opposite for stability, i was wondering if there was a correct best way to do that.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @drHogan > If you want to sync with a frame of your animation, then using animation events would be the best way to go, that's gonna be the more stable option. Not necessarily the easiest to maintain or debug, but that's what they're for. Alternatively you could change the delay so that it works on frames instead of time. I have to admit I've never had that issue, but for sure that use case is a very good example of what animation events were designed for.
     
  30. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    187
    hi, i did implement it with events, and indeed it works like a charm! thanks for the tips ;)
     
    reuno likes this.
  31. jamiewhitephd

    jamiewhitephd

    Joined:
    Jun 8, 2012
    Posts:
    122
    Hi there, is it possible to "butt stomp" using a default character ability, or is it something I need to make myself as an extension of the jump class, for example?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @jamiewhitephd > That depends on what you're after. There's the CharacterDive ability that lets you pound the ground. There's the Stompable class that lets you kill/damage enemies by jumping on them.
     
  33. jamiewhitephd

    jamiewhitephd

    Joined:
    Jun 8, 2012
    Posts:
    122
    Mario 64 style, so allowing the character to stomp downwards as you mentioned which would either crush enemies or activate switches. It sounds like the CharacterDive ability will achieve this?
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @jamiewhitephd > By default the character dive ability doesn't apply any damage, but you can look at how the CharacterDamageDash ability does it, and you can then build your own ability that combines both.
     
  35. jamiewhitephd

    jamiewhitephd

    Joined:
    Jun 8, 2012
    Posts:
    122
    Ace, I’ll look into that - thanks.
     
    reuno likes this.
  36. Amalfi-Prozen

    Amalfi-Prozen

    Joined:
    Feb 2, 2014
    Posts:
    33
    Hi, I would like an area that applies a constant force of a specific direction and intensity to the player when he enters it. How could I do? I have seen that there is a wind zone but it only applies a force at the top T_T
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @Amalfi-Prozen > you could create a new class that works similarly as the wind zone but also applies an horizontal force.
     
  38. Amalfi-Prozen

    Amalfi-Prozen

    Joined:
    Feb 2, 2014
    Posts:
    33
    what is the script for the wind zone?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @Amalfi-Prozen > The script for the wind zone is called CorgiControllerPhysicsVolume2D (you can see that if you select one, in its inspector), but come to think of it, it may actually not be the best pick for the job you're after.
    It's a bit of a hack, but you can use the SurfaceModifier to do so, like this :

    upload_2020-7-7_17-54-56.png

    This is a modified version of the Minimal Treadmill prefab. You'll want to make sure it's on the Default layer, that its box collider is set to "is trigger", and then you can apply forces.
     
  40. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    Hi Reuno, quick question regarding, the ProximityManager class, I am using your Vertical scene, prefab as an example. When I try to import the prefabs that "stops" the enemy's from doing anything, I couldn't get it to work. I literally used the Prefab named AI, and changed one of my enemy's with the one there (even using the platforms and other objects there), but still I can see the enemies moving when I am far from there, and FPS goes down. The MinimalPerformanceEnemy+Platforms has default values of 15 and 20 for how close the player/camera is. But still tinkering with this didn't get me anywhere. Any clues on how to fix this?

    ----

    Silly me... I was not using the Proximity Manager, functions... NVM.

    ---- Update 3

    Still I I cant get it to work. I am down to 30 FPS :( Picture for reference. (Green is the Player) and Red are the enemies that have the MinimimalPerformance options on it (with the default 15 and 20 proximity settings. .

    https://drive.google.com/file/d/1aGjLPAjxvK-KljUSA6Yawmg2jQ9HKF1g/view?usp=sharing
     
    Last edited: Jul 8, 2020
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @piccolodmq > I'm not sure I follow what you mean. I don't know what prefabs that stop enemys are, or what prefabs you're referring to in general, it's just all a bit too vague.
    As you'll see in the documentation (https://corgi-engine-docs.moremountains.com/scenes.html#managing-large-levels), the proximity manager is fairly simple, and if you simply have a proximity manager and the appropriate component on everything you want to disable, it'll simply work. If the issue persists, please use the support form and provide repro steps of what you did, I'll be happy to have a look for you.
     
  42. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    32
    -----

    Let me rephrase myself, I am using all the Prefabs that are on MinimalPerf, that have to do with enable/disable objects to save on performance (that's what I meant with Stop), I am bringing ProximityManager -and also AI, prefab from that scene to another Scene, ( a clone of the Vertical scene). I changed the AI prefab only by taking out the RetroBlobWaitJumpWalk, and changing it for one of my Enemys. And I am not getting results. Do the Platforms or other objects need anything extra, to enable/disable to save on performance.
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @piccolodmq > As I said in my previous message, please just use the support form and provide repro steps of what you did, thanks!
     
  44. lguzman79

    lguzman79

    Joined:
    Jul 9, 2019
    Posts:
    1
    Hi. I´m interested in using the CharacterSwitchModel, but when I use it in a character that uses the combo weapon, the ComboInProgress does not fire on the other models and animations like punches don't play. Any ideas?
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @lguzman79 > Please use the support form to report this, and provide a bit more context (repro steps, what version of the engine you're running, what version of Unity, etc), thanks!
     
  46. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    43
    Hi @reuno,

    quick question, coul the hit able be used on an ai to trigger a character switch to have a mechanic like that of Mario games where if you get hit you loose your power and switch to normal Mario and then to the small one ? Or should I go another route completely?
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @Sofiel > There's an example of that exact behaviour in the SuperHipsterBros demo scene. It doesn't use the CharacterSwitch, but you could absolutely do that, it's a very good way of doing it
     
  48. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    43
    reuno likes this.
  49. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    261
    In Inventory Engine, is there a built-in way to limit the maximum of a single thing that an inventory can hold? I see the "maximum stack" variable, but my understanding is that a new stack will just be created when picking up more items. I want to limit the player to, eg, 100 of a small thing in a single stack, while not allowing a second stack to be created, and still having space in their inventory for other stuff.
    If not, any suggestions on where to do this override/check? Thanks
     
    Last edited: Jul 10, 2020
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,840
    @dasbin > No, there's no global limit at the inventory level. I could add that to a future update if you'd like though, it'd be a nice addition. In the meantime, if you wanted to implement that, that check would have to be in the AddItem method.
     
    dasbin likes this.
unityunity