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

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I've used XPManager before....that would probably work on Corgi. That said, the engine includes a points system as well as achievements and events - pretty sure you could hack something using those.
     
  2. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    your game looks great. thanks for posting updates...it gives me some ideas for my own.
     
    steelhamsterstudio likes this.
  3. steelhamsterstudio

    steelhamsterstudio

    Joined:
    Mar 15, 2018
    Posts:
    29
    @Mindjar Thank you! Right now I don't have any devlog because there is a lot of unknown stuff in-game mechanics. I'm going to make some streams maybe in future when I finish all core gameplay aspects. I can provide at any time iteration/drawing/animation because I can, but C# modifications, creating new abilities, implementations of the corgi engine and deep learning how it works taking a lot of time from me.
    @reuno Thanks! I hope the next video will be more mind-blowing. ;)
     
    reuno likes this.
  4. henkesky

    henkesky

    Joined:
    May 23, 2015
    Posts:
    36
  5. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    I know the pain :) I'm also struggling with writing new scripts... Graphics are the easiest part. By the way - how did you managed to make the roll ability? I've tried, but I get wierd results... :(
     
  6. steelhamsterstudio

    steelhamsterstudio

    Joined:
    Mar 15, 2018
    Posts:
    29
    @Mindjar It takes some time but I took dash ability and replaced all distance checks by 1 Timer - time for roll animation. and I removed all gravity blocks and slope/wall collision reset function. And it starts work well without any frizes, Ow and I added invincible for the roll to avoid any damage.
     
    Mindjar and reuno like this.
  7. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    @steelhamsterstudio Thanks for the answear. I've tried to make something similar and used:
    Code (CSharp):
    1. _characterHorizontalMovement.SetHorizontalMove(_computedDashForce);
    but I have strange behaviour - the roll is short when the character is on the ground and very long and fast when used from higher ground...
    @reuno - what am I doing wrong or what would be the best approach?
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Mindjar > I don't know. Out of context that line doesn't mean much so it's hard to answer.
    I'd suggest following @steelhamsterstudio's approach, it's probably how I would have done it as well.
    Look at the Dash ability for reference, and experiment.
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Good news everyone, I just submitted v5.1 of the Corgi Engine to the Asset Store.

    This new version comes with a bunch of new features, the biggest of them being the ability to now switch your character for another at runtime, either by swapping just the model, or by swapping the prefab itself. It'll also introduce an ability to handle a secondary weapon, abilities and actions to have characters follow a path, and more.

    Here's a video tutorial that explains most of the new stuff :



    Here are the full release notes :
    - Adds a new CharacterHandleSecondaryWeapon ability, that allows for easy handling of two weapons at once. Can serve as a basis to handle more than that if needed.
    - Adds the CharacterFollowPath ability, allowing a character to move while following a path made of multiple nodes. Offers the same settings as a moving platform.
    - Adds a new AI action : AIActionFlyPatrol, allowing your character to move along a path made of nodes and change direction when hitting a wall/obstacle.
    - Adds a new class, the CharacterSwitchManager, allowing you to switch between different character prefabs
    for your playable character at runtime, just by pressing a button.
    - Adds a new ability, CharacterSwitchModel, allowing you to switch your character's model (not the prefab, just the visuals) at the press of a button, at runtime.
    - Adds a new scene, the MinimalCharacterSwitch scene, showcasing how you can switch between prefabs by simply pressing P.
    - Adds a new scene, the MinimalModelSwitch scene. This one showcases how to switch model (not prefab) at runtime.
    - Adds an option to rotate a character's model when it changes direction instead of playing on its scale
    - Adds an option to have a movement multiplier applied while a Weapon is equipped (and not just used)
    - Improves slope stickyness when StickToSlopes is enabled on the Corgi Controller. Now handles "peaks" much better.
    - The SoundManager's MusicOn/Off methods now also mute any currently playing music if needed
    - Adds overridable methods to determine whether an object can be equipped or used
    - Adds bindings on the mobile buttons to trigger interactions.
    - Adds default values to some AnimationCurves that didn't have one (MMProgressBars in particular)
    - Fixes a case where a weapon's multiplier wouldn't be properly reset if the weapon was in auto mode
    - Fixes a bug that could cause erroneous binding to multiple animators with combo weapons
    - Prevents a bug that would allow a character to jump while in a tunnel instantly after entering it
    - Fixes the mouse cursor setting on the CorgiMachineGun
    - Fixes weapon initialization issues in some edge cases
    - Forces cursor visibility in the GameManager to prevent cases where the cursor would remain hidden.
    - Fixes a case where the melee weapon's setup gizmo wouldn't be shown in scene view
    - Fixes a bug where an unequipped weapon wouldn't be removed from the character properly
    - Fixes a missing component in the RetroAdventure demo scenes that prevented proper pause management

    As usual, expect a few days/weeks for it to be accepted. I hope you'll like this new version!
     
    Meowx, Grafos, NEHWind2 and 4 others like this.
  10. steelhamsterstudio

    steelhamsterstudio

    Joined:
    Mar 15, 2018
    Posts:
    29
    Holy Moly! @reuno Did it mean I can finally merge Magic/Melee/Throwing Weapon/Guns in one fully customizable Fight system? I Just can't believe in all of this new features! Thanks for such a big and useful update!

    I almost finished damage system so when it will be ready I start learning this new multipleWeapon ability! And I think new gameplay video will be brutal!:D
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @steelhamsterstudio > Technically the secondary weapon thing is nothing new, it was already doable, but now you'll have an example. I got so many requests for that example (more than 400) that I didn't really have a choice but to include one :)
    Can't wait to see what you'll do with it!
     
  12. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    Your game looks pretty nice. I like the character designs and animation. It'll be great once you get the backgrounds in.
     
    steelhamsterstudio likes this.
  13. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    I am getting close to finishing the first beta version of my game. Just trying to polish things here and there.

    I was wondering if anybody was having the same issue with checkpoint respawning that I am currently having. My character goes into the fall animation state when he is not grounded and the vertical speed is negative. So in order to have him grounded on the respawn, I copy the Y-axis value of my player while he is standing at the checkpoint respawn point. I then paste that value into the Y-axis value of the checkpoint. Since there is no Y-offset in the boxcollider on the player (Boxcollider should be centered) the player should respawn with his feet firmly on the ground. However, I find that sometimes the player respawns firmly grounded. Other times he respawns slightly off causing the fall animation to play for a single frame. I guess it's not a big deal, but it is annoying and amateurish seeing that stutter sometimes when the player respawns.

    Has anyone else dealt with this problem? If so, how did you deal with it?

    Thanks

    Edit: Well, I figured out a dirty solution. I simply set a bool condition "preventFall" for the fall animation to not play if it is true. Then I turn "preventFall" to true on the revive and turn it to false again after the player is firmly grounded. It gets the job done, but I dislike doing things this way, so if somebody has a better suggestion, I'm all ears.
     
    Last edited: Aug 20, 2018
  14. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    Almost forgot to mention. If anyone is looking for an asset that will work with the Corgi Engine for controller mapping, I would definitely go with Rewired. I looked into this a few weeks ago, and even though Rewired is one of the more expensive options I think it is well worth it.

    Documentation wise, I didn't see anything else that came close to Rewired. I was also having a problem doing button swapping with the control mapper, and Augie spent a week with me going back and forth on trying to fix the problem. In the end, he did find a bug and fixed it promptly. That's great customer support.

    Rewired saved me a bunch of time and effort that would have been spent on self programming an inferior alternative. The only thing I would recommend is that you install it only if you are near the end of finishing your game, not at the beginning. For some reason, Rewired makes it so that when you make changes in your code, it takes longer for the code to update in Unity which means more staring at that spinning progress wheel. It is a known but I think unavoidable issue. Other than that, it's worked for me really well as far as keyboard input is concerned. I will test it with a game pad soon.
     
  15. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,632
    Thanks for the kind words! (If you haven't already, posting them as a review would be nice! :)

    The issue is documented here:
    http://guavaman.com/projects/rewired/docs/KnownIssues.html#increased-compile-play-time-editor

    And in a nutshell, it's really nothing more than a consequence of the ridiculous number of controllers Rewired supports. Double-edged sword. You support every controller under the sun, turns out it has a cost when using Unity's serialization system is used to store that data (in the editor only). The only way I could fix this is to completely rewrite all data storage to not use Unity's serialization system and rewrite all editors to work with my new system and not Unity's. Big job, requires data converters for anyone who has made custom definitions too. I want to do it at some point because I absolutely hate this thorn, but there are other more pressing things on the to-do list.

    I would not recommend adding Rewired late in the project. There's a way better solution to making development time faster. Just pare down the list of supported controllers until you're ready to release. The fewer controllers supported, the less the delay when the app domain is rebuilt. Just click the "ControllerDataFiles" field in the Rewired Input Manager inspector which will take you to the default ControllerDataFiles object in the Rewired directory, copy the existing ControllerDataFiles, move the copy outside the Rewired folder, link the new ControllerDataFiles in the Rewired Input Manager inspector, then go to the new ControllerDataFiles inspector and remove all the controllers you don't need while doing your development. You can pare this down to like 10 controllers (Xbox, DS4, etc.) and Rewired will add zero extra startup time.
     
    Kelgand and reuno like this.
  16. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    Actually, that sounds like a much better solution. I think I will do that. Keep up the good work!
     
    guavaman likes this.
  17. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    71
    Hey Reuno,

    I bought Corgi a few months ago and am only just getting into it now, i've gotta say it's fantastic, job well done!

    I'm working on a platformer with strong melee play so i've been playing around with the melee weapon prefab. I'd like to reproduce the basic gameplay from Hollow Knight where if you point the joystick up and hit fire you swing your sword up and when pointing down while in the air you swing down.

    I've had a look at the melee weapon script and i'm not sure where to start, can you give me some details on what the best approach would be?

    Thank you,

    Simon
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @avrigus > So that's not something that is built in right now (it's very, very specific), you'll have to implement it yourself.
    I guess you could have two different weapons, or a weapon to which you send a parameter of high or low and that acts differently based on that. It's really up to you.
     
  19. RAIN_proger

    RAIN_proger

    Joined:
    Aug 31, 2017
    Posts:
    16
    Hey, Reuno, I discovered that when fps sags some actions like dash start to work very badly. How to fix it? Is physics system linked to fps?
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @RAIN_proger > I wouldn't know about physics, it's a non physics based engine. But if your game goes low enough in FPS that this becomes an issue, I'd say you have more pressing things to fix :)
    Anyway, it's usually easily solved by playing with the raycast length. What (probably) happens in the case of the dash is that if you're at extremely low FPS, and dashing left to right, you'd be left to the wall at frame A, and right to the wall at frame B. Short raycasts would never have the chance to hit the wall.
    If the problem persists please use the support email.
     
  21. tysonwills

    tysonwills

    Joined:
    Oct 30, 2016
    Posts:
    14
    Hi Reuno
    this may sounds like a stupid question , if i have already started creating a game and you release an update to the engine how do i update my project to use the new features without doing a full import again and wiping out my development so far.
     
  22. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @reuno hey man. I'm running into a strange problem I've never had before. I'm literally just cloning projectiles that are already working and changing the sprite for new projectiles but for some reason, this one particular projectile just stays in place and I get this error:


    Code (CSharp):
    1. transform.position assign attempt for 'SurgerProjectile-0' is not valid. Input position is { NaN, NaN, NaN }.
    2. UnityEngine.Transform:Translate(Vector3, Space)
    3. MoreMountains.CorgiEngine.Projectile:Movement() (at Assets/Middleware/CorgiEngine/Common/Scripts/Agents/Weapons/Projectile.cs:117)
    4. MoreMountains.CorgiEngine.Projectile:Update() (at Assets/Middleware/CorgiEngine/Common/Scripts/Agents/Weapons/Projectile.cs:108)
    5.  
    I wondered if you might know what's going on.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @NAiLz > I've never seen this before. I'm guessing you didn't just change the sprite though (might be in how you bind the projectile to the weapon?), as it doesn't seem to be related to the sprite. It's hard to tell what the error could be without more details though.

    @tysonwills > The best way to not lose your stuff is to not modify the asset's files, but rather extend them. You'll find tons of info on that on Unity's website, and a few guidelines in the documentation as well (in the "creating your own game" section).
    If however you've modified the core files, I'm afraid I don't have any magic trick, apart from using a version control tool and diffing all files for changes, and deciding what you want to keep (I'd strongly recommend sticking to the "good way" here).
     
  24. tysonwills

    tysonwills

    Joined:
    Oct 30, 2016
    Posts:
    14
    can i just import the new script files like the enemy on paths and will they work
     
  25. kevin_Leo

    kevin_Leo

    Joined:
    Mar 20, 2018
    Posts:
    15
    Love the new-and-improved 'stick to slope' feature in 5.1! Works very well. Great job. Makes the whole thing feel truly 'tight' and much more Mario-like. Thank you!

    I'd like to put in a vote for ledge-grabs, please. :)
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @kevin_Leo > I'm glad you like the new version. And I've added your vote to the ledge grabs :)
     
    kevin_Leo likes this.
  27. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    +1 for ledge grabs
     
    kevin_Leo likes this.
  28. xpachin

    xpachin

    Joined:
    Feb 6, 2014
    Posts:
    62
    +2
     
    kevin_Leo likes this.
  29. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi,
    Has anyone tried to utilize the art assets of 2D Game Kit (which look professional ) inside Corgi?
     
  30. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Yes
     
  31. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    Is it possible to create a game like that using Corgin Engine?
    https://store.steampowered.com/app/647280/Pixel_Shooter/

    Based in the video, is it possible to create an AI that is similar to the AI used in this game. One enemy shoot againt the player, another enemy jump towards the player direction and the third enemy flies in the player direction without collide with any obstacles.

    Is it possible create AI like that using Corgin Engine?
     
  32. lufutu

    lufutu

    Joined:
    Aug 23, 2014
    Posts:
    1
    Hi,
    Can it make melee attack with "combos" and fire arrow by bow with new version of Corgi ?
    Thanks.
     
  33. myrkraverk

    myrkraverk

    Joined:
    Aug 3, 2018
    Posts:
    5
    Hi Reuno,

    I managed to work around my previous problems, thanks for the answers.

    This time, I'd like to "pause" an AI. So far I'm using the AI Walk script, and I'd like to know if there's a simple way to stop the enemy sprite from walking for a few moments? I already have have the functions to start/stop the sprite, I just need to know what to call, if anything.

    Enabling and disabling AI Walk didn't seem to have any effect, the AI keeps walking.
     
  34. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Suggestion for future release: update character animator parameters from AI Brain

    If AI Brain State = existing (bool) parameter >>>> set parameter to "true/false" as needed
    If not, add AI Brain state to animator as (bool) parameter and set to "true/false" as needed

    Or something along those lines.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @claudiorodriguescampos > I don't see anything too complex in this video, it shouldn't be a problem. I'd suggest looking at the list of features and the documentation and deciding for yourself if it's a good fit for your project or not :)
    @lufutu > There's combo support, yes. As for fire arrrows... It depends on what you mean, it seems quite specific. You can shoot whatever projectiles you want if that's the question.
    @myrkraverk > There are examples of that in the engine. Look at the RetroAI scene for reference.
    @Boom_Shaka > Suggestion noted!
     
  36. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Can you please explain to m how, and what changes you made the these assets to make them match with Corgi?
     
  37. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I'm afraid I don't understand your question. What, exactly, are you trying to do with them that you can't? Have you tried reaching out to reuno for support?
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    I'd suggest reading (or watching) the character creation tutorial. I don't know these particular assets but I'm guessing they don't have anything special that would prevent the "normal way" of creating characters to work.
     
    Boom_Shaka likes this.
  39. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    Hello, what is the best way to update this asset in an existing project?
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @knuppel > The best way is to simply remove the old CorgiEngine folder and import the new version.
    As long as you've followed good practices and extended scripts instead of modifying the lib files, you'll be fine.
    If you've modified them however there's no magic trick, you'll have to diff files like you would for any other library to decide what you keep or not - which can become quite bothersome, that's why the engine is designed to be extended :)
     
  41. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    steelhamsterstudio likes this.
  42. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Wow @reuno, nice news on the 5.1 version! Hope I have spare time to play with it soon.
    Just curious, how high is the sliding/rolling hability request on the ToDo list?

    Cheers.
     
  43. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    @Muppo - If you want I can send you a working script of this ability, just PM me.
     
    Boom_Shaka likes this.
  44. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    holy crap @reuno, another big update already! I'll be making good use of a few of those things; that saves me time on playing around with the code! can't wait!
     
  45. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Muppo > It's quite low.
    @Meowx > I'm glad you like the update :)
     
  47. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    I was fiddling around with optimizing my game the other day when I noticed something. For some reason, the OnTriggerStay2D function to see if the player is contacting a ladder triggers a 6.0 KB garbage collection periodically. Doesn't happen every frame, but every so often I see a spike in the profiler. I was wondering if anybody else was experiencing this, and if so, how they dealt with it.
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ralphyua > If you think you've found a bug please use the support email to report it and provide steps to reproduce it, thanks.
     
  49. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    I'm testing arround with the Multiple Object Pooler, how can i count the objects that have been spawned?
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @knuppel > Using an int counter seems like the easiest way to do that.