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

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    i am to a point but i am currently working on a 2d multiplayer game in photon and it is quite easy to set up but just struggling on the collisions for the game XD but thanks :)
     
  2. ancamseg

    ancamseg

    Joined:
    Aug 6, 2017
    Posts:
    3
    Thanks a lot reuno, I did not notice the else when you previously mentioned it so I thought that it was already changed, but it was for iPhone. I Made the change and it wordked.

    PD: This is a great DB about the Corgi Engine, here everyone can find almost anything about it.
     
    reuno likes this.
  3. Sofiel

    Sofiel

    Joined:
    Aug 6, 2017
    Posts:
    60
    Excellent! Thanks again reuno!
     
  4. Plott

    Plott

    Joined:
    May 12, 2014
    Posts:
    94
    It was me! Thanks @reuno your awesome, I didn't think of doing it that way
     
    reuno likes this.
  5. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    Hi Reuno,
    Spent all day trying to figure out how to lock the aspect ratio of the game in stand alone mode while still being able to resize the window with no success. I found a solution that worked inside of the editor. When I changed the aspect ratio of the screen to something like 4:3, the game viewport remained in the same 16:9 ratio and black letter boxing was added. However, when I did a build of the game and played it, the window would resize to as wide as you could make it and did not lock the aspect ratio in any way. The script also seemed to cause problems with the UI Camera of the Corgi Engine. Just wondering if you were planning on putting anything in the engine that would allow the locking of the aspect ratio in the exported build. I imagine many platformers are built to specific aspect ratios that prevent the player from seeing too much of the surroundings so I'm not sure why Unity hasn't implemented an easier way to do this. If the Corgi Engine can already do this, then please excuse my ignorance and point me in the right direction. If it's not in the engine I think that would be great addition:).
     
  6. Peachanas

    Peachanas

    Joined:
    Oct 28, 2015
    Posts:
    8
    Quick noob question here, does the engine have a auto save for player data?
     
  7. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    Last edited: Aug 11, 2017
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Plott > Ah great!
    @ralphyua > No, there ain't anything in the engine for that, and I don't think there will be. It's really a generic Unity issue. You can check out the pixel perfect camera included in the asset, but I'm not sure that's what you're after. Otherwise @Bagnol's link is probably what you're looking for.
    @NinaQc > There's a save/load manager, which currently saves achievements and inventory. "Auto" doesn't mean much. It's triggered when needed if that's what you're asking. Other than that, what you decide to save is really gameplay dependent and there's no generic implementation, it wouldn't make much sense. But saving data using that manager is really a one liner so it's made as easy as possible.
     
  9. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    Thanks for the link. I tried it out, but unfortunately I am running into the same problem. The aspect ratio changes when you are in Unity with the editor. However, after I build the project with a resizable window and play it as a standalone, the window resizes without adding the letter or pillar boxing. I read somewhere that this is a mac problem. A guy came up with some code to solve it, but the code is now outdated and doesn't seem to work with the current version of Unity. I might have to make it so that the window cannot be resized freely, but the player can set certain resolutions and I will programmatically set the aspect ratio based on the resolution the user chooses.
     
  10. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    I ran into this issue a long time ago with that script. I've attached my modified version of the AspectUtility script which SHOULD fix your problem. I haven't used it in a few months, though, but I think it'll still work the way you need it to.
     

    Attached Files:

  11. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    I tried the script with the same results. It works inside of the Unity editor. However, when I go to my game build and resize the window, the aspect ratio will not lock for some reason. I think this is a mac only problem which stinks since I only have a mac. Well, thanks for trying. Hopefully I will be able to find a work around when I am closer to publishing.
     
  12. ralphyua

    ralphyua

    Joined:
    Mar 28, 2017
    Posts:
    22
    I stand corrected. I did a more fiddling around and found out that my camera prefab didn't update. Now that it is updated, the script works! Woo hoo! Thanks for the help ayk!
     
    ayk and reuno like this.
  13. BeeBop1

    BeeBop1

    Joined:
    Oct 5, 2013
    Posts:
    19
    Just curious, has anyone tried to setup a custom gravity solution to walk around spherical planets with the corgi engine? Kinda like a 2d version of mario galaxy...?
     
  14. Newbiefreak

    Newbiefreak

    Joined:
    Aug 16, 2017
    Posts:
    2
    Hi everyone i have plan to purchase this asset, but before that i have question in the description said"non physics based control" what does that mean?
    And what the advantages and disadvantages of using non-physic control are?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @elwhiteo > It's something I plan to add soon. It's doable and if you don't want to wait the way to go would be to create a new controller. Not a beginner's job though, it gets tricky quite fast.
    @Newbiefreak > Non physics based means that it doesn't use Unity's native physics engine. Instead it uses raycasts, which is something you'd find in more old school games. It usually results in a more tight gameplay, and a more predictable one, whereas physics are usually more floaty. It's also lighter on performance. Check out the features page and documentation, it explains all that in more details (http://corgi-engine.moremountains.com/)
     
    Newbiefreak likes this.
  16. Newbiefreak

    Newbiefreak

    Joined:
    Aug 16, 2017
    Posts:
    2
  17. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    In addition to the included AI, any advice about an AI asset already working with Corgi?
    I mean something about movement and something about fights.
     
  18. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    @Newbiefreak :
    A while ago I did some physics 2D testing. it can work hand in hand with corgi but I found out that it's very cumbersome.

    Imagine logs on a water.
    How fun is it to toy around with the 2D effectors so logs have buoyancy on water areas.
    Unfortunately, corgi does not support jumping on the log and have the log pushed downwards.

    What you can do however is have a raycaster towards the log, and when the player is standing on that log.
    To apply a downwards force to that log. Is it performant? I have no idea. it worked in my tests.

    You can find out where the player is "standing on" due to its public variable. it's in the character controller script

    /// gives you the object the character is standing on
    public GameObject StandingOn { get; protected set; }
    /// gives you the collider the character is standing on
    public Collider2D StandingOnCollider { get; protected set; }

    That's also why I'd love to see a similar set up for left / right / up so you can check out of the box if the player is touching something on all directions. When these are added to the corgi engine you can at any time figure out what objects corgi is next to, under, or on. As I always forget to create this when I test out new features for my game (I use blank new downloads of the corgi engine and ship working code to my main project)

    My humble advice is for now to create a custom script that you put on your player and return the object you are looking for in which direction.

    This idea was also tested with springs and joints for ropes (which is a lot more tricky to work, but it does)
    When you apply the ladder script than on the rope, you can actually see the beginning of a nice physics rope.

    Using the exact same idea I made a custom footstep sounds manager that grabs the colliding object and picks the appropriate sound to play. Instead of adding sounds to each and every game object. Mud surfaces, grass, rocks...
    I open secret areas or whatever your imagination can do having the corgi player be self-aware of it's colliding objects in all directions.


    @luigi-freguglia
    I was about to ask a similar question.
    You could check out https://www.assetstore.unity3d.com/en/#!/content/34110
    Which is an okay package but it doesn't contain the fighting.
    You will have to look in the scripts and create patterns yourself.

    But a lot is there to start.
    For example, you could create a custom script that first lets the enemy fly, then bounces around. etc.

    But all in all, it's good to learn from but not really flexible because you either have to set waypoints or triggers for them to walk/bounce around. Not that it's a bad thing. But in terms of creating fights with this asset, you'll need to tweak quite a bit.


    This last part was long in the making.
    I thought to focus one post with a few suggestion instead of writing a reply on quite a lot of similar questions.Pardon me for the potential long read. haha

    @reuno:

    What would be the chances of adding a few more enemy/behaviour types?
    I do see them as extensions upon the shipped behaviour: walk/move on sight. So they can be combined.
    A feature I truly miss right now: an enemy can either walk or move on sight.
    For that, It would be cool that the enemy walks around but starts a chase when the player is in range as a third option in the current AI Walk script.

    As for new behaviours, I was thinking of:

    Crawler: sticks to the platforms, but when the player is in range allow an option to fall to the floor and go for the player.
    The same behaviour could allow enemies to walk where they want. think of spiders, bugs, no matter what angle: walls.ceilings, spherical,...

    Attract/flee:
    As we already have the "move when player is in sight", I do think it would be great to have a "flee" option. Some games have enemies that only move when the player is walking away from the enemy or when they are hurt they'll run away. Others would be attracted to the player lets say only if he runs.

    Fly:
    A random or pathed option for flying enemies, but when the player is in range it will attack. Allowing take off, rest, and landing positions.

    The same code ideas could be used for let's say particles: a butterfly flies around and when it's in the range of a flower It will land. Or a cat runs away when you are near. A bird flies away and when it comes close to a landing zone, it eventually does so or disappears from the screen.

    I am not requesting that the above elements ship with corgi. However, when the basics are provided it's much easier for customers to create new patterns and see how things are done to extend upon.
    As I do think these three behaviours could be considered as generic :)

    As because of a similar idea that's how I looked into the jetpack bar and created stamina meters and underwater breathing meters. Modular code is fun.

    However coding enemy behaviors isn't my thing, unfortunately. The 3 types above is something I've to spend way more time on trying to create it than anything else:/

    -----
    Regarding the inventory: I love the fact we now have an inventory.
    Would it be possible to have an escape key so that you have two options to hide the inventory? I see it as user experience.

    I would like to opt for a time-based inventory item:

    This item time could be used for making food rot, or have an item that disappears over time:
    For example a quest item you will need to get from point a to b before time runs out,
    A battery maybe? The battery would only drain its power when turned on.

    It could also be used for bombs/grenades as an ammo type when you drop an item it will detonate after x seconds.
    Talking about extending. Let's say it's honey and you have a flying bee enemy: the fly enemy could be attracted to that.

    Meaning it would be great to have an extra option so the item can disappear over time in the scene, or in the inventory.

    -----
    Finally:
    Is there a demo to show up an achievement UI list panel? Where the user see's the achievements that can be found its progress, hidden achievements could have a slot but visually differ (like the achievements in hollow knight for example)

    I am aware that (regardless of this long writing) some of these features are not really hard to try yourself. However I do think they would make a nice addition to Corgi.

    So yeah cheers for your time and reading this long writing, but maybe it sparks some ideas for you the reader and/or the developer of this asset.
    Have a good one!
     
    rrahim and Zehru like this.
  19. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    84
    @zero_equals_zero very good ideas for additions you have
    That message is not exactly a reply for you past one, but I just would like to mention about it, hoping that maybe the idea can br of some assistance.

    I created long time ago(in my first project) a script for an enemy to do similarly to Super Mario Bros' phantom. It follows the character( it's basically a flying object) and if the player turns to its direction, it stops.( I used the dot product of the player's facing direction to do so).

    I know it's a quite simple idea, and I'm quite bad as a programmer( I'm a composer) but soon after getting my laptop back, I'll post my code here, so anyone can use it.( my computer stopped working about a month ago hahaha)
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Newbiefreak > I don't know that particular game. I guess you should have a look at the list of features and see if it fits what you have in mind.
    @luigi-freguglia > I've never tried it myself, but I've heard good things about https://www.assetstore.unity3d.com/en/#!/content/34110
    @zero_equals_zero > oh you already gave that previous link!
    And great AI suggestions. Most of them are already on my list. They're pretty easy to implement with what's already there, not sure if it'd be a priority. But why not, AI is fun to do :)
    You can already use the escape key to hide the inventory. Just bind it to the toggle inventory method. Right now it's bound to the pause by default, I don't plan on changing that, it's something that is super easy to do right now, and really dependent on your game, no need for silver bullets here :)
    That time thing seems very specific, it's something that you'd typically put in your inherited item class, not something that you'd find at root level (it's already complicated enough as it is I think). As for "auto disappearing" in a scene, that's already included in the asset (I think the component is called TimedAutoDestroy).
    And no, there's no demo for achievements UI list panel right now. It's on my list but again this is super easy to implement. I mean you already have the achievements list, you have the achievement item, you just have to put the two together :) And in general I'm not interested in UI demos. They're very specific to your game, so again I think it's a case where it wouldn't add more value. I prefer focusing on the hard stuff, it's useful to more people.
    And yeah that was a long one :)
     
    zero_equals_zero likes this.
  21. nosajtevol

    nosajtevol

    Joined:
    Jun 28, 2012
    Posts:
    219
    Hey there! Just wondering is Corgi compatible with Ferr 2d?
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nosajtevol > It's more like the other way around, but yes, as long as the platforms/elements you create using Ferr2d have 2D colliders, you'll be fine.
     
    nosajtevol likes this.
  23. nosajtevol

    nosajtevol

    Joined:
    Jun 28, 2012
    Posts:
    219
    Great! Thanks a lot
     
    reuno likes this.
  24. hammackj

    hammackj

    Joined:
    Jun 8, 2016
    Posts:
    1
    Is the asset compatible with / or will be compatible with Unity 2017.2's tilemap engine?
     
  25. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    Haha sorry for the long one :)
    But awesome to read that you either love coding AI and are tinkering with adding them to Corgi!
    Thanks for the tip regarding the esc button.
    The achievements are indeed quite straight forward to add yourself, I just thought I was overlooking a scene.
    You are right, I do feel that Corgi is really growing in terms of modularity so I am honestly very thankful that you provide some of the harder components and us as user can mix and match new stuff. So good luck with the AI, looking forward to all that!

    also: @Zehru Thanks sounds cool and nice of you. Good luck in getting the laptop back!

    Cheers!
     
    Zehru and reuno like this.
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @hammackj > Just like in my message right above yours, it doesn't really have to be "compatible". The engine works with colliders. As long as whatever you're creating has 2D colliders, you're fine. So yes of course, it'll work just fine with the tilemap engine.
     
  27. joshua121

    joshua121

    Joined:
    Jan 31, 2015
    Posts:
    7
    Is there a way built into the engine to save the players current health across levels?
     
  28. skayster

    skayster

    Joined:
    Aug 12, 2017
    Posts:
    46
    Hello,
    I bought your engine two weeks ago and I am absolutely loving it! Thank you so much for doing this.
    Just wanted to check if it's possible to add a button for item pickups? At the moment they get picked up automatically as you walk over, but it would be great if you had to push "E" for example. I could not find this on the guides, but is there a code I could add or perhaps you could guide me in the direction of some tutorials that are compatible with the Corgi Engine?
    Thank you
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @joshua121 > No. But you can use the SaveLoadManager class to do so. There are quite a few examples of stuff being saved and loaded (inventory, achievements...) so it should be very easy to do (saving is a one liner).
    @skayster > Of course you can add one. Just modify (ideally extend) the pickable item class to implement that. I don't know of any tutorials for that, it's pretty straightforward to me. You can have a look at how the dialogue box components implement displaying the prompt. Or you can also maybe use the ButtonActivated class for that. Lots of options really :)
     
  30. eguchi-hisato

    eguchi-hisato

    Joined:
    Sep 13, 2015
    Posts:
    9
    hi, @reuno
    i want to use this asset to make a top-down 2.5d action game.
    many scripts are included in this for 2d, i guess.
    but, how about 2.5d???
    if not included, let me know how to
    extend their scripts to use in 2.5d game.

    this asset is the greatest because of good architects, good comments and simple.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @eguchi-hisato > Not sure what you mean, all scripts are common to 2D and 2.5D. No need to extend anything :)
    There are multiple examples of 2.5D scenes included in the asset for reference. Check out the Corgi3D or TheHunt demo scenes.
    That said I think you're probably talking about 3D, not 2.5D. I have a hard time imagining a top down platformer, that'd be weird.
     
  32. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Maybe @eguchi-hisato means 2.5D like in Poncho


    If so, this is more like 3D than 2D as far as I know, just showed as a 2D game, tho.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Muppo > Great game but that's not top down :)
    The engine supports 2.5D platformers, like Inside, Strider, DK Tropical Freeze, stuff like that. 2D gameplay, 3D assets. But a top down game with a 2D sidescroller gameplay would be very weird. Can't think of any example of that. That's why I think he meant 3D. Or maybe I just lack imagination :)
     
  34. eguchi-hisato

    eguchi-hisato

    Joined:
    Sep 13, 2015
    Posts:
    9
    @reuno sorry because this is not for a top-down game
    i was talking about an action game in the only x-z plan
    but, it doesn't need to jump or crounch
    i thought if this system can be extended because just adding z-axis and it's so simple
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @eguchi-hisato > I've worked on a lot of top down and platformer games, and in my experience, they have little in common. It's certainly doable, but I wouldn't use a platformer engine to create a top down game. Feel free to try it, but I wouldn't know how to help. I usually believe in picking the right tools for the right job.
     
    ATeam_Production likes this.
  36. eguchi-hisato

    eguchi-hisato

    Joined:
    Sep 13, 2015
    Posts:
    9
    @reuno yeah, you're true
    i will make it using this as an example
    thank you for your helping!!!
     
    reuno likes this.
  37. Pursehouse

    Pursehouse

    Joined:
    Dec 7, 2016
    Posts:
    1
    Hey, I just bought the system and it seems great so far! Still trying to figure out how everything works. There is so much to see, you really should have an entire forum/wiki for this thing :) I'd suggest wikia, but it looks like they don't really have much of a forum feature, which your clients would definitely benefit from.
    I see the angled platforms working, and I see how to set a specific platform to have certain resistance, but is there ability to do curved platforms? Basically picture the shape of a skate ramp, and how it would become more and more difficult to walk as the ramp angle increased and eventually be impossible due to the angle. Does your system support this concept or would I have to create a separate block for each angle? I'm trying to do more of a walking with small jumps type gameplay, like Limbo, rather than the SMB style that your demos are sorta geared towards. Any thoughts on the best route for that type of thing would be very helpful.
    Thanks!
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Pursehouse > There's already a complete documentation. I don't really see what a wikia would add?
    There's no such things as curved platforms in Unity. But you can use 2D polygon colliders. And then instead of applying different resistances to each segment, you tweak the speed at which your characters walk on each slope angle via the curve in their controller's inspector. That's how it's done in the included demos, and how it's explained in the docs/tutorials. Of course defining a specific resistance for each segment would work too, but that doesn't seem realistic to do this per segment for a whole game :)
    And please use the support email address for questions like that, thanks!
     
  39. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    My mistake, wasn't sure what he means by Top-Down 2.5 game.
    As far as I know, this can be doable on both 3D and 2D but definitely not with Corgi Engine, this kind of game need another kind of engine.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Muppo > I completely agree :)
     
  41. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    I read about Events and still confused about it.
    I want to call a method when player respawn/dead without changing anything from the corgi engine scripts so i can upgrade corgi engine safely in the future. How can i do that ?
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @reynolderwandi > Have you read the engine's doc about events? Still not clear? Not sure what I can add to it, it gives the exact lines you need to use to catch an event. Check it out, or maybe read on the concept of events on Unity's website, and if that still doesn't cut it, please use the support email with more details.
     
  43. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    Got my way to handle the events.
    Now i got a bug. In Editor, my character is respawned when falling. But in Android, my character won't respawned.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @reynolderwandi > As I said, please use the support email for that kind of requests. And please provide some details, I can't help you otherwise. Does the bug happen with the vanilla asset? Do you get any error? Unity version, engine version, etc.
     
  45. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    Yes, I use minimallevel demo and remove one of the platform so the player can fall and dead.
    There is no error and player is respawned in Editor but not in Android.
    I use Unity 2017 and latest of Corgi Engine.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @reynolderwandi > For the third time, please use the support email address for this. I can't keep track otherwise.
     
  47. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    Done sir.
    I can't see support email button in asset store page (new). thats why i'm asking here
     
    reuno likes this.
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @reynolderwandi > Oh there doesn't seem to be a link to the support email on the new asset store indeed. I'll report this right away. Thanks for letting me know!
     
  49. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    It's —for reasons I can not explain— only a visible email link once you click the author's profile. https://assetstore.unity.com/publishers/10305

    It's of course still a beta new asset store: but still...
    I wonder why I keep on sending my resume as a UX designer to unity. :teeth:
     
    Last edited: Aug 28, 2017
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @zero_equals_zero > Wow, that's another very weird UX choice.

    In other news, I'm almost done with v4.1 of the engine. It'll include a bunch of fixes, and among new features the long awaited key & chest (and doors, and whatever you want to control with a key). I really like this new feature, can't wait to show it to you all, it's a lot of fun to play with, and opens a lot of, well, doors.