Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v7.4 : better inventory]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    To all of you who are requesting ropes, could you tell me exactly what you'd like ?
     
  2. cfree

    cfree

    Joined:
    Sep 30, 2014
    Posts:
    72
    Man, congrats for the awesome job done until this point.
    I think the better feature that could be added is the player interaction with water levels (sink, swim, jump in and out). It certainly would be a nice difference comparing to other similar assets.
     
  3. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    I'm not requesting a rope (would rather have a hookshot :p), but the idea is the same, I think:
    • A distance-limited item that can latch onto a platform or be placed on a platform for the player to grab onto and climb like a ladder.
    • Difference from a ladder: a rope can swing. This might be tricky to implement.
    Anyone else can pitch in their ideas, but this is what came to my mind when I thought of rope.
     
  4. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    263
    Anyway you're willing to break this package up? All I need is the dash script. I know it's not that complicated, I've got mine working halfway decent but i'd rather use yours, I just can't pay 45$ for that one script :p

    Or if you wanna just give it to me ;) ;) ;) <3
     
    Last edited: Feb 4, 2015
  5. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Another suggestion is putting the engine on sale, which would likely satisfy Razputin and drive traffic. Just a thought ;)
     
  6. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    199
    Hello,
    Is there a tutorial on how to replace the animations please ?
     
  7. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    It's very simple; eg prefab player : open Animator Tab , click on each state ( Inspector / motion : use your own animations).
     
    SIV likes this.
  8. NicholasGolden

    NicholasGolden

    Joined:
    Jul 11, 2013
    Posts:
    10

    I would just use one of the assets from the store, soon as you start messing with social / ads whatever then it makes the dev work on everything else that's NOT the core engine. Less is more.

    With most assets - I usually don't have problem with non gameplay plugins (gamecenter, ads, social networks, gameControllers like inControl or control freak etc)
     
  9. NicholasGolden

    NicholasGolden

    Joined:
    Jul 11, 2013
    Posts:
    10
  10. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
  11. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    263
    I still want the dash. But just if you didn't know, theres no cooldown on dashing, you can spam it and fly around lol.
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @cfree > Dude, you're in luck, I actually coded that last night :) So now you can have water bodies (basically a rectangle, or any shape you want) where you set a different gravity. You can then swim up or down, well right now you either sink or jump up, but it's basically how it worked in Mario, you can jump out, it's pretty fun.
    @Exeneva > Alright, that's what I had in mind. Thanks again for your input :) About the sale : I think the engine is still pretty young, and still evolving quickly. I'll put it on sale later on maybe, right now I don't feel the urge.
    @SIV > as @sefou said, there's nothing specific to the Corgi Engine about animations. Look up the Unity doc, I'm sure there are tons of tutorials on the matter.
    @NicholasGolden > I agree with you on that. I focus on the core features. Where did you get that reuno.net/corgi-demo URL though ? If there's a link to it I'd like to fix it :)
    @Razputin > Yup, I fixed the cooldown thing in the upcoming 1.3, and added a few tweaks. I'm afraid I can't just "give you the dash" though. It relies too heavily on other components, it's not just a class you add to your player and then it dashes. I can tell you how it works though, as it's pretty easy.
    @sefou > That's very nice of you to help others here. Thanks for the help!
     
  13. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    263
    Yeah can you tell me how it works? I was making one today because the main character in my game dashes. I think it functions similar to yours, but yours is so smooth and stops so nicccceeeee.
     
  14. csotomon

    csotomon

    Joined:
    Apr 28, 2012
    Posts:
    20
    Hi, on the player script prefab, you should check if the values are null. Somebody probably wasn't use particles or weapons, etc...
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @csotomon > good call, I've added that to 1.3.
    @Razputin > Alright, so basically the idea is that when the player presses your dash button, you first check if the character can dash (depending on your game rules maybe it can't dash on the ground for example). Then you start a coroutine, to which you pass the duration of the boost (in seconds) and the boost force (a vector that you'll add to your character's current movement). Then in your coroutine, you just need a while loop that will add the boost force to your character as a force for the whole boost direction. I hope this helps, there's really not much to it really :)
     
    Razputin and Exeneva like this.
  16. kindel

    kindel

    Joined:
    Jan 17, 2014
    Posts:
    8
    Engine looks great, @reuno !
    I recently bought it and while fiddling around with it I wanted to add a cool-down or a way the Jetpack will get depleted after a few seconds of flight (right now its kinda OP). Also alongside the Heath pickups and coins a fuel pickup would be awesome to refill the Jetpack.

    Also I did not understand how the checkpoint system works, I want the player to be forced to go trough all the checkpoints before getting to the finish line.

    Thank you.
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @kindel > I may add the jetpack fuel thing someday. I still think it's really specific to your game. My goal remains to provide a basis for a game, that you then customize to your needs. Concerning the checkpoint system, right now it's just a way to resurrect the player at a certain point when it dies. Basically, if your character's x coordinate is higher than a checkpoint's x, then you've reached that checkpoint. Next time you die, you'll respawn there.
     
  18. kindel

    kindel

    Joined:
    Jan 17, 2014
    Posts:
    8
    Thank you for the clarification on checkpoints. I\ll just disable the Jetpack functionality all together for my game..
     
  19. csotomon

    csotomon

    Joined:
    Apr 28, 2012
    Posts:
    20
    Hi, @reuno maybe is a good idea change the private varibles for protetec, because if I want to inherit some class (eg Player).
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @csotomon > I've changed most of that in the upcoming 1.3, you'll tell me if that's better.
     
  21. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,346
    I just wanted to confirm (for others) that jumpthrough slopes are *not* yet present in 1.2 of the engine. Though, as far as I'm aware, they are present in 1.3 (in which I'm eagerly anticipating!)

    @reuno
    In case you are still having trouble with the moving jumpthrough platforms, I wanted to offer some points of consideration in your approach for these:

    1) New Super Mario Bros. (particularly on the Wii and above) is a good modern example to follow for how to approach platform physics - namely, any platform can be at any angle and any position over a number of frames (i.e. moving jumpthrough slopes / coins / block configurations) and the platforms reposition the player up with them if they move upward, or at an angle, and so on -- even pulling the player down with them as they move in any other direction (which still allows a player their independent movement while on top of the platform, despite it moving). With this setup, you can avoid needing anything special in the player controller (other than, perhaps, registering the current platform and the platform type the player is currently standing on) -- the platform itself handles the repositioning of the player, since the plaforms must be repositioned *first* in each physics step -- and before they're repositioned, they check to see if there are any objects on top of them, and if so, these objects are first repositioned by the platform gameobject, and then the platform itself is allowed to move beneath them (ensuring that no collision with the platform ever happens, even for a moment -- which is extremely important!), and this also allows the checking for any solid objects or other platforms the player cannot cross by raycasting from each corner of the player's bbox to check from the start position to the end bbox position in order to see if the platform is moving into a solid object's geometry and stop the player at that position rather than letting them teleport into the geometry. The key to this is to queue the movements of all platforms first, then check if they have objects (that respond to collisions) on top of them (players, items, or otherwise), and now move the objects, then, finally, let the other objects (players, items, etc.) process their physics update events. This will ensure all objects will arrive in their new locations *after* the moving platforms have been positioned to their final spots (or perhaps you could use Update and LateUpdate instead?). Anyway tags are key here. If the moving platform would intersect a player/item/etc on its path to its new position, it will reposition the player/item/etc (that responds to collsions) to just past the platform's new position (using the moving platform's rate of movement speed derived from the previous position to the new platform position to reposition the players/items/etc precisesly above the platform's new location and then, later, they can call their own collision checking code). You can create a temporary Polygon Collider (or some equivalent) to check if the moving platform would collide with anything between its point A and point B in the area of this step (effectively checking an entire area rather than being forced to use a bunch of raycasts, which might miss something in the spaces between) and collect all these gameobjects in a list and reposition them individually based on the final position of the platform (and its rate of speed). This *might* have trouble working *perfectly* with an interpolated movement curve (i.e. with 'tweens'), but using such a precise way of positioning things may make up for it depending on the method you process your gameobjects' physics.

    2) Some reading on other polygon collision methods that might help in your checks:

    http://answers.unity3d.com/questions/8207/charactercontroller-falls-through-or-slips-off-mov.html

    http://stackoverflow.com/questions/5149548/2d-platformer-collision-handling

    http://gamedev.stackexchange.com/qu...e-sat-minimum-displacement-along-a-given-axis

    http://elancev.name/oliver/2D polygon.htm

    Fast-moving collision-response is indeed an interesting and challenging topic. I've spent a long time sorting through algorithms to figure out which is best. Considering the rate of speed, movement vector, and previous locations. Here's to good luck implementing this -- it can be rather painful to find any really good documentation on it! D:
     
  22. testure

    testure

    Joined:
    Jul 3, 2011
    Posts:
    81
    I'd drop $50+ on this in an instant if it were also set up to easily use 3D assets in a 2D platformer
     
  23. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    @testure What's stopping you? 2D in Unity is just projected 3D.
     
  24. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    I've finally bit the bullet and purchased the asset for full price. After all, it seems like reuno wants to avoid a sudden spike in customer requests at the moment.

    A couple of initial questions since documentation is a bit lacking:
    • How to disable double jump?
    • Where can I modify the force from a wall jump? Right now it's a bit abrupt and strong for my tastes.
    • What prefabs are required in a scene when setting up a new scene?
     
    Last edited: Feb 6, 2015
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    Quick reply :
    @testure > As the name implies, it's a 2D platformer engine. Don't expect 3D anytime soon.
    @Exeneva : Thanks for buying the asset.
    1 - Double jump parameters are improved in 1.3, you should wait for it.
    2 - You can't right now.
    3 - As it's been mentioned previously, in 1.2 you need Manager and LevelBounds. 1.3 will include a "minimal" scene.

    To all of you, I think I'll submit 1.3 this weekend, as it already includes a lot of new stuff. Be aware that it probably won't be retrocompatible with 1.2, so update at your own risk. It was not possible to add new stuff and pave the way for the coming features without breaking retrocompatibility. Sorry about that. It'll get better now.
     
    Exeneva likes this.
  26. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    I had a feeling I should wait until 1.3 before I start tinkering. Thank goodness I just purchased today, haha!

    Regarding modify force from a wall jump - is this something that still can't be modified in 1.3?

    The "minimal" scene in 1.3 is a great addition, looking forward to it.

    It would also be great to see a 'todo' list somewhere on the official site, this way we know what is coming (sorry if this is already there and I just haven't found it). 1.4 is probably a long ways off, but it would be great to know ahead of time when the next build will break compatibility.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @Exeneva > Everything can be modified if you want to. I actually encourage you to modify stuff. I've added a lot of comments in 1.3, basically 1 comment per code line in the most tricky and core scripts.
    The Corgi Engine will never be a project where you tweak everything from the inspector, because that's simply not how you create a game (in my opinion), and saying so would be lying to you all. It provides a strong and professional basis for your project, for you to expand upon if you need new features.
     
    Exeneva likes this.
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @Exeneva > About the todo list, it's actually already there : http://www.reuno.net/corgi-engine-the-best-unity-2d-platformer-kit (look for "what's next" at the bottom of the page). It's more of a wishlist than what's coming in 1.3 though.
    I'll post a more detailed list soon but 1.3 is mainly a better architecture of the core functions, bugfixes, customization and a ton of comments, but also adds fun stuff like water, one way slopes, a follower AI, etc...
     
  29. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Right, I'm not asking for a non-coding solution.

    What I was referring to in my last paragraph is something I encountered with another asset. I purchased it at the time when the author was doing a 'major rewrite' of the kit. When the kit update was released, I realized I could not import the update because my game was already a heavily modified version of his kit and that his rewrite would break a lot of things. The rewrite (and refactor) turned out to be something I wished I had waited on, since I am still refactoring his old code and scratching my head over things today.

    It's great that you added comments to the code. What I will do is peruse your todo list (when it's posted), decide if the next version has features I desperately need or not, and then decide at what version I will start heavily modifying your kit to suit my project's needs.
     
  30. csotomon

    csotomon

    Joined:
    Apr 28, 2012
    Posts:
    20
    Hi @reuno, when U change of level, the player and GameManager objects are destroyed, is U want keep some properties (eg coins, bullets, points) between levers U can't do it
     
  31. viizro

    viizro

    Joined:
    Jul 4, 2012
    Posts:
    1
    Any tips for getting mobile controls to work? I'm not great at scripting, and did not see a prefab for the mobile controls. Am I missing something?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @csotomon > That's normal. That's how I intended it to work. In 1.3 the gamemanager (that manages points) will be persistent.
    @viizro > Yes, you're missing the readme file at the root of the asset, that explains it.
    I'll just copy and paste the relevant bit here :
    You can activate / desactivate mobile inputs via the menu in your editor's top bar (the bar with File, Edit, etc...).
    There's a "Mobile Input" entry there, just enable or disable it. Disabling it will hide all mobile inputs.
    It should also automatically enable or disable it depending on your target platform when building.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    I'm glad to announce I've just submitted the 1.3 update of the Corgi Engine to the asset store.

    A few things about that new version :
    - it WILL break compatibility with older versions of the asset. If you already have a project using the Corgi Engine, that you have improved or customized, update at your own risk.
    - that compatibility break was made necessary by the massive structural refactor I've done. It's now more stable, easier to build on, and paves the way for future updates.
    - I've decided to raise the price (and I may do it again in the future) of the asset to $50 to better reflect its value, and also to compensate for the time I spend doing support. Of course if you already own the asset (thanks for buying it), that won't affect you. If you don't own it already, well now's the time to buy it, while the update is still pending validation.

    I've also updated the asset's website with a FAQ, changelog, and roadmap for future features, and a new version of the demo, you can go ahead and try the new features right now (the new stuff is mostly in levels 2 and 3, and in top right corner of level 1).

    Here are the full 1.3 release notes. I'll post again when Unity validates the update :
    • Complete documentation
    • All classes are now filled with tons of comments
    • Large refactor of most core classes. Note that this will break retrocompatibility. Also, to avoid confusion, throughout the whole engine, "player" now means the actual (human) player, "character" now means the character on screen
    • Adds methods to fade the screen to black (or any color of your choice)
    • Adds bullet time collectible item
    • Adds easier and better sound management. Separate classes for Sfx and Music, options to have music on or off, set music and Sfx volumes independently
    • Adds bubble-filled water bodies, swimming, and jumps out of water
    • Adds better support for 1 way (or 2 ways) slopes
    • Adds the possibility to turn character actions on or off (can the player double jump ? dash ? shoot ? etc...)
    • Adds a new AI : the follower. Basically a clone of the main character, that tries to follow it everywhere.
    • Adds a "number of jumps" option for the character.
    • Enemies now have customizable health by default
    • Fixed a bug that happened while jumping down a 1way slope
    • Fixed a bug that happened when the player collided with a moving platform
    • Fixed a bug that happened when changing weapon while shooting
    • Fixed a bug that sometimes happened when launching scene 2 directly
    • Fixed a bug with the dash cooldown (that simply didn’t work)
    • Fixed a bug - and simplified - the CanJump behaviors
    Thanks a lot to everyone who's helped with feedback and bug reports, I appreciate it a lot. And if you like the asset and want to help, please head to the store and leave a nice note/comment on the asset.
     
    Exeneva likes this.
  34. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Sounds wonderful. Quick question: Are the items in the 'Coming Soon' (not 'Coming Later') section of your website the things planned for 1.4, or would only some of them be coming in 1.4 (meaning some might be 1.5, 1.6, etc.)?
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @Exeneva > I can't really say. It will all depend on how fast I go through these. I have a life and a job besides that asset, and I still do it primarily for fun (as clearly it doesn't make that much money), so I won't be giving dates or a more precise roadmap than this. The things in "coming soon" will be coming sooner than the ones in "coming later". Again, I think people should buy assets (and anything, really) for what's been released, not what's to come. I won't be held responsible if one or more of the items in the roadmap don't end up in the asset.
     
    Exeneva likes this.
  36. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    I see. The text/dialogue pop-ups is the main thing I will be waiting for :)
     
  37. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    is it possible to create a key feature in which the player must grab a key before being able to go to the finish level section.

    Also is it possible to keep your points throughout the entire game not just per level like mario.
    thank you in advance!
     
  38. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    This should be easy in script, although I can see how it might not be straightforward if the inventory system isn't added yet.

    Just create a boolean variable in script for the player and if the player collides with the key object, set it to true.

    Then if the player collides with the finish level section/object, check if the boolean is true before allowing the player to move on. If false, you can display a message to the player saying the key is needed.

    Man, it would be nice to have the text/dialogue thing added... lol
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @snake77jt > The key/chest feature is in my todo list. Feel free to code your own in the meantime (it's pretty easy to do). @Exeneva's solution seems good to me.
    About "keeping your points throughout the level", though, if you update to 1.3 you'll see this has been added.

    By the way, important announcement : 1.3 is now available on the Asset Store. Again, it breaks compatibility with 1.2, don't say I didn't mention it!
     
    Exeneva likes this.
  40. goranobradovic

    goranobradovic

    Joined:
    Mar 11, 2014
    Posts:
    16
    Just upgraded to 1.3 and cannot find documentation you are mentioning in a changelog.

    Otherwise Corgi Engine really looks like a way to go. Just purchased it 2 days ago. Great work. I have noticed some influences from 3DBuzz training session (Creating 2D Games in Unity 4.5 - http://www.3dbuzz.com/training/view/creating-2d-games-in-unity-45).

    I also like your coming soon and coming later lists. My vote for inventory system, achievements and even app in-purchase system.

    Question - you are mentioning Spine support. Any chance to do BrashMonkey Spriter support?
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @goranobradovic > I think there's been an issue with the asset store upload thingy then, as you're not the first to mention that. I'll upload a fix tonight, and I'll put the documentation online until Unity approves the fix. Sorry about that.
    Yes, that tutorial was how I got into Unity in the first place, as mentioned (many times) before.
    About Spriter, I tried it a while back, and found Spine to be better, so I never gave it another try. So I'd say it won't come any time soon I'm afraid. To be honest, Spine integration should be pretty straight forward, so I guess Spriter shouldn't be too hard either for someone with basic Unity skills.
     
  42. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    My 2% about Spine ,

    here , you have an great equivalent and cheaper puppet2D completey integrated in Unity :
    http://www.puppet2d.com/

    @reuno,
    i just update to v 1 3 and the one-way platform jumpthrough slope is still buggy.
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @sefou > No improvement ? Have you tried the ones in the demo levels ? I've been running on them a lot lately, and they seemed fine.
     
  44. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    I'm always on the look out for better 2d character controllers and this one looks pretty great! Could you provide more details about the enemy follow ai. Is the follow ai capable of handling jump gaps and ladders to follow the player across different platforms and height levels or is it a simple left right ordeal? Also do enemies use the same raycast based controller as the player?

    Again asset looks awesome and still a great value after the price increase!
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @TheValar > I'm glad you like the asset. So yes, all enemies (well the robots basically, the others don't move much) and the follower use the same raycast controller as the player. The follow AI is pretty basic, and you can give it a try in the demo (on level 2 I think). What it does is it always moves towards the player horizontally (with speed variations depending on distance, can jump over (small) obstacles and use a jetpack to try and reach the player. It's very basic but does the trick as long as you design your level accordingly. It's still a bit dumb sometimes.
     
  46. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hi reuno ,
    my bad ,i just reimport v 1 3 and now one-way platform jumpthrough slope work well.. May be Unity 'update store bug. :)

    NB: v 1 3 one way platform work perfectly now with Ferr2D 'edge collider.
     
    Last edited: Feb 10, 2015
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @sefou > I'm glad to hear it! I've spent ages on these slopes and was starting to lose hope that I'd fix them someday. You just ruined and then made my day!
     
  48. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    Ok not a huge deal, I'm sure I could extend the ai code to make it smarter if I need to. Is the raycast controller efficient enough to have it applied to a large number of enemies at the same time?
     
  49. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,395
    @TheValar > I've never tried with a very large number of enemies, I can give it a try and let you know. Define "large number".
    @Mr.Stein > About the documentation, that's normal, as I mentioned earlier, there's been an error when I uploaded the asset, and the documentation's been left out. I'll fix that in a few hours (and then we'll all have to wait for Unity to approve the update, as usual). But still you should see the other stuff. Try creating a new project and importing it.
     
unityunity