Search Unity

[Released] Smart 2D Colliders ( including Smart Platform Controller )

Discussion in 'Assets and Asset Store' started by CreativeSpore, Oct 15, 2015.

  1. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Smart colliders are an enhanced version of physic colliders included with Unity, improved to solve some problems found when using the default colliders like sticking when moving a box collider over collider joints, a slope or small imperfections, trespassing colliders when moving fast, etc.

    It's also including a Smart Platform Controller and several samples applying the smart colliders to a platform game. But you can use it in any kind of games where you need a better control of colliders because the smart colliders logic is separated from game logic.

    You can play the platform demo here: http://creativespore.itch.io/smart2dcolliders
    Or try the Web demo: SmartCollidersWeb

    Asset Store URL: http://u3d.as/k5i

    • Check some videos:

    • Check some things you can achieve using Smart Colliders:
    1. Avoid using a circle for foots and a rectangle for the body.
    2. Use the skin around the SmartRectCollider2D body to allow climbing steps and slopes.
    3. Automatic detection of moving platforms, including translation, rotation and scaling.
    4. The SmartRectCollider2D can be scaled and rotated keeping all its properties.
    5. Fast moving detection. No matter how fast it goes, the SmartRectCollider2D will be stopped by the first collider found.
    6. SmartRectCollider2D works separately with 2D & 3D colliders, and you can disable any of them as you wish.
    7. SmartRectCollider2D pushes objects with a rigidBody or rigidBody2D.
    8. SmartRectCollider2D have one way collisions in any direction: up, down, left & right.
    9. Easy to use and modify.
     
    Last edited: Apr 13, 2016
  2. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    I seem look good. I can not play with HTML 5 in browser. Could you build the latest version for webplayer version and post it here ? Thanks
     
  3. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    arkhament likes this.
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Really nice.
    Great presentation explaining the use and benefit of the package.
     
  5. Gozdek

    Gozdek

    Joined:
    Jun 21, 2015
    Posts:
    356
    Wow! Really nice!!!
     
  6. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Very interesting and very well explained ! Great job !
    6R
     
  7. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks for your commentaries :)
    I'm glad that you like it.
     
    arkhament likes this.
  8. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    arkhament, Mr-Stein and theANMATOR2b like this.
  9. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    WOW !
    Another great demo about what we can do with your asset !
    6R
     
  10. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
  11. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @CreativeSpore, can you add to the character controller some stuff like climb ladders, Ledge Grabbing and Grappling Hook? I know there is already "climbing trees and stairs" but when I say "climb ladders" I mean something like this:


    Regards,
     
    theANMATOR2b likes this.
  12. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Sure! I can make the player to climb ladders easily.
    Ledge grabbing could be added later, also ledge swiping.
    And I am already thinking how to make a grappling hook, but it will be a feature for later.

    Right now, I am working on the Galaxy demo, to be included in the next update.
    I want to make a jumper demo as well.
    And a request for vertical and horizontal moving platforms.
    I will add the ladders climbing if I have time.
     
    theANMATOR2b and arkhament like this.
  13. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    Hi @CreativeSpore, I need to say congratulations to you.. your platformer solution is so beautiful.. I will buy your asset next month for sure for my multiplayer game project!

    Congratulations again my friend!
     
  14. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks! I hope you like it.
     
  15. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    The webplayer demo is the latest version ?
     
  16. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    No, I forgot to update the Webplayer demo, but soon there will be a new improved demo and I will remember to update webplayer demo as well.
     
  17. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I have updated the Webplayer demo with last version, including the new Galaxy Demo.
    GalaxyHD.gif
     
    theANMATOR2b and arkhament like this.
  18. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    CreativeSpore likes this.
  19. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Ladders done! I will include them in the next release.

    LadderGif2.gif
     
    Last edited: Nov 7, 2015
    Mr-Stein likes this.
  20. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    OMG!!! thats great CreativeSpore!!! the best asset!!
     
    CreativeSpore likes this.
  21. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New Demo and new version 1.0.3 available:

    You can play the platform demo here: http://creativespore.itch.io/smart2dcolliders
    Or try the Web demo: SmartCollidersWeb

    1.0.3 Features:
    • Added a new demo: Galaxy
    • Added ladders and climbing behaviour
    • Added states to SmartPlatformController
    • Visual improvements in demos
    • Improved jump on top of enemy code
    • Added Cannon and bullet to prefabs
    • Other minor bugs fixing
     
    theANMATOR2b likes this.
  22. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Thanks.
    The Galaxy demo is crazy...
    6R
     
  23. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, it's a little bit crazy a planet rotating around himself and around another planet o_O
    I have unattached the planets to make the demo a little bit less crazy, and also change the camera zoom according to the planet radius
     
  24. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New demo, Pirate Ship, using ladders and climbing areas will be included in the next release.
     
    arkhament and Mr-Stein like this.
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version of Smart 2D Colliders v104 available!

    Version changes:
    • Added a new demo: Pirate Ship
    • Fixed allow rotating ladders
    • Fixed climbing surfaces
    • Galaxy demo stability improvements
    • Zooming out according to planet gravity radius
    • Added IsStuckKills to SmartPlatformController to specify when player should die if he's stuck between colliders SmartPlatformCollider state is now changed synchronously fixing some related bugs
     
    arkhament likes this.
  26. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    It's great to see you are trying to show the different ways to use your incredible asset.
    This pirate ship demo is very nice !

    Any idea about the release of simple horizontal and vertical moving platforms ?

    6R
     
    arkhament likes this.
  27. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    It is amazing the many implementations, we could have a style demo like "Beat'em up"? that could be an example for the combination of physical 2D/3D and for fun
     
  28. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, for next release ;) Funny thing is, it was easy to implement and I leave it for the end, so I forgot to add them in this one.
     
  29. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, I have in mind doing a sort of beat'em up or 2.5D demo. Maybe for a next release.

    BTW, Smart2DColliders will be at special price until the end of the December Ludum Dare . It's a good opportunity to try this asset and ask me for any required feature before then. I will try to do my best to include all possible requests.
     
  30. Mr-Oliv

    Mr-Oliv

    Joined:
    Sep 14, 2012
    Posts:
    33
    Hi! Very cool asset! How is performance on mobile?
     
  31. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks! I'm glad you liked it.
    The performance in mobile is good. I have tested it only in my LG G2 all demos at 60 FPS.
    Here is an apk if you want to try.
    https://dl.dropboxusercontent.com/u/103554271/smart2DColliders.apk
    Movement in mobile is using the gyroscope, turn right to move right, turn left to move left, tap left side of the screen to jump and swipe down on the right side to jump down from platforms. Ladders are not implemented in mobile, so there is no way to go up and down.
     
  32. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I have finished the vertical and horizontal platforms, and improved them by creating a patrol behaviour.
    You can download the scripts from here, and also they will be included in the next version.
    https://creativespore.wordpress.com/2015/11/27/moving-platforms-patrol/
     
  33. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    WOW ! Your platform system is incredible : so easy to use and so efficient ! And with nodes to simply add or to delete !
    Fantastic !!!

    Now I'm waiting for the character controller... ;-)
    6R
     
    CreativeSpore likes this.
  34. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Some questions :
    * The character doesn't "follow" the Platform using your great Patrol behaviour script !?! What do I miss ?
    * Could you add a video tutorial showing how to use/configure our character with your system (with the character I sent you for example !) ?
    * Could you add a "flip at start" option in your character controller script because some of my characters are rendered in the opposite direction than the small character you are using ?
    Thanks.
    6R
     
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    * The patrol behaviour was only for moving an object along a path, it's not an AI. But it could be use for enemies like saws, for example.
    * Sure! I will create a tutorial soon showing how to use the asset with your own character. (I will use your character :) for sure)
    * And, yes, I will add the FlipAtStart or similar thing to achieve that.

    You are welcome ;)
     
  36. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Ah ? You said above : "I have finished the vertical and horizontal platforms and improved them by creating a patrol behaviour."
    It's why I thought it's for moving platforms !?! Sorry.

    Ok ! I'm waiting for the next release...
    Great ! (For the tutorial and the flip at start !)
    6R
     
  37. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version of Smart 2D Colliders v1.0.5 available!

    Version changes:
    • Added dying animation
    • Added KillsOnTouch scrip for killing areas
    • Improved camera bounding box edition
    • Player is not killed when going below Y = -2, but by touching a killing area
    • Improved pixel perfect camera bounding box
    • Added Patrol Behaviour (https://creativespore.wordpress.com/2015/11/27/moving-platforms-patrol/)
    • Added IsSpriteFacingRight to fix charsets facing left
    • Fixed issues using keyboard for controlling the player
    • Fixed Z position change when climbing a ladder
    And soon, there will be another update with a new tutorial scene showing how to create a character controller from scratch thanks to Philippe (p6r) for his art for the tutorial and support.
     
    meapps likes this.
  38. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version of Smart 2D Colliders v1.0.6 available!

    Version Changes:
    • Added Tutorial01 with a sample game used for the tutorial 01
    • Fixed an issue when moving the smart collider in the editor while playing
    • Patrol path now appears when the object is not selected
    • Rigidbody2D added as required component of SmartPlatformController
    • Pixel Perfect Camera Zoom updates the camera zoom while in edit mode
    • Fixed smart collider displacement when gravity is too high
    And I have published the first tutorial for this asset teaching how to create a simple platform game from scratch.

     
    Mr-Stein likes this.
  39. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    Is it possible to add platform-snapping* -camera snaps to the player only as it lands on a platform like in Super Mario World?
     
  40. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi,
    Just adding these lines to the script FollowController attached to the PixelPerfectCamera you can do that:
    Code (CSharp):
    1.  
    2. SmartPlatformController player = Target.GetComponent<SmartPlatformController>();
    3. if (player != null && !player.IsGrounded) destination.y = transform.position.y;
    4.  
    I have attached the modified script as well ;)
     

    Attached Files:

  41. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Thanks for this script and for the idea but it doesn't work with a tall ladder : We have to wait for the character walking on a Platform at the end of climbing. It means the character is disappearing from the screen.
    6R
     
  42. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Add "&& !player.IsClimbing":
    Code (CSharp):
    1. SmartPlatformController player = Target.GetComponent<SmartPlatformController>();
    2. if (player != null && !player.IsGrounded && !player.IsClimbing) destination.y = transform.position.y;
     
  43. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Yes, now it works fine with ladder but not good when the player is falling from the top of the level and there is no Platform below. The player disappears from the screen too.
    6R
     
  44. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    It can be fixed as well adding a minimum distance:
    Code (CSharp):
    1.  
    2. SmartPlatformController player = Target.GetComponent<SmartPlatformController>();
    3. float distToTarget = ((Vector2)(Target.position - transform.position)).sqrMagnitude;
    4. if (player != null && !player.IsGrounded && !player.IsClimbing && distToTarget < 0.5f) destination.y = transform.position.y;
    Change 0.5f for any other distance.
     
  45. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Hmmm... With these lines or without I have the same effect !?!
    Can you see a difference ???
    6R
     
  46. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, but I was using 01 - Demo Moving Platforms, maybe you need to change the distance to be higher. Change the "0.5f" value and try with 5f for example. In the editor, the squares you see in the background are 1x1 units, so you have an idea about the value it should have.
     
  47. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    You're right !
    Now, it works fine and it seems it's an interesting addition...
    Thanks a lot.
    6R
     
  48. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    You are welcome ;)
     
  49. sirio21

    sirio21

    Joined:
    Mar 11, 2013
    Posts:
    114
    Hi! Smart 2D will include ropes? Galaxy demo it work with a box instead a circle?
     
  50. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,
    It does not contain ropes.
    I don't understand you second question. Do you mean rectangle planets?
    What I do in galaxy demo is rotate the rect collider so the bottom is perpendicular to the planet surface, using a box won't work very well I guess. But check the Gravity Demo, maybe it is what you was asking for.