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

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88

    1. Thank you
    2. I guess I was just making sure I'm on the right track. I consider myself a dabbler and not a real programmer so I like to check with seasoned folks to make sure what's in my head is on the right track. ;)
    3. Sorry you're right, I guess this isn't Corgi-specific!
     
  2. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    Not sure why I was being such a noob but yes, I simply referenced the Character script (private Character character then character = getComponent<Character>(); inside OnTriggerEnter2d) then private string playerID = character.PlayerID. And finally, if(Input.GetButtonDown(playerID + "_Jump")) to check for that specific player's input and voila! Easy. Seriously can't say enough about Corgi's elegance and easy extendibility.
     
    reuno likes this.
  3. ChrisuIndy

    ChrisuIndy

    Joined:
    May 17, 2017
    Posts:
    4
    Got the collision and pushing between players working with multiple player layers and a lot of hacking around. Aaand I am still having a lot of fun messing around. ;)


     
    NAiLz and reuno like this.
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    I'm working on the next version right now, and going through my list of things to fix and small features to add. Somebody requested the possibility to add an horizontal force to wind zones. I can't find who asked for that, so I can't contact that person, so here's the answer for everyone : it's actually already possible.

    All you need is a classic "wind zone" (so that's a trigger boxcollider2D + an optional sprite + CorgiControllerPhysicsVolume2D with (usually) a positive gravity. And then all you need is add a Surface modifier to that, with (for example) a positive x force. Combined, these two should allow you to tweak the perfect wind. Alternatively, a simple box collider set as trigger, volumes layer, and custom forces should do the trick too.
     
    Plott, Zehru and NAiLz like this.
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Just a quick update to let you know the next release is coming along nicely.
    I started work on an inventory system around a year ago. In the meantime I started over 3 times, and I can now confidently say this time is the right one. I've found a way to do it elegantly and with enough modularity that it can fit tons of different gameplays. I'm gonna need beta testers soon, so if you're into inventories and don't mind getting your hands dirty (it's not entry level stuff, and the documentation is not ready yet), drop me a line.

    Inventory will come with quite a few new features too, especially for weapons.

    Here's a sneak peek:
    upload_2017-7-7_15-17-42.png
     
  7. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    woot nice asset.

    Is include rope system for 2D and 2.5D ?

    +++
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,688
    Can you please include a way to give and take items via code? The Dialogue System has an integration package for Corgi, and it would be great if it could give and take items in conversations, such as turning in quest items and receiving rewards.
     
    Muppo likes this.
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @TonyLi > The new inventory system will come with a complete API. Everything you'll be able to do via the GUI will be easily scriptable. And of course adding/removing items from an inventory is the most basic action you can do :) So getting items from a dialogue will be super easy to do.
     
    Muppo, limo and TonyLi like this.
  11. Luremaster

    Luremaster

    Joined:
    Dec 17, 2016
    Posts:
    9
    Thats what im waiting for!!!
    If you include a minimap system too, corgi will have everything a Metroidvania need out of the box!!!
    Keep the good job!!!
     
    NAiLz and reuno like this.
  12. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    I actually had an inventory system a few items down on my list of things to work on so I would love to help beta test this.



     
    reuno likes this.
  13. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    Yes! Mini-map would be awesome! I'mi going to be working on one in the meantime using a different camera and render layers. I'll post results in here if you're interested.
     
    Muppo and reuno like this.
  14. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    Has anyone tried making pushable block affected by the surface modifier script? I haven't delved too deeply into it yet but I tried placing the block into a parent object which had the CorgiController script on it along with a BoxCollider2D trigger to see if the surface modifier script would register and move it but it didn't work.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @NAiLz > No that's not gonna work, that's not what it's been designed for. If you just look at the code (or the comments) you'll quickly understand why. I wouldn't recommend doing that either, you'd be better off using a physics engine for interactions like that, that's what it's for.
     
    NAiLz likes this.
  16. fbarboza

    fbarboza

    Joined:
    Jun 5, 2017
    Posts:
    8
    Greetings!

    Does anyone made some kind "Death Implementation". Example: The AI dies, play the death animation and keep the corpse on the floor.

    Regards,
     
    Last edited: Jul 9, 2017
  17. Deleted User

    Deleted User

    Guest

    It´s time to get the corgi engine :) As I see, you put lot of effort into this engine. I want to encourage you to continue the great job. Thank you so far.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    You're welcome! I hope you'll like it!
     
  19. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    There's probably a more efficient way to get it done, but I do it by spawning the dead enemy graphics as a part of the Death Effect in the Health component.
     
    karmik likes this.
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @NEHWind2 > It's actually quite clever! I'd say the "best" way would be to extend and override Health to add this feature but using the DeathEffect for that is much quicker and gives a very similar result.
     
    NEHWind2 likes this.
  21. joshua121

    joshua121

    Joined:
    Jan 31, 2015
    Posts:
    7
    I was wondering if anyone else has tried to do this and if so could you share some wisdom as to how I can accomplish it?

    I'm trying to make a Metroidvania type world and what I need at the moment is to be able to move the character from scene to scene and retain certain check points in the scenes.

    Say for instance, level 2 has two doors; one door goes to level 1, and the other to level 3, if I go to level 3 and then return to level 2 I want to spawn at the corresponding door, vice versa if I go to level 1 and return to level 2 I want to spawn at that door instead.

    I'm using playmaker because I have no idea how to code

    I've made a trigger on each door that updates an integer when you touch it, I have also made a state machine that saves that integer. The next state machine checks the integer the next time the scene loads and the final state machine sets the debug spawn to the one that corresponds to the integer.

    This only seems to work if I put the FSM on the game manager object, otherwise the game loads before my state machine has a chance to fire.

    This works if stay in the same level and restart the game, but if I actually go to another level, the game manager item is not destroyed on load everything falls apart.

    This seems like it should be very simple to accomplish but I'm getting very frustrated after about 8 hours of trying to figure out how to do this. I sincerely wish I knew c# but I just can't wrap my head around it.

    Any help would be greatly appreciated.

    Thanks.
    Joshua
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @joshua121 > I've never used Playmaker so I can't really help here, but a few things :
    - that feature is very high on my todo list (a lot of people have requested it) so I plan to include it in the next update (or the one after that).
    - my current idea for implementing it is to use a stack that will save all doors your character goes through, and that lets the LevelManager know what point to spawn the character at on load
    - spawn in a level is done by the LevelManager, and by its SpawnSingleCharacter method (or SpawnMultipleCharacters if you're going for a multiplayer scene). This is called at Start. The best way to do it would be to override that method to check if there's a saved point in your state machine. I'm afraid I don't know how to do that in Playmaker though, only in C#.
     
  23. joshua121

    joshua121

    Joined:
    Jan 31, 2015
    Posts:
    7
    Thanks for the reply.

    I think I'll just have to wait for the update. I just can't see a way to make this work simply.
     
    Last edited: Jul 14, 2017
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @joshua121 > Again, I don't know how it works in Playmaker, but it's a public variable. It's a one liner :
    DebugSpawn = YourSpawnPoint;

    Edit : YourSpawnPoint needs to be a Checkpoint, of course.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Last call for the Inventory beta test! I'm sending out invites tonight, and have still room for 2 more testers.
    Drop me a line if you're interested.
     
  26. Cloggin

    Cloggin

    Joined:
    Feb 13, 2017
    Posts:
    7
    I may have missed a clarification on what @ChrisuIndy was experiencing, but I seem to trigger it, too, in two instances:

    (1) A pushable block, pushed up against a player (whether the player is between a 'rock and a hard(-pushable-block-)place' or if the pushable object is slightly above the player), and

    (2) If a player is on a platform or slope, the 'seem' between two platforms, when hit/walked-through at the correct angle, the player falls through (and otherwise) solid platform (i.e. not a one-way platform).

    Should I be building my objects larger (to resolve (2) and minimize seems) and is there some functionality or script that I should be focused on to dictate when a player is being squeezed in a confined space they should either stop their X/Y/Z movement all together or be directed along one of those axis when being forced out of the confined space?
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Cloggin > I answered @ChrisuIndy right below his post.

    The Corgi Engine is not a physics based engine. That's actually the whole point of it. This means that for physics interactions like the ones you describe, you need to let it know what you actually want to happen. Maybe you'll want your player crushed, maybe pushed, etc.

    As for what scripts to look for, it all depends on what outcome you want to implement. Either on the block's side or on the character's side. The engine's controller (CorgiController) and its states will provide you with all the info you need to detect these situations and act on them.

    As for the seam between two platforms, I don't think it's related, but I don't reproduce it. Is there anywhere in the demo levels where this happens?
     
  28. Mat_Williams

    Mat_Williams

    Joined:
    Oct 30, 2013
    Posts:
    2
    I'm working on on a game in which the player can control three different characters. Basically they can click or tap on a character and take control of it. When not under control of the player the character reverts to a simple AI.

    I can't figure out how to get Corgi to give control to the new character upon selection and take it from the previous character. I can turn on and off the AI follower state, and switch the character from an AI character to Player character, and set the player ID. If I start the 3 characters as Players they always all get input. If I start them all as AI, I can toggle their AI state, but never give them input.

    When they become active I do this -
    Code (CSharp):
    1. myCharacter = theTarget.GetComponent<Character>();
    2. myCharacter.CharacterType = Character.CharacterTypes.Player;
    3. myCharacter.GetComponent<AIFollow>().enabled = false;
    4. myCharacter.SetPlayerID( "Player1");
    And to disable I do the inverse more or less
    Code (CSharp):
    1. myCharacter = theTarget.GetComponent<Character>();
    2. myCharacter.CharacterType = Character.CharacterTypes.AI;
    3. myCharacter.GetComponent<AIFollow>().enabled = true;
    4. myCharacter.SetPlayerID =( "Follower");
    I suspect I need to rebind the inputmanager or Players somehow, but can't find where that connection is maintained or stored. I can probably brute force it but settign up two characters for each and activating/deactivating them vs. modifying the objects attributes, but that feels wrong.
     
    Last edited: Jul 16, 2017
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Mat_Williams > There's no "official" support for that (it's on the todo list though), but yes, activating them like you did is just half of the job. You then need to let the LevelManager know who they are. Looking at how it's done at init should put you in the right direction.
     
  30. Mat_Williams

    Mat_Williams

    Joined:
    Oct 30, 2013
    Posts:
    2
    The issue was actually rooted in assigning input managers to the character abilities I had to change the following to get it to work -

    in CharacterAbility.cs I added a simple function to update the input manager, as it was only done at initialization -

    Code (CSharp):
    1.         public virtual void ReSetInput()
    2.         {
    3.             _inputManager = _character.LinkedInputManager;
    4.  
    5.         }
    And then in Character.cs I modified the SetPlayerID to update all the characters abilities -
    Code (CSharp):
    1. public virtual void SetPlayerID(string newPlayerID)
    2.         {
    3.             PlayerID = newPlayerID;
    4.             GetInputManager();
    5.             foreach(CharacterAbility ca in _characterAbilities)
    6.             {
    7.                 ca.ReSetInput();
    8.             }
    9.         }
    So far seems to be good. Resetting the camera to the proper player was easier.

    Cheers.
     
    reuno likes this.
  31. Cloggin

    Cloggin

    Joined:
    Feb 13, 2017
    Posts:
    7
    I wasn't 100% sure if my experience was engine vs physics based. I'll dive back into the CorgiController for the player-elements in question.

    And after reading your note, I tried for a solid 10 minutes to trigger this occurrence in the (Minimal) demo and wasn't able to recreate the issue. On that basis alone I'd agree and say what I'm experiencing is implementation related, on my side, than a bug with anything in core framework.


    Hey and thanks for the quick reply :)
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Cloggin > Just to be clear regarding the "seam between platforms" thing : I'm not saying there isn't a bug (there may be), but I'd need to be able to reproduce it to see it and fix it. Please let me know if the problem persists!
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Great news everyone, I've just submitted v4.0 of the Corgi Engine to the Asset Store!
    As usual, expect somewhere between a few days and a few weeks for it to be available, due to Unity validation time.

    It's a major update, that introduces the Inventory Engine, an inventory management solution I've been working on for close to a year now. It's finally out of beta test, and I got great feedback on it. It'll be available as a separate asset too, but don't buy it if you already own the Corgi Engine, you'll already own it. I wanted to give something back to all the people who've supported the Corgi Engine since its inception, so there it is.

    Here's a (very bad quality) gif of what it looks like in the Corgi Engine :



    Of course it comes with a complete documentation (and video tutorials this week too), and it'll allow you to implement (persistent) inventories and items in your game. This also brings ammo and reload mechanisms to the weapons of the Corgi Engine, and opens the door for a lot of sweet new features that required an inventory to be implemented correctly (key and chest for example).

    Here are the complete release notes :
    - Adds the InventoryEngine, a complete inventory management solution, that will allow you to create inventories, store items in them, pick items, use them, equip them, drop them and more.
    - Adds a new AmmoDisplay class, to display a bar and text elements showcasing the current state of your weapon's ammo
    - Adds reload, ammunition type, magazines and no ammo left mechanisms to weapons, complete with sfx and animation
    - Adds a new Character Ability : CharacterInventory, to link inventories to a character (player or AI)
    - Adds a new shortcut method to switch weapon between all the weapons in your inventory
    - Adds a new Timed Auto Respawn option, allowing you to respawn an object (enemy, crate, whatever) a certain amount of time after its death
    - Adds a new demo scene : FeaturesInventory, showcasing how inventories and items work
    - Adds a new demo scene : FeaturesWeapons, showcasing how weapons and ammo work, and how to combine them with the new InventoryEngine.
    - Improves Corgi3D demo scene's camera and enemies
    - Adds events to most GameManager methods so other classes can listen to these too
    - Characters can now be pushed off a moving platform when hit by an obstacle.
    - Objects pools can now mutualize their waiting pools to avoid unnecessary duplicates
    - Fixes a platform's collider in Mesa1 that could cause weird glitches
    - Fixes an issue with MMDebug.Raycast3D's direction

    There's also a new release trailer that showcases some of the new stuff. I'll put more detailed videos out this week to showcase the new stuff.



    Note that this new version requires Unity 5.6.1 or above, so if you update and don't get the inventory and all the new features, make sure your Unity version matches the requirements.

    I hope you'll like this new version! As usual, backup your project before updating. Remove the old version before importing the new one, and let me know if you find any weird bug. Or regular bug. Any bug.
     
    Bhanshee00, Muppo, Zehru and 5 others like this.
  34. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Iventory????? awesome!!!!
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Right ? It's been at the top of the most requested features for a while, so I'm glad it's in the package now.
     
    rrahim likes this.
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Here's a video showcasing some of the new stuff and explaining how it works :

     
    NAiLz and rrahim like this.
  37. Deleted User

    Deleted User

    Guest

    Will Unity inform me about the availability of the new version? When I toggle to Download Manager, I see v3.3 but I don´t know wheter it just says me what I do have or wheter it also will show me new versions if they are available. My first Asset Import so far...
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Skari_u > If I'm not mistaken, you get a notification in the asset store when the update comes out, and an email from Unity in the following days. Plus I usually post here to announce it.
    As for what version you actually have, you can see that in the readme file or at the bottom of the StartScreen scene.
     
  39. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    I'm not sure what I like the most: ammunition weapon system or the ability of carriying stuff on a inventory. This is a great update and opens wide the engine posibilities. I love it <3
     
    reuno likes this.
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    The 4.0 update is live!
    By the way I've tested it with the latest version of Unity and it works just fine, if you're wondering.
     
  41. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Ok, not sure what's happening but I'm on Unity 5.6.0, refreshed the Corgi download, imported it on a brand new project and... nothing about inventory exist. Also the read me show "v 3.2" on the bottom.

    Any clue what I'm doing wrong?
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    Guess what question from the Corgi Engine's FAQ I get asked the most? :)

    I downloaded the asset and it's not working / I don't have all the files
    > First, start by making sure you're running the latest current version of Unity. Then try downloading the asset again.

    As mentioned in the announcing post :
    Note that this new version requires Unity 5.6.1 or above, so if you update and don't get the inventory and all the new features, make sure your Unity version matches the requirements.
     
  43. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Do'h!

    Thanks Reuno, sorry about that noobish question :D
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Muppo > It's ok, I think the fact that so many people ask this shows that the way Unity displays (or doesn't display) this information could be improved.
     
  45. SeeBaxx

    SeeBaxx

    Joined:
    May 18, 2016
    Posts:
    1
    4.0 is live in Asset Store :) thanks @reuno awesome engine and now with inventory even better :)
     
    reuno likes this.
  46. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I got 4 and like it.
    Thank you for putting the inventory into Corgi.

    Now i am searching for the latest documentation but only find one for 3.1.
    Can you point me to the right direction please?
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    The link to the documentation is in the readme.
    And in the More Mountains menu, and on the asset store's page (among other places).
    Where did you find the 3.1 documentation?

    Edit : you've got the right one, I just hadn't updated the version number on the functional doc. Sorry!
    Edit 2 : fixed!
     
    Last edited: Jul 19, 2017
  48. Chopi

    Chopi

    Joined:
    Jan 27, 2015
    Posts:
    2
    First of all just say thanks and great job !!

    I have one question, there is any way to hang the character from the ceiling like it could be done in donkey kong for example?




    I found the "Character Grip" but it doesn't make the same...


    Thanks and greetings!!
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,922
    @Chopi > That's not what the grip script is for, no.
    I reckon you could use the bi directional ladder script to handle that.
     
    Chopi likes this.
  50. Chopi

    Chopi

    Joined:
    Jan 27, 2015
    Posts:
    2
    Yep I found that I couldn't move with the grip script.

    Nice!! I could do it with it.

    Thanks!
     
    Last edited: Jul 19, 2017
    reuno likes this.