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

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    But how can i access the number of spawned and killed objects?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @knuppel > As I said, by using an int counter and incrementing/decrementing it to keep track of the things you want to keep track of. The object pooler won't do that for you natively if that's your question, it's just an agnostic implementation of a design pattern. It doesn't know (and shouldn't) what stuff you spawn, or whether or not it gets killed or changes state. You implement your own counters for that.
     
  3. jeffersoncosta

    jeffersoncosta

    Joined:
    Aug 11, 2018
    Posts:
    4
    Is there any tutorial about corgi and photon multiplayer? I'm really struggling because the sync is really bad and i think is because the non-based physics..
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jeffersoncosta > There's no tutorial as it's not a feature of the engine, although it's been done quite a few times now. Why would the sync be bad because of non-physics based collisions though? It's actually less data to sync than physics (unless you rely on client side physics, which would probably be a bad idea in a multiplayer game).
     
  5. jeffersoncosta

    jeffersoncosta

    Joined:
    Aug 11, 2018
    Posts:
    4
    Oh, makes sense.. Can you please give me some directions?
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jeffersoncosta > As I said, it's not a feature of the engine, and it really depends on your own gameplay and targets, so there's no generic answer to that question. I'd start with some Photon tutorials I guess.
     
  7. jfu007

    jfu007

    Joined:
    May 30, 2018
    Posts:
    7
    Hello i have question, i recently buy corgi but i have problem, i create my own character following steps, but when characters arrive to end of the platform collider he jump in space alone
     
  8. karzo

    karzo

    Joined:
    May 10, 2013
    Posts:
    1
    Hi! I want to fly pressing V button only once but I can´t fine the right command to replace ButtonDown. Could you pleace help me?
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @karzo > Replace ButtonDown? I'm not sure I understand what you mean.
    And please use the support email for support questions, thanks!
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jfu007 > Please use the support email and provide some details : what version of Unity, what version of the engine, did you try comparing with other demo characters? Does the problem happen there as well? Etc.
     
  11. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
    Hi Reuno,

    I purchased the Corgi Engine a few weeks ago.

    Concerning "Character Horizontal Movement" ability and friction. (RetroAdventure1).

    My player's horizontal speed (walking) to 10. When I walk on normal ground, the speed is fine.

    However, when I walk on ice, the character does "slip" as expected (i.e. keeps moving after releasing the movement keys), but the initial acceleration (when moving down the left/right keys) on ice is slower than when on ground (which is not something I expect).

    I would expect the initial speed-up/acceleration due to moving movement keys when walking on ice to be at least the same as on grass. It might just be me who feels this but I feel that it is slightly odd behaviour. Sorry for my poor English, I can re-explain in email or a ticket.
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @EGA > That's by design (the idea was to emulate Mario's behaviour on ice), as it was the most requested behaviour.
    Feel free to modify it though, that's why the system is that open :)
    The easiest way to do it would be by extending CharacterHorizontalMovement and overriding the HandleFriction method to have it behave exactly how you'd like it to.
     
  13. polyconvex

    polyconvex

    Joined:
    Aug 17, 2018
    Posts:
    7
    Hello, amazing asset I'm really enjoying this!

    I have a question though. Is it possible to achieve the movement I have illustrated in the pictures with the Corgi engine?

    I need the character to be able to stick to some platforms seamlessly when moving. When the character moves over the corner with grounded state, its orientation and gravity direction changes accordingly, and the camera would orient itself to the characters orientation too. If the character encounters a "sticky gravity wall" while walking, it will then proceed to walk on the wall.

    I know this might be too complex and if this is not possible with Corgi then can anyone point me to the right direction how to achieve this? Total Unity noob here and if this is achievable with some way other than C# (some other asset, extension, plugin) then that would be nice. THX MUCH!


    movementWall.png movement.png
     
    Last edited: Aug 28, 2018
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @polyconvex > It might be doable using the GravityZone feature (or GravityPoints), but that's not really what they were designed for, and you might get some slight hops when going from one angle to the next.
    It's worth a try, especially if you're new to Unity, as I don't know of any ready made solution for that.
    If you want a perfect behaviour for this specific use case you'll want to implement your own character ability, that's what would get you perfect stickiness in such a situation.
     
    polyconvex likes this.
  15. polyconvex

    polyconvex

    Joined:
    Aug 17, 2018
    Posts:
    7
    Ok nice thanks for the fast reply and advice :) I'll look into those. Maybe these things will be a in a future release someday ;)...
     
    reuno likes this.
  16. myrkraverk

    myrkraverk

    Joined:
    Aug 3, 2018
    Posts:
    5
    @reuno Thank you. I got my enemy sprite to stop and start on my events with a custom AI Decision.
     
    reuno likes this.
  17. shyamlondonconsolidated

    shyamlondonconsolidated

    Joined:
    Apr 1, 2018
    Posts:
    36
    Hi! The asset is really good and I’m using it as a basis for my game. However i am running into some issues with the retro level selection scene. Level01 remains unlocked whilst I progress and complete level01, the next level02 remains locked

    I have put the prefab retro adventure progress into each of my level scenes as well as the level selection scene

    Also I have added the retro adventure finish level in each of my levels

    Are there any steps I need to take to allow the lock unlock mechanism to work? I have looked at the original file but can’t find any differences?

    Kind Regards

    SLC
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @shyamlondonconsolidated > I'm not sure what you could be doing wrong here. It's a pretty straightforward scene, and unless you've badly written the name of the levels or forgotten the ProgressManager, I don't see how it could not work. You may want to create your own progress manager though, the Retro one is for.. . retro scenes. It's just an example.
    Have you read the documentation and watched the tutorial? Have you compared with the demo scenes? If the problem persists please use the support email and provide more details.
     
  19. shyamlondonconsolidated

    shyamlondonconsolidated

    Joined:
    Apr 1, 2018
    Posts:
    36
    Hi Reuno,

    One observation I notice is that in level01 when I complete the level and the "level complete splash pops up", I can see that the in the RetroAdventureProgressManager, the level01 complete is ticked and the level02 the level unlocked is ticked

    when i then click next level, the loading splash pops up and level02 loads up, the information now stored in the progressmanager reverts back to the default values, whereby level02 level unlocked is unticked and level01 level complete is unticked

    I hope this makes sense?

    Kind Regards,

    SLC
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @shyamlondonconsolidated > No, unfortunately that doesn't help much. Please use the support email and answer my questions, thanks!
     
  21. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    @reuno

    This is probably an odd request for the to-do list, if it isn't possible already, but could we add the ability to have multiple different loading screens in one project? It would be cool to, for example, build variations of the loading screen that look as though it deteriorates over the course of the game or loading screens that can reflect the particular scene being loaded.

    My game is really simple and loading only takes a second or so, so another cool use of such a feature would be to hide the fact that the game is loading. For example, using a fade to black to end a scene, followed by a solid black loading screen, then a fade-in at the start of the next scene. It could create a pretty seamless transition. It would go really well with the Sound Manager's ability to carry the current song over loading screens!

    Sorry in advance if this is already in the engine and I've missed how to do it! If it isn't possible thank you for considering it!
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @NEHWind2 > You can already do that. You just have to change the LoadingSceneManager's LoadingScreenSceneName value to whatever you prefer. And you can always use Unity's built in scene loading methods.
     
    NEHWind2 likes this.
  23. NEHWind2

    NEHWind2

    Joined:
    Jan 7, 2016
    Posts:
    31
    @reuno > Oh! Understood! I'll check that out. Thank you very much!
     
    reuno likes this.
  24. thundercatoh

    thundercatoh

    Joined:
    Jul 3, 2018
    Posts:
    4
    @reuno Hello there, just one question if i may.

    Im creating a parallax effect with a perspective camera. It works fine, i just would like to know how to confine the camera to dont above or below a certain area. Havent found a way to do this, it should be simple to do, but im dont know how at the moment.

    Can you shed some light on this? Thanks
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @thundercatoh > There's no confine mechanics for perspective cameras in the engine (there is for orthographic ones though). I'd suggest using Cinemachine's confine system, it's the best out there, and (almost) built into Unity now. Or you can look at how it's done for the orthographic camera and adapt that for your situation.
     
  26. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    How does corgi work with tile maps and jump thrus? Can individual tiles be assigned as jumpthru tiles? Also, if multiple jumpthru tiles are stacked that exceed the height of the player collision, how does Corgi handle this (a popular problem most platform engines is to ignore every stacked jumpthru besides the lowest tile).
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Zebbi > There are one way platforms (and moving one way platforms, and mid height one way platforms, and more).
    You can set them up pretty much however you want, and the engine comes with examples of many possible combinations. How they behave depends on your settings, but the engine will accomodate for most common cases. It'll work with tilemaps as well, just like every other feature in the engine.
    I'm not sure what you mean when you say exceed the height of the player collision though, so hard to answer that one.
     
  28. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
    When I talk to NPCs (e.g. on the MESA scenes), on PC it works fine (where the A prompts up and I talk to the big NPC, and then a black speech-bubble pops above the NPC as expected).

    But, when I'm on mobile (Android, testing on the Unity editor), I press the green A on the mobile controls, does not trigger the dialogue. I also tested it on my Android device.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @EGA > It should work with the latest version of the asset. Otherwise you just have to bind the button to the InputManager's Interact action, that's all. If the problem persists please use the support email, thanks.
     
  30. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    Well, if you stack multiple one-way tiles on top of each other and try to jump on one of them, does it register each tile properly?
    And I'm still not sure how corgi handles individual tiles being either solid tiles, one-way tiles, etc?
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Zebbi > What do you mean "properly"? It depends on your expected result, I can't guess which one of the possible outcomes (there are many) you're after. As I said, the engine will accomodate for most of the common use cases, based on user requests and actual games. There's not just one behaviour.

    If you're asking how you define whether a platform is one way or solid, that's as simple as setting its layer.
    In general whether a tile (or any collider really, the engine is not exclusively tile based) is one way, moving, solid, etc depends on what settings you specify (layer mostly, components, etc), and how you've setup your characters in the first place. I'd suggest looking at the documentation and/or tutorials if you want to learn more about that.
     
  32. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    If you land on a stacked one-way tile, does the player land on it or fall through? If you place multiple one-way tiles directly above each other, does the player land on the one-way tiles as one would expect or does the player fall through any of them incorrectly? This is just a common bug with stacked one-way tiles, and I'm asking you since I don't own Corgi and I'm asking before I consider buying it.

    As for tilemaps, I have no idea how Unity organises tiles since I haven't looked into them yet, and while this is obviously not a Corgi issue, I just wanted to know if Corgi needed any special set-up for the one-way tiles and solid tile layers. If Corgi recognises a tile as solid or one-way, I presume this means I'd need two tilemaps on two different layers?
     
  33. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    Hi, I'm trying to do a level with a moving platform from start to finish, but checking the "reset position when player respawns" doesn't work when the player dies, it just keeps going (no idea why).

    Any idea of why it isn't working, or another way of achieving this result ?

    I'm using v5.1 and unity 2018.2.6 (but it wasn't working on 2018.2.5 either).
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Zebbi > No, you don't fall through stacked one way tiles if you've set them up not to falll through them (if I understand what you're describing correctly). I have to admit I didn't know it was a common bug. In what game have you found this behaving incorrectly? And again, as I said, there are many possible settings to accomodate for most, if not all use cases. The engine is just that, an engine, that will allow you to set things up just like you want. It's not just a template, so there's not one answer to your question. And you can always extend it to implement your own, specific behaviour.
    And yes, with Unity's built in system, you'll want two tilemaps for two layers. But once again, as is usually the case with Unity, there's more than one way to do things.

    @shredingskin > This checkbox (and the associated behaviour) is checkpoint driven. It won't reset unless it's bound to a checkpoint you've already passed, which must not be the case in your situation. I can add an option for it to reset wherever the player dies though. Use the support email if you don't want to wait until the next update for this.
     
    Boom_Shaka likes this.
  35. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    Sent you and email.
    Tried adding checkpoints, but it's not working either. How do you bind them ? you need to add additional nodes to the platforms corresponding to the checkpoints ?

    EDIT: Thank you, the script is working as I was hoping !
     
    Last edited: Sep 3, 2018
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @shredingskin > They bind themselves via the LevelManager and based on the settings you've put on it.
    Anyway, I've sent you a version of the class that should solve your issue.
     
  37. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I'd like to see that option (but I can wait for an update)
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Boom_Shaka likes this.
  39. skayster

    skayster

    Joined:
    Aug 12, 2017
    Posts:
    46
    That sounds like a really useful addition! :) would love to see it on more things, such as killed enemies respawning, picked up items respawning (and disappearing from inventory), doors or chests resetting on player death if he did not pass a checkpoint.

    A suggestion for some future update: if the player prefab switch could be activated via an object or in a certain area (instead of keyboard button). That would look like you are entering a parked vehicle/horse :)
     
    Boom_Shaka likes this.
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @skayster > That's already the case. Enemies respawn, same for items, etc. Check out the documentation for more on this.
    And you can have also already have prefab switch activated by objects or anything really, there are public methods, they're super easy to use, it's basically one line of code (again, check out the doc).
     
  41. UnbreakableOne

    UnbreakableOne

    Joined:
    Nov 16, 2013
    Posts:
    168
    Hi,

    How I can change the Joystick's position to be on where player touches the screen? Currently it has a fixed position but I want it to move under player's finger when he or she touches the left half of the screen and then behave as it does now.

    Thanks
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @UnbreakableOne > As explained in the documentation, you'll want to look at the MMTouchDynamicJoystick class.
     
  43. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    Hello,
    i have seen the GameOver function. How can i force game over for example when a timer has elapsed, like,
    if(timer<=0){
    GameOver;
    }
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @knuppel > There is no GameOver function. As explained in the documentation, GameOver is triggered (just like most events in the engine) by triggering a GameOver event.
    Alternatively, you may want to extend the GameManager and/or LevelManager to implement your own rules.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @knuppel > MMEventManager.TriggerEvent(new CorgiEngineEvent(CorgiEngineEventTypes.PlayerDeath));

    Don't hesitate to look at the documentation, it explains in details how events work. And there are many examples of such events being triggered throughout the engine. I found this line in LevelManager simply by clicking on the event in my IDE.
     
  46. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    I did so:

    Code (CSharp):
    1. timeLeft -= Time.deltaTime;
    2.         if (timeLeft < 0)
    3.         {
    4.             Debug.Log("DEATH");
    5.             MMEventManager.TriggerEvent(new CorgiEngineEvent(CorgiEngineEventTypes.PlayerDeath));
    6.         }
    i see "DEATH" in console in unity editor.

    usually the game over scene should be loaded but thr current scen is still active and player is not death.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @knuppel > That's completely normal. That event doesn't trigger a restart, it just says "the player is dead" to anyone who'd listen. From there you can decide how to act.
    As I said, you'll need to catch that event and have it do what you want. Again, that's explained in much more details in the documentation.

    If however you don't like events, you can always use the LevelManager's methods (for example). KillPlayer() for example will kill your character and restart the level.
     
  48. sultanwalid

    sultanwalid

    Joined:
    May 5, 2011
    Posts:
    29
    Hello,

    I’m creating a multiplayer game using gamepads and what I want to do that all the different gamepads have the same button mapping let’s say for example to jump we press (X on ps4) and (A on xbox360)

    And I was wondering does the Corgi Engine has the capability to do that or do i need another system (if yes do you have any recommendation of input manager 'Assets' that works with corgi)
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @sultanwalid > Well it sort of has. Here's what the engine does and does not in that regard :

    - it does support local multiplayer, and it will support different or same inputs across gamepads. Right now you can go to Unity's InputManager panel (edit > project settings > input) and you'll be able to set that up. By default, four controllers are setup, for both keyboard (you'll need tiny hands as pretty much all keys are used over the 4 players, but it works), and Xbox gamepads. Check the documentation for more on that, there's a whole page about input.

    - it doesn't support "easy" rebinding of these outside of this native Unity panel. So you can either input all the alt key/button bindings you want in there, or use something like Rewired, that supports the Corgi Engine, or similar assets to handle that for you.
     
  50. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi,

    I notice there is in the common-->Animation folder there is a defualtAnimationController.controller
    which include the list of parameters, so do you have any tutorial or guidance how to utilize this controller to build our own 2D character animation that match the Corgi engine needs?