Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[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. zephyo

    zephyo

    Joined:
    Mar 28, 2016
    Posts:
    33
    Hi, I've been using your engine for a long time and it's so helpful. I would really appreciate some advice with your latest update - when I try to go to the next level (w/ Finish Level script) it doesn't let me, it only shows a prompt; in previous updates it did. Do you know why? (I imported latest update into a new project btw)
     
  2. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    @reuno Thanks for the reply! I am hoping to avoid editing your source code so I can utilise future updates. I might try doing my own collision check before sending input to the controller, ignoring my character's collider. Should work, and leave the engine itself intact!

    Did you see the second part about sliding down slopes?

    Thanks!
     
  3. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Thanks Reuno. Ha! I came so close with my first attempt before posting my query but didn't think to comment out the IPlayerRespawnListener interface implementation. All good now.
     
  4. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello Zephyo, I don't know how this will hold up but I just made a copy of the old 2.0 FinishLevel script and used that. However, I still had to add the new LoadingScene scene as part of my build settings for each level.
     
  5. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Sorry, another question! I can't seem to work out how to get wall jump working properly. I feel like when you trigger a wall jump it should disable your directional input against the wall, as I seem to be fighting the jump. I've set the wall jump to an extremely high value, and it launches me off quickly, but because I'm holding the direction against the wall, I fight against it and move back towards the wall, basically negating the boost, and making carrying the momentum somewhat impossible.

    Because of the scale of our game, I'm using quite high values in Corgi engine, could that be causing any kind of trouble?

    Also, I think it'd be good to have an option to disable scaling the character when moving left, as we've got a different implementation for this that we'd like to use! Maybe even a callback when they're travelling the opposite way, so it can be handled in code manually?
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @zephyo > I've added button activation to the FinishLevel script in the last update. It's useful if you have something like a door at the end of your level. But you can turn that on or off in the inspector, just check "auto activation" and uncheck the rest.
    @gumboots > Not exactly. You can do sliding slopes with the new surface modifiers, but that may not be what you're after. Do you want to have "icy" slopes ? Or more of a button that makes you slide down ? That second one ain't included (yet).
    About the wall jump, everyone has a different opinion of how it should feel, and a lot of games handle that differently. That's something you have to tweak/implement on your own. I included the basics, but I can't possibly (and I've tried) provide a solution that covers it all. Same goes for a callback when changing direction. It'd be a waste of resources for everyone but you :) But you can easily add it. I'd say the Flip() method in CharacterBehaviour is the best place for it.
     
  7. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    @reuno Nope, I mean when you're standing on an angle that's too steep, sliding down it instead of standing still.

    I can understand varying designs for wall jumping, the way it works in the Minimal example being one, where you can essentially climb a wall using the ability. The other would be a launch directly off, deliberately designed to not allow you to climb the wall (disabling the reverse directional input). In terms of a universal implementation, I'd have thought a toggle between these would cover them? The rest is really down to variables. I could of course be missing some other style of behaviour.

    Unfortunately with the values I'm using for the controller, it just doesn't seem possible to provide enough force to combat my opposing motion. So I do this very small, extremely fast burst off the wall and then start moving back towards it instantly. If I make the value too high to try and combat this, then the character practically teleports the distance.

    I had a look at non-destructively disabling input until it's centered myself, unfortunately the wall jump behaviour happens at the bottom of JumpStart, which in turn has a number of variables I can't access from a class that would extend CharacterBehaviour. So I can't really add this myself without having issues pop up when updating the asset later.

    Obviously I could just edit the asset, but it seems a shame to edit the framework, when a big part of getting an asset like this is so that maintenance/updates can happen simultaneously with the game's development? Having to reintegrate something like this each time Corgi sees an update seems counterproductive. But obviously I understand you wanting to not integrate anything extremely specific into the engine.

    However, it does look like I can override Flip(), which should prevent the character flipping automatically!
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @gumboots > I'll try and clean that up for you in an upcoming update. I can see how it can get messy :)
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @raistlir > I've been working on that stuttering problem of yours and I think I've found a solution. If you're willing to get your hands dirty a little (it's really not too hard), I can explain the changes to you, and you could test it and see if that solves your problem. Contact me on the support email if you're interested.
     
  10. zephyo

    zephyo

    Joined:
    Mar 28, 2016
    Posts:
    33
    @reuno Thank you!!

    @MudPuppet thanks for the idea; did you have the problem too? It started working for me after I imported the package a 2nd time.
     
  11. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Yeah I had the same problem, saw your post, and had a quick tinker around. As Reuno had already pointed out to me via email, the new Loading Scene is really better suited to heavier scenes than my own basic tests but I completely forgot about the new button activated version of the Finish Level script so I will look at that later on. With my own game test thingy I have doors that lead to other scenes and then a customised version of the Finish Level script that requires the player to have collected a key before they exit the actual level. I only recently updated to 2.1 so am still going through stuff and fixing what's broken or changed so that I can make better use of all the awesome changes and new stuff available.

    EDIT: The updated Finish Level script worked perfectly this time around so my own problem may have been one of the nuances I have discovered with Unity where a restart of the application can fix some problems and I probably didn't do that after I upgraded the engine to 2.1.
     
    Last edited: May 4, 2016
  12. Rizzledeep

    Rizzledeep

    Joined:
    May 7, 2016
    Posts:
    14
    Hey there! Loving the engine.

    One thing I noticed is that when using the falling platforms, if your player dies and respawns the falling platforms do not respawn like the AI or Coins would. Is there any way to have the falling platforms respawn to their original position when a player dies?


    **Edit:

    5 minutes after asking this question I figured out how to do it lol. If anyone wants to know how please message me.
     
    Last edited: May 7, 2016
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @Rizzledeep > Glad you figured it out :) For others : AI or Coins implement the PlayerRespawn interface. Falling platforms (for example) do not, but feel free to do it, it's just a matter of adding a few lines, look at the Coin class for an example.
     
    JeffSLG likes this.
  14. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello, is there any way to stop enemies from triggering falling platforms? Avoid Falling is enabled and I have been fiddling with Platform Masks, Hole Detection Offset and Hole Detection Recast length but no luck so far.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @MudPuppet > No, fiddling with all these parameters won't do it, that's not what they're for (just look at the documentation, all these are explained). If you look at the code (the FallingPlatform class), you'll see that, by design, all FallingPlatforms are meant to be triggered by CorgiControllers, all of them, player or otherwise. You can extend that class to have it check for a player instead (based on its tag for example).
     
  16. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Thanks Reuno. I actually got around the problem just tweaking the size of the box collider on the falling platforms; which may be better for the time being as I may actually want a situation where the player has to get an Enemy onto a falling platform to get through a particular area; and I am far from being able to add a boolean toggle that I can access from the inspector at this stage.
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    Great news everyone, I've just submitted v2.2 of the Corgi Engine to the Asset Store.

    This new version fixes all the bugs that have been reported to me since the release of v2.1, which as usual is my absolute priority, as well as a few improvements here and there. Most of the "big" changes (they're all relatively small, but still) have to do with crouching, now way easier to setup, no more need for a special head collider). You'll also get slope speed factors, allowing you to walk slower when going up and faster when going down (it's all customizable of course), and generally more exposed variables here and there.

    It also includes brand new, homemade mobile controls, to replace the ones based on the Standard Asset's CrossPlatformInput. This change comes for a few reasons : they were unreliable, overcomplicated, which made helping people harder, and I was tired of explaining how they worked or how to change them. So now you'll get the same features, but much easier to setup, much easier to replace with your own controls, and also you'll get a mobile joystick (or twin or triple sticks if that's your thing). I'll make a video tutorial about it this week. This also affects the InputManager class, which is now much more powerful and easy to build on.

    I had meant initially to include the inventory to it, but as it turns out it has become a project of its own, and is getting more ambitious than initially planned. So no inventory this time. It might end up as a separate asset in the end. Don't worry, I'm looking at ways to distribute it in a way that people who've bought the Corgi Engine would get it free, so basically you'll get another great asset for free.

    I hope you'll all like this new version! I'll post full release notes when the update hits the store.
     
  18. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @meapps > The engine already "supports" any inventory asset you like. You can already use this asset if you want.
    I won't add code that depends on anything else though, just not maintainable.
     
  20. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    @reuno just ask the inventory creator to make an tutorial for example. That would help beginners. I know its not maintainable. I think an video tutorial would help. Just an suggestion.
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @meapps > I completely agree, a tutorial would help. That's a good suggestion :) I'll ask if he's interested in that.
    I still think I'm gonna finish mine though :)
     
  22. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    Welcome to the World of Zeyno!!!

    Zeyno get fed up with her black and white world and sets out to explore colorful world.
    But she can’t find want she expects and she wants to turn back to her family and world.
    You must help her in this challenging adventure.

    *-4 different worlds and 15 magnificent level.New level coming soon!

    *-Gold excitement with hidden gold cases

    *-Thrilling levels.

    *-Estimate brilliantly on boring platforms.

    *-Hards of enemies trying to hinder you.

    *-They are hilarious ,sneaky and dangerous

    *-Continual free updates for levels,worlds,characters,enemies and more.!!

    Enjoy.!!!







    Google Play Store Link :

    https://play.google.com/store/apps/details?id=com.dedegames.zeynosworld

    Apple AppStore Link :

    https://itunes.apple.com/us/app/zeynos-world/id1106641080?l=tr&ls=1&mt=8
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @udede > That's awesome! Congratulations!

    In other news, the 2.2 update is now live on the store!
    Here's the full changelog :
    - Removes CrossPlatformInput mobile controls and replaces them with new, faster and simpler mobile controls, with better multi touch support
    - Improves the InputManager for better extendability
    - Adds a mobile joystick in addition to a mobile 4 direction pad
    - Adds customizable loading text on the loading screen
    - Adds checks for material existence
    - Improves crouching : top collision detection is now raycast based (like everywhere else), no need for a HeadCollider anymore, just specify your crouched collider dimensions and the engine will take care of the rest
    - Extracts audio playbacks into their own methods
    - Adds slope angle speed modifier, tweaked via an animation curve in the inspector. Walk faster (or slower) when going down a slope, and slower (or faster) when going up.
    - The force applied when the character dies can now be defined in the inspector
    - All movement that was previously handled in FixedUpdate is now handled in Update, which removes stuttering glitches on some devices
    - Adds an option to automatically disable camera ef fects on mobile
    - Removes old image effects and replaces them with Unity Cinematic Effects
    - Fixes situations where dashing in a gravity modified zone would create weird behaviours. Note that GravityActive is now set directly on the CorgiController, not on the CharacterBehaviour anymore.
    - Fixes wallclinging issues with some Android devices

    Tutorial on the new mobile controls incoming (they're very simple so hopefully they're self explanatory)
     
  24. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    44
    Hey @reuno ... Thanks for update!
    Is there any way to have wallclinging enabled even if i m not pressing any direction keys ? WallClinging works only if im pushing against the wall... I
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @painkiller2007 > Yes, that's the expected behaviour. You can change that of course, you just have to extend CharacterBehaviour and remove the check on direction and implement the one you want.
     
  26. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    The inspector for using the new mobile controls is pretty much self explanatory. The only problem I had was that they worked in your scenes but not mine (the joystick to be more specific). I solved this by deleting the UICamera prefab from the scene and reinserting it again. Great job on this as you saved me the effort of implementing my NGUI one :).
     
    reuno likes this.
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
  28. Tiveran

    Tiveran

    Joined:
    Feb 17, 2016
    Posts:
    5
    Is there any way this kit could be adapted to create a Super Mario 64-esque 3D platformer?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @Tiveran > As the name of the asset implies, this is a 2D platformer engine. Mario 64 is a 3D platformer.
    Of course you could start with the Corgi Engine as a basis, but frankly I wouldn't recommend it, too many structural changes.
     
  30. Tiveran

    Tiveran

    Joined:
    Feb 17, 2016
    Posts:
    5
    Thanks for the quick reply, I thought that would be the case, but wanted to check anyway. :)
     
  31. kpsarras

    kpsarras

    Joined:
    Nov 13, 2013
    Posts:
    5
    Hi Reuno!
    I just checked in Asset Store that you have uploaded the 2.2 version of Corgi Engine, but there is no Update option inside Unity in the Asset Store Tab. :-( If i download it's only the v2.1
    I don;t know what to do :-(

    Regards,
    Kostas
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @kpsarras > You probably need to get the latest version of Unity. If not, then I don't know either :)
     
    kpsarras likes this.
  33. kpsarras

    kpsarras

    Joined:
    Nov 13, 2013
    Posts:
    5
    Thanks for the quick reply, i 'll try!
    :)

    Edit:
    You was right!!! Geting the last version of Unity, the problem was fixed!
    Thanks again!
     
    Last edited: May 15, 2016
  34. kpsarras

    kpsarras

    Joined:
    Nov 13, 2013
    Posts:
    5
    Hi again!
    Is there any problem with the 8-directional shooting? When i select the Desktop mode (in Input manager) everything seems to be ok, but when i select Mobile mode the player can shoot only forwards (no up, down or diagonal shooting) :(
    Please help!
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @kpsarras > That's a bug indeed. I forgot to replicate a few lines from the old InputManager.
    Sorry you ran into this issue, but thanks for reporting it!
    I just fixed it, I'll submit a patch right away.
    In the meantime, if you don't want to wait, send me an email on the support email and I'll send you the updated file.
     
    kpsarras likes this.
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    v2.2.1 of the Corgi Engine just landed on the asset store. It's a patch release that only fixes one bug, the one mentioned by @kpsarras right above this post. Thanks again for spotting this!
     
    kpsarras likes this.
  37. xReaperDev

    xReaperDev

    Joined:
    May 6, 2015
    Posts:
    3
    @reuno Hey new to the Corgi Engine. I started to test some things in the MinimalLevel Scene but after a while i started to experience issues with the Camera Controller (Script) after moving around a bit it starts to move very rapidly back and forth is this a bug?
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @LifeAbstract > What kind of issues ? Can you reproduce it ? How ?
     
  39. xReaperDev

    xReaperDev

    Joined:
    May 6, 2015
    Posts:
    3
    I would move to the middle of the scene and the camera would start shaking rapidly. Ive tried re-importing and starting everything from scratch it gets solved then after a while I experience it again I also get a lot of backbuffer Compiling errors.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    That's not normal. What are the errors ? Can you please send me an email with details on how to reproduce and what the errors are on the support email, and I'll look into it ? Thanks.
     
  41. Pan_Likes_Brains

    Pan_Likes_Brains

    Joined:
    May 19, 2016
    Posts:
    13
    Hi Reuno, just a quick question! Is there any script included in the engine that allows "AutoMove" but in a loop? E.g. making clouds that follow the camera (as background layer) but also moving in a loop? If it follows the camera it cannot automove, and if it does not follow the camera it simply moves to infinity. You get my point right? Sort of an automoving parallax object that loops unto itself (image ends, image replays). Maybe I couldn't find the script as they are so many with so many names, just thought I'd give it a shot, thanks!
     
  42. heerok7

    heerok7

    Joined:
    May 26, 2015
    Posts:
    15
    Does anyone know why when dashing in the air the Corgi Controller goes significantly faster and farther?
    Also, it takes a while to be able to dash again on the ground, is there a parameter to lower this cool down value?
     
  43. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @heerok7 I believe the increase in dash speed and distance while airborne is due to friction, and the player essentially "dragging his feet" along the ground and slowing himself down.

    As for the dash cooldown duration, if you look at the character prefab (in Assets>CorgiEngine>Demos>Corgi2D>Resources>PlayableCharacters), specifically the Character Behavior component. It contains a few variables that you can change to adjust the way the Dash behaves - including the cooldown duration in seconds.
     
  44. heerok7

    heerok7

    Joined:
    May 26, 2015
    Posts:
    15
    @Bagnol so to make them similar, how or where would I approach that? The only thing I can think of is to get when in the air, and reduce the speed and distance momentarily, then return the values to the original.

    Thank you for advice on the cooldown duration, I've tweaked it and runs well to my liking.
     
  45. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @heerok I'm actually not sure of the best place to begin with that. I assume @reuno would have a better idea, but it's one aspect that I haven't spent a lot of time on. Now that I think about it though it does have me kinda curious about what the best approach might be.
     
    heerok7 likes this.
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,870
    @Pan_Likes_Brains > No there's not (yet). But that's not a bad idea :)
    @heerok7 > as @Bagnol said, the difference is due to friction. If you want both to have the exact same behaviour, solution would be to disable gravity for a while, and maybe put your character a little above ground too.
    Another solution would be to base the dash on distance and not time, and only have the dash stop when you've traveled X units from the dash's origin. I think that last solution would be the safest. You'd have to handle cases where you hit a wall and thus can't go the whole distance, but that's doable.
     
    Bagnol and heerok7 like this.
  47. heerok7

    heerok7

    Joined:
    May 26, 2015
    Posts:
    15
    @reuno @Bagnol thanks guys! I'll take a look and report back.

    So far I've been really taking advantage of extending classes and making this my own.
    So far I've got a lives system
    Made my own weapons
    Cutscenes and more!
     
    reuno, Bagnol and mimminito like this.
  48. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Cutscenes sounds interesting! We have extended the classes a lot, created new weapons, new items, its been great fun so far!
     
    heerok7, reuno and Bagnol like this.
  49. heerok7

    heerok7

    Joined:
    May 26, 2015
    Posts:
    15
    @mimminito Yeah! I created my own class for it, works pretty well with the other scripts! I've learned a lot since having the CorgiEngine!
     
    mimminito likes this.
  50. Shiphtur

    Shiphtur

    Joined:
    Oct 11, 2015
    Posts:
    7