Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.5 : fall damage, crush detection...]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. EdoMiyamoto

    EdoMiyamoto

    Joined:
    Sep 4, 2012
    Posts:
    5
    Hello :)
    Currently testing the lots of possibilities with Corgi this week, so far everything is really good !
    However I ran in a small issue and couldn't find anything about this (tried to read the API but I'm not good at this except with playmaker).
    So here's my question: How do you stop player from firing while the inventory is open ?
    (Setup of my scene: The 3D Soldier equipped with machine gun, I added Inventories and InventoryCanvas, I can select what i want, drop, loot etc, and the character really stop moving during the inventory open phase, but the camera shake still goes on and I can still fire) Any help ?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @EdoMiyamoto > Hello! I'd need to know a bit more about what exactly you did, as I don't reproduce that issue in any of the demos. Does the problem happen there for you, no changes made? If not, can you try looking for differences between your scene and the demos (RetroAI for example's got a machine gun and inventory). If the issue persists, don't hesitate to use the support form to send me more details, I'll be happy to have a look at your issue.
     
  3. EdoMiyamoto

    EdoMiyamoto

    Joined:
    Sep 4, 2012
    Posts:
    5
    Just been testing that !
    So, in RetroAI, no issue when the game is paused, I can't shoot.

    I just tried in Corgi3DxTheHunt, which was my base for my level. I added 2 prefabs, Inventories and InventoryCanvas.
    When I press I, the inventory comes up, I can select stuff with keys and mouse, but clicking does fires through the pause (I'm sure it's paused because I can't move, ennemies neither). I think I'm missing something to disable weapon during a pause but I can't find it !
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @EdoMiyamoto > As I said, comparing with any of the demos usually points you at the solution :) In this case, your weapon (the one from TheHunt) is from a demo that doesn't have a pause feature. It's using a CameraShake feedback that works on unscaled time (it'll keep shaking equally even if the game is slowed down or paused). If you'd like it to pause, I'd recommend using an Impulse feedback instead (as is the case in the Retro MachineGun's used feedback).
     
  5. EdoMiyamoto

    EdoMiyamoto

    Joined:
    Sep 4, 2012
    Posts:
    5
    Oh ok, I was messing with the scenes and looking at every details so I removed the cameraShake for the purpose of my game but yeah I now understand how guns effects works :) I tried adding the Impulse but I'm new with Cinemachine so I guess it's a lot to learn from this ! Thanks for your answers I'll keep learning and hope to show you the results one day :)
    Cheers
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
  7. stevenx

    stevenx

    Joined:
    Jun 7, 2015
    Posts:
    8
    Hello,Reuno.

    I'm using Unity 2019.3.10f1 & Corgi Engine 4.6, I basically use default character parameters.

    My question is that when the character jumps on a stair, there is a change that he will ignore the stair below when he lands on the same stair and falls all the way down. It happens more often when I press the jump button and forward button together. I got this more often in non-maximized play mode than maximized play mode, but it still happens when I play in the editor in maximized mode.

    Another question is when the character jumps and lands on the platform where intersects with a stair, there is almost 100% chance the character will ignore the platform and falls all the way down, in this case, the falling speed is a lot faster than when the character normally falls.

    Thank you for your help in advance.
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @stevenx > I tried to reproduce both issues but couldn't. I tested on 6.5 though. You said 4.6 but I suppose you meant 6.4, stairs didn't exist back in 4.6, they were introduced in 6.2.

    I'd recommend testing in a fresh install of v6.5 to see if the issue persists. If it does, please use the support form to let me know how I can reproduce it. I'd suggest doing it in the MinimalStairs demo scene, it includes most of the possible use cases for stairs. I did fix a few controller/1way platforms/stairs related things in 6.5, hopefully that includes your issues. If it's still there I'll happily fix them!
     
  9. stevenx

    stevenx

    Joined:
    Jun 7, 2015
    Posts:
    8
    Hello,Reuno.

    Thank you for your kind and quick response.
    You are right, I'm using 6.4 :D

    I managed to reproduce it in MinimalStairs demo scene with the Rectangle character, this is caused when the character moving along a stair that is steeper than 45 degrees(my stair was right 45 degrees).
    The steeper the stair is, the better chance the character is going to ignore the stair while jumps on it.
    If you rotate a stair to 58 degrees and make it really long, the character will ignore the stair half of the time.
    (in Character Jump script, Number of jumps = 1, Jump Hight = 1,Jump restrictions = Can Jump On Ground)

    Sometimes this doesn't happen in the first 10-20 attempts, if you keep jumping randomly for a while, I believe it will happen eventually. Also please try to lower the Jump Hight to 0.5.

    This behavior is also related to the framerate, it happens more often when in low framerate(30fps-60fps)
    I'm not sure if this is has something to do with Unity's Fixed timestep.

    Thank you for your help.
     
    Last edited: Jun 18, 2020
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @stevenx > As I said in my previous message, please try on 6.5, and if the issue persists, please use the support form to report it, providing detailed repro steps, thanks. Note that stairs can't be more than 45 degrees if you don't modify the controller.
     
  11. jhaypee1683

    jhaypee1683

    Joined:
    Mar 15, 2015
    Posts:
    5
    Hello I just begin playing with the corgi engine AI few days ago im planning to make a 2d platformer. Im having a hard time making this 2 type of patrol.
    First is the enemy should revolve in a gameobject no matter what the shape.
    Second is to patrol only in a specific distance.

    Is this posible?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jhaypee1683 > I suppose you could use path movement for both of these, but there'd be some manual setup. For the first one you may have to extend it to force orientation. Note that a universal crawler AI is in the plans, I can add your vote to it if you'd like.
     
  13. jhaypee1683

    jhaypee1683

    Joined:
    Mar 15, 2015
    Posts:
    5
    Thanks for the quick reply reuno. I'll check the path movement. On the universal crawler yes please.
     
    reuno likes this.
  14. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    120
    It would take a little work, but you might be able to do it with Advanced AI: set up patrol "waypoints" as a series of AI states based on the spawn position (IE: Waypoint1 = SpawnX + offset1, SpawnY + offset1....Waypoint 2 = SpawnX + offset2, SpawnY + offset2) and have "move to" actions for each state. The movement is hard-coded so you'd have to do it for each "shape", but at least it would work for any spawn position.

    I think that should handle the orientation issue as well, as your object should always face the direction it's heading.
     
    reuno likes this.
  15. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    23
    Corgi Engine is AMAZING!!

    I have added Pixel Crushers Dialogue System which is working well and I also got it working with the inventory engine which is awesome. In the guidance the image shows the conversation being played in the Corgi Engine dialogue zone

    How would I go about achieving this?
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,472
    Hi @SupremeSmash - That looks like a screenshot of the Dialogue System's Corgi integration. The integration instructions are here: Dialogue System Corgi Integration

    If you get stuck or have questions, please feel free to post in the Dialogue System forum thread or the Pixel Crushers forum.
     
    Cunny-Lang and reuno like this.
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @SupremeSmash > About achieving what exactly? You seem to say it's all working well, I'm confused :)
    Edit : oh ok now I get it, it's a screenshot from the documentation. Thanks @TonyLi!
     
  18. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    23
    Sorry for the confusion
     
    reuno likes this.
  19. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    23
    Just added MMFeedbacks to my project and got an error

    Assets\CorgiEngine\ThirdParty\MoreMountains\MMTools\Tools\MMDebugMenu\Scripts\Tabs\MMDebugMenuDebugTab.cs(89,58): error CS0426: The type name 'DebugLogItem' does not exist in the type 'MMDebug'
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @SupremeSmash > MMFeedbacks are already included in the Corgi Engine, there's no need to add anything.
    If the issue persists, please use the support form and provide more info about what you did, what versions you're using, etc.
     
    SupremeSmash likes this.
  21. mhrfrht

    mhrfrht

    Joined:
    Dec 15, 2018
    Posts:
    1
    Hello,
    Is it possible in the future to support photon.
    I think that the only thing missing to Corgi is online multiplayer
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @mhrfrht > Unfortunately it's quite hard to provide a universal solution that'd work for all the possible gameplays that the engine accomodates.
    Plus, having done it once before, with the Highroad Engine, I'm not too eager to do it again. Network programming requires quite a lot of effort and experience, and I got a lot of feedback from users that bought it thinking it'd magically make them network programmers. Unfortunately, it doesn't, and it's still quite hard to deal with matchmaking, load balancing, server architecture, sync strategies, etc. The engine part is only a tiny fraction of what's needed to accomplish on a network based project, and the easiest by far.
    But I've noted your interest!
     
  23. masak

    masak

    Joined:
    Aug 14, 2011
    Posts:
    12
    hello,

    I tried to implement push and pull a box.
    But a 3d character could push the box with no push animation without pushing button even if i checked "ButtonBased".
    And I could not pull the box.
    (Strictly speaking, the character looked like pulling at 1~2 frame. I uploaded a movie.

    How can i implement to pull action?
     

    Attached Files:

  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @masak > Pull (and push) is already built-in, there's nothing to implement.
    You can see an example of it in the RetroPush demo scene, and a few others. The documentation and the ability's inspector explains how to set it up. If your issue persists, please use the support form and provide repro steps to it, I'll be happy to check it out for you.
     
    masak likes this.
  25. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    22
    Hi there, this is more of a Unity questions, but hopefully I could get some help. I updated my project to 6.5 with Unitys latest version. Problem is that in my previous version instead of making my own Palette, I keep on adding new tiles to the Retro Palette that is default con Corgi Engine. So when the project its imported to 6.5 this Retro Palette prefab, goes back to its original default form. What could I do so I can bring back, the Retropalette, from 6.4 of my previous project ( I still have the backup). I tried just replacing the old with new, but I cannot see the new tiles i added after doing this.

    Thanks!
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @piccolodmq > Ideally you wouldn't modify any of the engine's files, like with any other framework. Instead it'd be best to create your own palette. If that's too late for that, I suppose you should be able to backup the old palette file, as well as all its dependencies (target sprites, meta files) and paste that in the new version of the project. As you say it's more of a Unity question, and maybe the tilemap team could help better, but unless I'm mistaken, palettes are just text files, you should be able to pinpoint all its dependencies by opening it with any text editor.
     
  27. Amalfi-Prozen

    Amalfi-Prozen

    Joined:
    Feb 2, 2014
    Posts:
    30
    Hi I see that the corgiController is in the update, could I put it in a fixedUpdate or will it ruin everything? I need a specific time in my game because I calculate the intensity of some forces based on time.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @Amalfi-Prozen > The CorgiController is not physics based, so it wouldn't make much sense to have it run on fixed update. That doesn't mean you can't have other components working on fixed update, or do computations based on time, it's unrelated. You'll find examples of both in other classes of the engine.
     
  29. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    22
    Not all the Tiles where in there so its easier to remake them in their own separete section. Thanks for the reply!
     
    reuno likes this.
  30. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    Trying to create a pushable block. Dragged the prefab from the retro demo into my scene, its sorting layer is "pushables" and its sprite renderer sorting layer is foreground.
    Firstly, what is the key binding for the push ability? I walk up to the block but my player can't push it, he just walks behind it.
    Thanks
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jjkrr > As explained in the documentation, or as you can see if you open your input settings, the default binding is "3" on your keyboard, feel free to change it to whatever you prefer :)

    upload_2020-6-24_16-31-53.png

    And of course there's an option to make push independent from the press of a button if you'd like.
     
  32. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    @reuno Ah sorry, I don't know how I missed that in the input settings.
    Thanks for the response. :)
     
    reuno likes this.
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jjkrr > There's quite a lot of them now :)
     
  34. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    @reuno If you wouldn't mind, if I have the character push component on the player, what has to happen to collide with the pushable block and push when the key is pressed? He still walks behind it.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jjkrr > Does the problem happen in the demo scene? If not, have you tried comparing with it?
    My guess would be a wrong layer setup, but without more info it's very hard to tell.
    If the issue persists, please use the support form and provide repro steps of what you did, I'll be happy to help you out.
     
  36. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    @reuno > it works in the demo scene with the corgi. In my scene, my player is on sorting layer 'player,' to repicate the layer setting on the retro corgi player. The retro prefab block from the demo is on 'pushables.' I thought it was because I didn't have a rigid body attached to my player, but that didn't do anything.
    I'll try to gather more info, but I have everything set up like the demo as far as I can see.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jjkrr > If it behaves differently, there has to be a difference somewhere.
    As I said, aside from a wrong layer setup (not having pushables in your platform mask, or having modified the collision matrix) I can't think of anything that'd prevent collision with your pushable object.
    Again if you can provide repro steps I'm sure I'll be able to sort this out for you quickly.
     
  38. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    @reuno > What do you mean by collision matrix, and how would I have modified it?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @jjkrr > The physics collision matrix is this matrix in the physics (2D, in our case) settings :



    You can modify it by clicking on any of the checkboxes.
     
  40. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    120
    sorting layer is for rendering (i.e. which objects will be on top of other objects).

    collisions are handled in regular layers. check there first
     
    reuno likes this.
  41. marcovito

    marcovito

    Joined:
    Feb 18, 2019
    Posts:
    2
    Hi there,
    First of all, this is an amazing tool. It has a lot of great functionalities and the code is really decoupled, which makes it easy to expand and modify for particular needs.
    But I would like to suggest some improvements to the way Corgi engine handles audio. As far as I can see (please, tell me if I'm wrong), the intended workflow is using MMFeedbacks to instantiate sound effects when certain conditions are met. This is a really simple workflow, and I like the concept. But MMFeedbacks audio tools are limited; they don't allow you to choose if the sound is going to be 2D or 3D, as an example, and this is a must for a proper sound editing. The Sound Manager also seems to have some trouble in dealing with Unity's regular Audio Source component (not sure why, since I'm writing this before checking the code, a task that can always take a long time); just adding regular Audio Source components with 3D sounds don't allow us to have the desired 3D effect (actually, we have no sound at all).
    Anyway, there might be something I'm missing, and actually the best outcome is if it's just dumbness from my side. But I didn't find anything on the demos or the documentation about 3D sound, and this is already a basic resource I miss on Corgi Engine.

    Another sound design improving is letting the user choose an array of sound clips, and while in loop play then randomly (the random an option can be a boolean). This is a standard way to make walking sounds feel more varied and natural (by putting different step sounds and instantiating one of the sounds from the array in a random order).

    Anyway, I'm just now getting to the analysis of the sound on the engine, but it was the biggest disappointment I had so far, I think that's also because everything else works in an amazing way.

    Thanks!
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @marcovito > You can simply not use the built-in Sound Feedback if you'd like, but instead use the AudioSource Feedback. This will let you target already setup audio sources, with the full control that the native audio sources provide. It's not Wwise level, and may not be enough for most productions, but if that works for you, there's absolutely no limit to what you can do, and everything you described can be setup that way :)

    What I see happen on most productions is people create their own feedback to feed audio into their audio pipeline of choice (whether it's wwise, or any of its competitors, or an in house solution). It's not built-in as it's not possible to cover them all (not even mentioning the dependencies it'd generate), and it's quite easy to implement once you know what solution you're going with (these APIs are usually quite simple), and once you have the examples provided in MMFeedbacks.

    As for random sounds, they are already built-in in the Sound Feedback :

    upload_2020-6-25_9-1-4.png
     
    Boom_Shaka likes this.
  43. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    22
    Quick Question Reuno, I am using the crush-able assets, in the retrovania room system, but I can hear and "feel" the sounds and impulse feedbacks from the stomping even if I am even 2 rooms far from the crusher. Any way to fix this?
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @piccolodmq > In a fresh install of v6.5 that shouldn't be the case. Did you modify anything from the base demo?
     
  45. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    109
    Hi there!
    I'm making a linear platformer and was wondering if there's a way to add a kind of shop system in between levels where the player can get upgrades that last for the duration of the next level (things like increased max health, defense, attack power, etc.) and then have those go back to their original values when the level is completed, the player is defeated, the player manually quits the game, etc.
    On a similar note, I'm also wondering if it's possible to change those depending on the mode the player chooses. For example, if the player chooses a harder difficulty, they get less max health.
    Is Corgi capable of doing these?
     
  46. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    120
    you'll have to write some code, but the core mechanics for those things are in the engine.
     
    PhantomFox128 likes this.
  47. piccolodmq

    piccolodmq

    Joined:
    Jan 7, 2020
    Posts:
    22
    Hi there, I took the demo level copied and added other assets, (mainly other tilesets), and copied the crusher prefab 3 times in the same room. But, is is supposed to only function when I am in the room where crushers are right?

    I moved the Crusher prefab to Room 7 (its a clone of yours, with different sprites ), and made 2 copies, of it.
    https://drive.google.com/file/d/18NVRtj9giuOiiGNvO14RGtgYve5OFvCy/view?usp=sharing
     
    Last edited: Jun 26, 2020
  48. Dr-Neko

    Dr-Neko

    Joined:
    Oct 5, 2012
    Posts:
    7
    Unity version: 2019.3.7f1
    Corgi Engine version: v6.5

    Hello @reuno.
    I upgraded to Crogi Engine 6.5, and tested out the crusher in RetroVania (first room to the right when entering the level). The crusher works as expected by falling on top of the character. However, when the character jumped on top of the crusher, I expected to be crushed when hitting the ceiling. Unfortunately, the character got stuck in the ceiling. I've tried a few times and got the same result. Can't figure out how to resolve this. Any idea? Thank you.

    corgi.jpg
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,617
    @piccolodmq > Again, does the problem happen in a fresh install? If it does, please let me know (it shouldn't). That'd help narrow down the issue :) The effects of the crusher (sound, cam shake) should only be felt in the room where it is.
    @PhantomFox128 > There is no shop in the asset at the moment (it focuses on platforming), but you can of course add one. And you can absolutely have more/less health, each ability has public APIs you can use to tweak its settings, at runtime or directly per prefab.
    @Dr-Neko > I just gave it a try in a fresh install of the engine, and I die as soon as I hit the ceiling. Did you make any change maybe?
     
  50. Dr-Neko

    Dr-Neko

    Joined:
    Oct 5, 2012
    Posts:
    7
    Hello @reuno.
    Thank you for the quick response.

    I created another project (2D template), imported the latest version of the engine, and got the exact same result. What's odd is sometimes the character dies when hitting the ceiling, but most of the time goes through it and I'm able to see the dust particles running on the ceiling.

    I also upgrading to Unity 2019.4.1f1, created two blank projects (2D template, 3D template), imported the engine via Package Manager (another trial via Asset Store), and got the same result. To double check if it's my PC (Windows 7), I repeated the steps on another computer running Windows 10 and got the same issue.

    Is there anything I can collect/upload to help? Don't know if the manifest.json files (one per template) would be a start. Thank you.
     

    Attached Files:

unityunity