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

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    @shanemt - this looks great! Are You planning to share this code?
     
  2. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    44
    Hello @reuno, it's really pleasant to see such updates after all these years past the release, so I would be interested by your engine, but first I would like to know if you handle any "depenetration" for the characters who got stuck by solid moving colliders. With default Unity rigidbodies the character is pushed through the collider then disappears out of screen, which is really annoying. I can fake a "go through" in the right way with basic movement, but it's quite a pain when handling rotating obstacles !
    Thank you in advance for your answer :)
     
  3. RGroff

    RGroff

    Joined:
    Feb 6, 2019
    Posts:
    3
    Having some difficulty adding additional 'CharacterHandleWeapon' scripts. I'd like to add the ability to handle multiple weapons, bound to different buttons. I see that this was done with the 'HandleSecondaryWeapon' script. I have tried duplicating that script, changing the dependencies to a third input binding, and then attaching the script to my player character, so he has 'CharacterHandleWeapon' , 'HandleSecondaryWeapon', and 'HandleThirdWeapon'. Using the third weapon is working, but there is an exceptionally long (4-5 second) delay from button press to the weapon actually firing. The delay seems to be in the WeaponState switch statement. Does this problem spark any ideas of another piece that I may be missing? Hoping I'm only missing something simple upstream.
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Razouille > I don't believe there's such a thing right now, although I have to admit I'm not sure what you mean exactly. Usually you'll avoid having objects inside other objects in the first place. With a use case I may be able to provide a more accurate answer.
    @RGroff > I have no idea how you could cause a 4 seconds delay, unless you've explicitely said so. I'd suggest using debug tools to track the chain of events. If it only happens with your script you've probably made some mistake, but it's hard to guess what.
     
  5. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    44
    Thanks for the answer, actually I want to put multiple moving colliders as solid (so not as 1 way platforms), but as they are also rotating sometimes the character can be squashed between two of them, like you can see in the picture. In this case logically the character should be pushed on the left, but with default Unity colliders it jitters and goes through the obstacles. I hope it's more understandable now :)
     

    Attached Files:

  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @being_jose > Please stick to the support form, no need to post your message everywhere, thanks.
    @Razouille > The engine is raycast based, you have to implement such unusual interactions on your own. In this case you'd have to detect such a situation and kill the character. But that's not built-in. I'd probably still go with physics if you want heavy rotations and collisions like that, that's like the textbook use case, and super easy to handle. Definitely easier to handle than manually with the engine.
     
    Razouille likes this.
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Hey, there's an unofficial (meaning I'm not the one managing it) More Mountains discord server at https://discord.gg/nrbxdfk. It's a great community full of nice people using the Corgi Engine, TopDown Engine and/or other assets of mine. Don't hesitate to join and share your stuff there!
     
  8. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    @reuno I have a working MeleeWeapon, but about Particles: how I should flip them? If the particle effect is not symmetrical, it's enough to set the particle transofrm scale x to -1 to flip, but corgi will not do it for me or do I miss some option? In the case i should implement that, which is the method in MeleeWeapon to override
    Thank you
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @luigi-freguglia > You can use rotation instead of flip, or extend CharacterHandleWeapon / create a new ability that will take care of this.
     
    luigi7 likes this.
  10. tallesmaziero

    tallesmaziero

    Joined:
    Feb 3, 2018
    Posts:
    19
    There is a drop script in Corgi Engine? Like when an enemy die and he drops something with movement like a coin that bounces a little.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @tallesmaziero > No, there isn't yet (it's on the todo list). You can see a full list of features on the asset's website. If it's not listed, it's not in the asset (yet).
     
    AtomDesign and tallesmaziero like this.
  12. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    What is the usage of mid height one way platforms?:)
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Bagazi > You put them close to the ground, between the ground and your character's mid height, and your character will be able to walk past them or jump on top of them (from anywhere or from below).
     
  14. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611

    Get it.
     
  15. Emphy

    Emphy

    Joined:
    Feb 7, 2014
    Posts:
    33
    I was wondering... I have a scene where I want to have my player spawn on start and have him follow a predefined path (with disabled input) like he is floating through space and things happen. But the way I have to bind a prefab to the LevelManager as the spawned player, I have to copy a player prefab and set the movement path component and points on the prefab and save it. Is there a way of putting in a player prefab in the scene and linking it to the level manager? So I can adjust things on my player for each scene specific without needing lots of copied prefabs? Maybe I want to disable a component in a certain scene or set different parts for speed etc.
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Emphy > It'd be much easier to simply have a class do that binding on Start.
    You can get the LevelManager's current player easily, and then associate it to whatever script you want.
    Of course you can also get rid of the LevelManager altogether, and have your object in the scene, but if you expect other systems to work you'll have to do all bindings manually, which can take time. I'd recommend the first solution, one line against many :)
     
  17. Emphy

    Emphy

    Joined:
    Feb 7, 2014
    Posts:
    33
    That's a solid idea, probably indeed the best solution. I did the same for my ProCamera2D plugin, I bind that camera to the LevelManager instead of Corgi's camera.
     
    reuno likes this.
  18. Lubeaz

    Lubeaz

    Joined:
    Aug 12, 2016
    Posts:
    6
    Hi there! It's there a way to have like "Save Points" instead of CheckPoints? For example: I'm trying to set up a Boss Fight. It will chase the Player on sight (with the script AI Walk) and destroy obstacles on it's way. The problem I'm having is that when the Player dies during the chase, it simply respawn due the checkpoints, but every other element of the level just keep going (the boss stays in the last point it was when the player died, for example...so you can't try to beat him again). It's there a way I can "reset" the level, spawn the player in the last checkpoint and keeping the stats (like a life lost, points, health...)?

    PS. And no, Auto Respawn is not enough, it's not working for me. Thanks!
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Lubeaz > There is no such feature right now. It'd be tricky to build that into the engine directly, as that's really something that'd differ from game to game. What you decide to save, and how, is hard to address at a generic level.
    The way I'd do it would be to have a LevelStateManager (or any other better term for it) that saves, on demand, the properties (position, health, etc) of the objects you're interested in (likely using the provided SaveLoadManager) and then instantiates (if needed) and sets these values back when loading the scene.
     
  20. Lubeaz

    Lubeaz

    Joined:
    Aug 12, 2016
    Posts:
    6
    Thanks for the quick response! Yeah...I was playing a bit with the SaveLoadManager and even with MMGame Events. But it requires more code knowledge than I'm capable right know. I just wanted to save the player progress until the last checkpoint, like many platform games do hehe... Well, it's ok. I'll try my best. Thank you again!
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Lubeaz > It's not the easiest task to tackle, for sure :)
    But it's an interesting one.
     
  22. TheAngryTophat

    TheAngryTophat

    Joined:
    Apr 13, 2018
    Posts:
    6
    We were having an issue with it throwing errors. There was some sort of association issue. It's not happening anymore.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @TheAngryTophat > I'm glad it's working now then, thanks for letting me know!
     
  24. UnityIco

    UnityIco

    Joined:
    Jan 5, 2017
    Posts:
    18
    A quick question. Is it necessary to buy a unique corgi engine asset for each member on the project?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @UnityIco > as explained in the asset store's terms and conditions :

    2.3.1 EXCEPT FOR EDITOR EXTENSION OR APPLICATION ASSETS, END-USER is granted a license to install and use Assets on an unlimited number of computers provided that these computers are either all (a) physically located at a single physical location ("Site") belonging to END-USER, or (b) laptops belonging to END-USER which have been made available by END-USER to its employees that are employed at the same Site provided all such computers have appropriately licensed Unity software installed. Consequently, any Asset may only be used at particular Site or on computers assigned to END-USER's employees employed at the same Site and may only be moved to another Site subject to prior written approval from Licensor.

    Short answer : no, you don't need to buy a license per seat in most situations.
     
  26. MisterDeum

    MisterDeum

    Joined:
    Apr 14, 2015
    Posts:
    24
    Hello @reuno, How do you unforce it ? Commenting it out doesn't work, setting it to false doesn't work.
     
  27. MisterDeum

    MisterDeum

    Joined:
    Apr 14, 2015
    Posts:
    24
    Oh ok, for people having a conflict with a mouse cursor, that just won't go away, it is in the weapon aim script that you will find a solution.
     
    reuno likes this.
  28. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    I just created basic 2.5D scene with some animations. Now that I have an idle animation, the "idle" state for the animation keeps firing all the time, so the animation is restarting all the time. Or if I press walk, then the "walking" keeps resetting the animation constantly. Is this by design or am I missing something?

    In the Corgi3DxTheHunt demo scene, the animation conditions are triggered only once so that the animations play smoothly.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kor_ > There must be something wrong with your animator setup then. Especially the transition to Idle. I'd guess its transition to self setting is wrong. Note that the animator is just native Unity, and you'll find plenty of info on how to setup your animations and transitions on Unity's website.
     
  30. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    I guess there might be something wrong with the animator setup. I was just comparing my animation controller's behaviour to the Corgi3DxTheHunt's and in the Corgi3DxTheHunt animation controller the "walking" state is triggered only once and the animation plays smoothly. And as the state ("walking") itself is part of Corgi and the animation controller only listens to the changes in it, I thought there could be something wrong with my Corgi setup.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kor_ > All the engine does is update the animator parameters, the rest is outside its scope.
    As long as you see your current state (Idle, Walking) to true when you're in that state, the engine's working correctly and your character setup is likely alright. All there is to tweak is your animator.
     
    kor_ likes this.
  32. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    Just if someone else has this problem, I had the "Can Transition To Self" checkbox checked, which meant the the transition was re-occuring all the time. Also I had to tune the Transition Duration and Offset to get the animations right.
    Thanks for the help!
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kor_ > That was a lucky guess then :)
     
  34. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    I would also like to be added to the list of people who request that as a feature. Also, while on the subject of the gravity zones, I'm noticing that my weapons won't flip orientation to match the orientation of my character. For example, when I walk into a gravity zone with -8 gravity my character flips upside down and will be facing right, but the gun is still right-side-up and facing left. Am I missing something there, or is that not a feature (yet).
     
  35. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    Just an update. So I'm noticing that it does it when I have the weapon aim script added to the weapon which poses a problem if you have set a min and max angle.
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @pjooren > Gravity and weapons will work fine, but yes if you constrain to certain angles and flip these angles will remain. I'll add your vote to the push/pull in gravity zones.
     
  37. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    @reuno I need an ability that we could call "Suck", like the vampire suck: the player press something, the character does a movement like dash and, if within a distance meets a "suckable" enemy, starts a sequence where the player stops and drains some life from the enemy and the enemy blocks while is sucked. That sequence could go on if the player keeps pressing repeatedly the key, anyway the ability activated should depend from both player and enemy.
    I'd like to make it an ability, but it's a combination of movement (like dash) and attack (like a melee weapon) plus some logic to do the rest, and at least a component/ability on the enemy too.
    Any advice? Maybe it's something you could insert in the todo list :)
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @luigi-freguglia > I have to admit that's the first time something remotely like this is requested. It's extremely specific. I can add it to the todo list but I doubt it'll ever reach the amount of votes needed to make it into a release :)
    But yeah it's a dash and an attack, mostly. You seem on the right path.
     
    luigi7 likes this.
  39. pjooren

    pjooren

    Joined:
    Apr 12, 2017
    Posts:
    14
    Ok. Got it. So then here's the issue I'm having. I was using the weapon aim script and setting the min and max angle on a grenade launching weapon to a specific angle so that I could get a nice lobbing effect for the projectile. That's why the gravity zone not flipping that angle is becoming an issue. If there were another way to control the angle of the weapon or the angle the projectile leaves the weapon, that would solve my issue, but everything I've tried isn't working. It's like without the Weapon Aim script, the gun and projectiles are fixed to the x axis.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @pjooren > Indeed without weapon aim you can't aim.
    That said you there are multiple ways to do what you're after and have a fixed angle to shoot at :
    - extend projectile weapon to apply that angle on shoot directly
    - use weapon aim in script mode and have another script on that weapon apply whatever angle you want at all times or on shoot depending on what you're after
     
  41. unity_WTEvCxdsc-hr5g

    unity_WTEvCxdsc-hr5g

    Joined:
    Mar 29, 2018
    Posts:
    4
    Hi! I love the asset!
    This is really incredible and fast i was thinking... maybe better tutorials or more especific it may be necessary.

    I have a bug... When you are atacking and you move sometimes the character doesn't play de animation but the atack execute anyway.
    There a solution?
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @unity_WTEvCxdsc-hr5g > If an animation doesn't play it's usually an animator issue. There must be something preventing your transition to death to play. Fixing your transitions settings will get rid of the issue. You can learn more about Unity's animator on their website, it's just standard Unity at this point. The usual suspects are usually transition times and "has exit time" settings.
     
  43. unity_WTEvCxdsc-hr5g

    unity_WTEvCxdsc-hr5g

    Joined:
    Mar 29, 2018
    Posts:
    4
    In fact, it happens in all the demos that the asset brings :/
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @unity_WTEvCxdsc-hr5g > If you think you've found a bug, please use the support form to report it, and provide repro steps, I'll be happy to have a look at it.
     
  45. kor_

    kor_

    Joined:
    Mar 15, 2018
    Posts:
    7
    This might be a simple question, but why is my 3D model in the 2.5D level facing away from the screen? The rotation is the same as in the "Soldier3DRed" (also changing the rotation of the models doesn't do anything; it's always facing away from the screen). Should I rotate the model with Blender etc?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kor_ > You should nest your model, as explained in the documentation, and as shown in all the 2.5D examples provided with the asset. It's probably the issue here, but without any info it's quite hard to tell what's wrong. Please use the support form from now on, and provide some details / screenshots, thanks.
     
  47. Psishe228

    Psishe228

    Joined:
    Dec 2, 2018
    Posts:
    4
    Hello, I came across a rather tangible problem and I don’t know what this may be connected with. At levels above the average, with a large number of different elements, after leaving the pause there is a noticeable lag. If you minimize the game and do not enter for a few minutes, it may stop altogether when opening it. It was checked on 6 different machines and everywhere the same problem. Perhaps the reason is something simple and you can help me. Thank you in advance! I use a Unity 2018.4 and a Corgi Engine 5.5
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Psishe228 > Please use the support form if you think you've found a bug, and provide steps to reproduce your issue, thanks! I'd need more details here, such as what you mean by "lag", or on what kind of build you're running into this, for example. All the pause does is set the timescale to 0, and if you look at the profiler you'll see that not much happens afterwards, or on unpause. If you could provide more data of what exactly happens that'd help start to understand what your issue may be.
    It's also unlikely you're running v5.5 of the engine on 2018.4, as it requires 2019.1.
    In any case, the more info you can provide via the support form, the best I'll be able to help.
     
  49. Psishe228

    Psishe228

    Joined:
    Dec 2, 2018
    Posts:
    4
    I was able to solve my problem, it came from the big unity tilemaps, I forgot to use the composite collider, everything works as it should, thanks!
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Psishe228 > I'm glad you figured it out, thanks for letting me know!