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

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DeltaSupreme > If you change the delay and plan on having very fast attacks, you may want to modify the animator as well. Right now it's setup for this example use. What's possibly happening is that some animation isn't done playing, and thus it doesn't get interrupted and you don't see the new one. The fact that the hurtbox is turned on and off correctly heavily points towards that :)
     
  2. DeltaSupreme

    DeltaSupreme

    Joined:
    Feb 22, 2017
    Posts:
    7
    @reuno > Hmm, possibly? But the part that confuses me is that if I set the Delay Before Use and Delay Between Uses back to 0, effectively letting me attack even faster, this doesn't happen; as far as I can tell, with both set to zero, the animation will play the same number of times it spawns a hurtbox (so no missing animations).

    I've found another weird behavior that I think may be related; in the same scenario, set the CorgiSword to Semi-Auto, 5 second Delay Before Use, and 0 second Delay Between Uses. The first time you attack, the animation will play, and five seconds later, the hurtbox will show up, great. Wait a few seconds, I even waited ten seconds one time, and hit the attack button again; this time, the animation doesn't play, but also, the hurtbox never appears either; effectively, the SpaceCorgi never attacks. Hit the button a third time, and the animation will play and the hurtbox shows up five seconds later, and this behavior repeats for every other attack.

    My problem here isn't that the animation isn't synced up; obviously the default SpaceCorgi melee isn't animated with a five second delay; but I figured it should at least play when you hit the button, and in this scenario, even the hurtbox isn't showing up, either. Is this a bug, or am I just seriously doing something wrong? The Initial Delay variable that's found in MeleeWeapon doesn't exhibit this behavior, it works just fine, and I would just use that instead if I didn't also think I needed to adjust Delay Between Uses at some point in the future.

    By the way, thank you so much for all your responses, it's really incredible to have a developer this helpful!
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DeltaSupreme > That does look like a bug. I'll have a look at this and fix it for the next release. If you want the fix earlier, drop me an email (preferred channel for bug reports, otherwise they may get lost).
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DeltaSupreme > It was indeed a bug, thanks for all the details you provided, it's been very useful! I've fixed it, it's much more consistent now, I should have tested that semi auto mode much more.
    Again, send me an email if you don't want to wait until the next release for the fix.
     
  5. DeltaSupreme

    DeltaSupreme

    Joined:
    Feb 22, 2017
    Posts:
    7
    @reuno > Sure thing, I sent an email. Thanks for the intensely quick turn-around!
     
    reuno likes this.
  6. DeltaSupreme

    DeltaSupreme

    Joined:
    Feb 22, 2017
    Posts:
    7
    @reuno > Looks like that fixed it! I'll keep messing with it and see if anything new pops up, but from what I can tell, I'm not having anymore issues with Delay Before/Between uses. Thanks again!
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DeltaSupreme > That's great news, I'm glad it's working now.
    Thanks for reporting this!
     
  8. Zymes

    Zymes

    Joined:
    Feb 8, 2017
    Posts:
    118
    Can you make 3D backgrounds with this engine?

    If you think about Trine for example. It is a sidescroller with 3D graphics. This is what I want to do. But the running/platforming should only happen on one axis.
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Zymes > Yes, you can do that with the Corgi Engine.
    That kind of gameplay is usually called 2.5D.
     
  10. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Toke a look at Infinite Runner Engine on your site and I wonder. Can CorgiEngine make infinite backgrounds as seen on this one? If so: Do I need to modify any thing or can be done with default contents?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Muppo > No, that's something that is only in the InfiniteRunnerEngine. There's nothing similar in the Corgi Engine. You can implement it of course, but that's not in the box.
     
  12. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Ok. Thanks :)
     
    reuno likes this.
  13. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    Hello everyone!

    I have a quick question for Reuno.
    I'm making a Mega Man-esque action platformer and my character is too tall for the default spawn point for projectiles, so I've adjusted the Projectile Spawn Offset in the Projectile Weapon Script accordingly and now it spawns high enough to match the character animation. The issue is that it only applies when he's facing right. When he turns left the shot will spawn lower than the default position rather than higher and I'm not sure what I'm doing wrong. I'm no programmer, so please forgive me if I've missed an obvious solution.

    Corgi Engine is amazing! Thanks for your help!

    EDIT: Goodness! Just after asking I found the solution and it was indeed obvious. Sorry for the trouble! I fixed my issue by only editing the X axis through the Projectile Spawn Offset and the Y axis through the Weapon Attachment Offset. Now it spawns in the proper place regardless of the direction the player is facing!
     
    Last edited: Feb 27, 2017
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NEHWind2 > Well you explained the solution better and faster than I would have, good job :)
     
    NEHWind2 likes this.
  15. LunaEqLuna

    LunaEqLuna

    Joined:
    Feb 11, 2017
    Posts:
    1
    Hi Reuno, great job on Corgi Engine you clearly worked really hard on this!

    Anyway I'm a newbie to unity and game programming. I'm struggling to get a bluetooth ps4 controller working on Osx. The ps4 controller is working in Steam so I know that it is connected properly.

    I just can't get anything in unity to recognise it. Should corgi engine work automatically with a ps4 controller?

    I am able to get unity to recognise my ps4 controller using the Rewired asset in the sample 2d ufo project. But I don't know how to get that working with corgi engine or if that is possible.

    Thanks for any help you can provide.
     
    Last edited: Feb 28, 2017
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @LunaEqLuna > No, the Corgi Engine doesn't include controls for PS4 controllers. By default it supports xbox controllers, keyboard and touch. Mostly because I don't own a PS4 controller so I can't really test it. But there's nothing specific to the engine there, you could add support for it like you would in any other Unity project (via the edit > input settings panel). You can learn more about input settings in the documentation, there's a whole page about it. As for the exact mapping strings, I haven't tested these, but this seems legit : https://www.reddit.com/r/Unity3D/comments/1syswe/ps4_controller_map_for_unity/ (found via a quick google search).
     
  17. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    Hello again, everyone!

    I have another question that this time I'm confident I won't be able to figure out my own.

    When my player character dies he only seems to respawn when I'm playing in the Unity Editor. When I play any actual build he doesn't want to respawn at all. The game just never moves on from where he fell or took the last hit. I imagine I have him set up incorrectly and usually I can spot the solution by comparing my character to the demo characters. This time I'm stumped though. Any help would be greatly appreciated!
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NEHWind2 > Does this happen with the demo characters as well? I have to admit I don't see what could cause the engine to work differently in editor and in build on this particular problem.
     
  19. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    I swapped my character out for Space Corgi and unfortunately Corgi doesn't respawn in a build either. I have multiple scenes in my build and curiously both characters will respawn in the first scene but not in the second. I wouldn't know for sure but does this rule out the character as the problem? I thought I might have had my Level Manager set up wrong but copy/pasting the Level Manager from the stage that works into the one that doesn't work didn't help.
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NEHWind2 > What I meant is does it work with the demo characters in the demo levels? You should try comparing with the MinimalLevel demo scene, it contains everything you need. Hard to tell you more without knowing the changes you made or what you may have omitted. Maybe have a look at the documentation too, it goes into details into what you need.
     
  21. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    I'll see what I can do. Thanks a ton for you fast help, and sorry that I'm not of much help myself. I'll edit this post when I get it all figured out!

    EDIT: I believe I've found a clue! It doesn't seem to have anything to do with the Level Manager or the character. Any scene that I load into first will allow characters to respawn properly, and any scene following that one will not. I thought this wasn't happening in the editor but it is, I just wasn't completing stages and moving on to the next like I have to do in builds. I should have been more thorough in my tests before posting. Sorry about that.
     
    Last edited: Mar 3, 2017
    reuno likes this.
  22. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    By default, surface modifier script only works with Corgi Controller component so I suggest it to work with pushable items as well. Could be cool to be used on puzzles where you have to move things from one point to another.
    By the way, switchable direction treadmills would be awesome ;)

    PD: I'm trying to figure it out by my own, still thinking is a nice an generic idea.
     
    Last edited: Mar 4, 2017
  23. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Muppo > That's indeed a good idea, I'll add that to the list, thanks for the suggestion!
    @BOOapp > I'm not sure I understand the question. What exactly are you looking for? If you're asking where the visual assets are, they're in their respective folders. The documentation explains the folder structure in details. Or you can just browse through them, they don't bite :)
     
    Muppo likes this.
  25. Profiter

    Profiter

    Joined:
    Jan 22, 2016
    Posts:
    9
    first, thank you for such a good engine. It opens up the world of game development for me as an artist. Just a few quick noob question hope you can assist me,

    1. is there any demo scene/youtube tutorial/word tutorial, where i can learn how my agent(character) can collect projectiles bullets like coins, where by when i shot the bullet, it will reduce until empty unless i collect more.
    2. Can i break the bricks while collide with my agent(character) ? same like mario?

    Im working on a mario alike project

    thanks
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Profiter > These are not features of the engine (yet). You can of course implement them if you want :) You can see a full list of features on the asset's page, if it's not on that page, it's not in the asset.
     
  27. Profiter

    Profiter

    Joined:
    Jan 22, 2016
    Posts:
    9
    thank you very much for your prompt reply. Guess i will try script it myself hehe
     
  28. Profiter

    Profiter

    Joined:
    Jan 22, 2016
    Posts:
    9
    any advice for me if i want to make the bullet of weapon counts?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Profiter > Basically what you're after is an inventory. At its most simple, it's a value you store, ideally in a persistent object. And maybe one you save. There are examples of these in the asset. Then you'll want to have pickable bullets (there are examples of pickable items in the asset). And you're basically done.
     
  30. Profiter

    Profiter

    Joined:
    Jan 22, 2016
    Posts:
    9
    ok man i will try it out. Thank you. Sorry for the noob question. newbie in programming hehe
     
  31. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    Please check compatibility with latest Unity version (5.5.2p1), there are some issues with sprites displaying in few scenes (for example in Lava scene).
     
    reuno likes this.
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  33. Nienipanini

    Nienipanini

    Joined:
    Dec 9, 2012
    Posts:
    8
    @Nienipanini > I can add that to the list, sure.

    Wooh! That would be awesome!
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @vitaliyzaverchuk > Alright, I've finally installed 5.5.2 and tested most levels, I didn't see anything strange.
    What exactly seemed to be the problem?
     
  35. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    I guess it's some issue with transparency. It's sandbox scene of just imported asset.

     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @vitalyzaver > Thanks a lot for the screenshot. There does seem to be an issue indeed.
    But I don't reproduce it.
    Here's what I see on both PC and Mac with 5.5.2f1 (freshly imported asset, no changes) :
    upload_2017-3-7_10-55-15.png

    I checked the release notes and I don't see anything that would impact transparency (although it may simply not be mentioned, it wouldn't be the first time). What kind of computer are you on? What's your build target? I could try replicating your exact setup, maybe there are certain conditions that create this? Or maybe it's a Unity bug?
    Nobody else has reported this yet (which doesn't mean there isn't a problem).
     
  37. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    Unity 5.5.2p1 (maybe issue in p1 version)
    Target platform: PC, Mac & Linux Standalone
    Windows 10 Pro
    I've tried on two computers and issue is the same
     
  38. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    There are also some warnings on import

     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @vitaliyzaverchuk > These warnings are "normal" (I haven't found how to get rid of them yet).
    I've just downloaded 5.5.2p1 just to be sure, and I still don't have the error you reported (again, freshly downloaded asset, no change) :
    upload_2017-3-7_13-46-14.png

    Have you encountered the problem in any other project?
    There are two things in 5.5.2p1 release notes related to sprites :
    - Sprites: Fixed an issue where OverrideGeometry on instantiated sprites produced differing results in the Editor and Standalone
    - Texture Importer: Fixed an issue where setting textureType reset sprite mode to single.

    But again, I don't reproduce the problem, so maybe it's not a version issue. I'm really sorry you're encountering this bug, but I'm not sure how else I can help. Could you maybe try rolling back to the latest stable version and see if it's better?
     
  40. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    @reuno > I'll try to rollback in a few hours and let you know
     
    reuno likes this.
  41. vitaliyzaverchuk

    vitaliyzaverchuk

    Joined:
    Sep 23, 2015
    Posts:
    6
    @reuno > So I installed both versions 5.5.2f1 and 5.5.2p1. When I import with f1 version everything is okay, even if I open then in p1 version it works well. To reproduce this problem I just imported Corgi with p1 version. So something is wrong with p1 import functionality.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @vitaliyzaverchuk > Thanks, that's good to know. I'll try and contact Unity about it, it really looks like a bug to me.
     
  43. DeltaSupreme

    DeltaSupreme

    Joined:
    Feb 22, 2017
    Posts:
    7
    @reuno > Hey there, back after messing around with the semi-auto weapons (CorgiSword) some more. Had a question, might've found a bug.

    So, I need the other classes to know about the weapon's attack states, and I didn't want to have to grab the CharacterHandleWeapon component all over the place, so I added a new enum to CharacterStates, called CombatState. For now, it's just CombatIdle and CombatInUse, and I'm just setting it to Idle whenever the Weapon script changes its state to WeaponStates.WeaponIdle, and changing it to CombatInUse whenever the Weapon script changes its state to WeaponStates.WeaponInUse (this is happening in Weapon::LateUpdate()).

    Trouble is, the line of code where it says "if(WeaponState is Stop or ReloadStop) then(Change state to Idle)" in Weapon::LateUpdate is never being called. I put debug messages in MeleeWeapon::Update() to see what the WeaponState was; with a Semi-auto weapon, it's initialized to Idle, changes to Start then InUse when you attack (like it should), then it keeps reporting it as InUse; in other words, after attacking once, it gets stuck in InUse and never goes back to Idle (I attack once and then never attack again during this debugging).

    Maybe this'll help, or maybe I don't understand how LateUpdate works, but I noticed when I had debug messages, my messages would print out in this order, looking like this:
    • It reports WeaponState Idle until I attack
    • TurnWeaponOff
    • TurnWeaponOn (seems out of order?)
    • WeaponState is Start in MeleeWeapon::Update
    • Weapon::LateUpdate changes WeaponState to InUse
    • It reports WeaponState InUse forever...
    Also for the record, I have no delay before use, I have a 0.15 second delay between use, and a 0.33 second active duration.

    Ugh... sorry for the wall of text, especially given it's as simple as "does not change back to idle," but hey, I figured it could only help haha. Any help you can provide is most appreciated!
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DeltaSupreme > It'd be better to use the support email for requests like these, otherwise it's hard for me to keep track of issues. That said, you're right, the state seems to be stuck at WeaponInUse in semi auto after a shot. I'll fix that! Thanks for reporting this!
     
  45. DeltaSupreme

    DeltaSupreme

    Joined:
    Feb 22, 2017
    Posts:
    7
    @reuno > Aww, crap, sorry, I keep forgetting about the support email. If you'd like, I could email this issue to you, so you don't lose track of it? Unless you've already got it under control. And thanks for looking into it!
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    I've made a few changes to the Weapon's state machine to make it more robust and handle more edge cases. Does anybody want to give it a try? @DeltaSupreme maybe? It solves that last problem you mentioned :)
    If anyone wants to try it out, just send me an email and I'll send you the updated classes. That fix will be included in the next version.
     
  48. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    Hey nice work as usual .I wanted to know if the beat em up template is still coming soon? Thanks
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jaelove > It's still coming. Soonish :)
     
    greg725 likes this.
  50. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    Cool I can't wait it will be a day 1 purchase for me. I hope its as feature rich as your corgi asset :). please have 3d model support as well :)
     
    reuno likes this.