Search Unity

[RELEASED] Easy Ropes 2D

Discussion in 'Assets and Asset Store' started by Rafael_CS, Jul 15, 2015.

  1. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello everyone,
    After publishing my first game ( Bad Blocks ), some devs asked me about some features of the game, so I decided to release my first asset that was also used in the Bad Blocks.
    This package can be used to Easily Implement 2D ropes, 2D bridges and
    simple system to hold objects with balloon. Ropes can also be used to implement ponytail hair in platform games.

    ShowCase.png

    WEBPLAYER DEMO:
    https://dl.dropboxusercontent.com/u/77194506/RopeSystem2D/BuildWebPlayer/BuildWebPlayer.html

    WEBGL DEMO:
    https://dl.dropboxusercontent.com/u/77194506/RopeSystem2D/BuildWebGL/index.html

    SHOWCASE VIDEO:


    DOCUMENTATION:
    https://dl.dropboxusercontent.com/u/77194506/RopeSystem2D/EasyRopes2D_Overview.pdf

    FEATURES:
    - Four demo scenes.
    - Rope System and three rope example prefabs (simple rope, chain pope and bridge rope).
    - Rope Cutter System.
    - Balloon System.
    - Bridge System.
    - Simple Balloon Plugger and Rope Creator Window.
    - Tack System.
    - Editor inspectors and dynamic ropes (even in editor SceneView).
    - Tension gizmos to help you to implement sling effect.
    - 48 breakable objects .
    - AOTSerializer.
    - SceneManager with Callbacks.
    - Extensive Documentation.
    - and much more!..​

    ROPE INSPECTOR SCREENSHOT:
    TackRopeInspectorHorizontal.png

    EASY ROPE CREATOR WINDOW SCREENSHOT:

    TackRopeCreator.png

    GET IT NOW!
    https://www.assetstore.unity3d.com/en/#!/content/40202
     
    Last edited: Jun 1, 2016
  2. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.1 :
    * SceneView Improvements.
    * Fixed minor bugs when rope created with gizmos disabled.
    * Unity 5 improvements.
    * Fixed minor problems with ballon.
    * Fixed shader bugs in Unity 5
    * Fixed Minor bugs in Automatic Defines
    * Fixed JSON problems​
     
    Paulossi likes this.
  3. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.2 :
    * Fixed bugs envolving more than one tensioned rope in same object
    * Fixed null reference in plugged objects without behaviour 'RopesAttached'​
     
  4. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.3 :
    * Fixed NPOT importing error
    * Added TextureSerilizer in Core
    * Minor bug fixes​
     
  5. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.1 :
    * Fixed dependence of custom tags when trying to load resources with unknow tag ​
     
    Gozdek likes this.
  6. Gozdek

    Gozdek

    Joined:
    Jun 21, 2015
    Posts:
    356
    WoW! Good work!
     
  7. Milo_del_mal

    Milo_del_mal

    Joined:
    Jan 27, 2013
    Posts:
    43
    There is an error when your package is imported.


    Fixed: It was a bad preprocessor directive.


    By the way, there are tons of scripts. Do you have any lightweight version that includes ONLY the rope system? You seem to have ropes, and levels, and examples all mixed together.
     
    Last edited: Oct 7, 2015
  8. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello milo, i submitted a new version to assetstore today, this new version will come with better modularization... But all of my packages will still have depedeces of KiltEngine.lib
    Best regards
     
    Milo_del_mal likes this.
  9. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.5 :
    * Fixed minor bugs when trying to cut rope inside Collision triggers
    * Refactored Core Hierarchy. Now the asset will have dependece of KiltEngine.lib folder only...
    * Added new demo scene. This new scene will show to users how to make an object (like a sword, or an arrow) cut the rope.​
     
    Last edited: Oct 9, 2015
  10. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.6 :
    * Fixed Update Cycle of Ropes in Editor Mode
    * Fixed NullRef Exception in Editor Mode when recreating LineRenderer Position​
     
  11. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.7 :
    * Added "Rope Sorting Layer Name" property​
     
    Last edited: Oct 23, 2015
  12. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.8 :
    * Fixed lag problem when trying to enable/disable large ropes.​
     
  13. Flybye

    Flybye

    Joined:
    Mar 25, 2015
    Posts:
    100
    Hi Deceiver,

    In my game I currently have a fast moving object with a "rope" I created attached to it made up of about 40 or so joints and sprites. I had to increase my timestamps in order to make sure all the joints and sprites stay together since the fast moving object they are attached to was tearing the joints apart. My problem is it hurts mobile performance in doing so.

    I noticed in your demo your spring node ropes seem to be stretching the texture. Does this mean your ropes are far more efficient than how I made a fake rope out of many joints and sprites as I did in my game?

    Basically, I am curious if your rope method is less CPU hungry than manually making a rope with many joints and sprites
     
  14. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello Flybye, basically i used joints to make the rope too but instead of using one SpriteRenderer per joint i use one LineRenderer in a chunk of nodes.... My rope have special mechanisms to "Speed Up" tensioned ropes so it will not use normal Joint Physics per node to implement Sling Effect. I really dont recommend use a rope with very large amount of joints like you are using... in my package you can set te distance between nodes adding a rope with small amount of joints increasing the speed of your mobile game... without perfoming in game appearence...

    Best Regards
    KiltAssets
     
  15. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.4.9 :
    * Fixed crash with new SceneManager in Unity 5.3
    * Fixed obsoletes in Unity 5.3​
     
  16. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.5.0 :
    * Fixed errors in EnumHelper when compiling to Windows Phone 8.1​
     
  17. DowseTwoSeven

    DowseTwoSeven

    Joined:
    Jan 13, 2016
    Posts:
    2
    Hello

    I have a question about this great looking extension.

    Can a rope length be changed dynamically?

    I am looking to implement a winding rope effect as if it were being lowered from a hovering helicopter.

    Thank you.
     
  18. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello DowseTwoSeven.. thanks for your question
    I will answer you with a gif:
    resize2.gif


    PS: I really dont recommend do it in realtime because it's not optimized to change amount of nodes every cycle... if you really want to do my tip is: NEVER user ropes with more than 20 nodes and dont change AmountOfNodes too quickly
     
  19. DowseTwoSeven

    DowseTwoSeven

    Joined:
    Jan 13, 2016
    Posts:
    2
    Thank you for your prompt reply.

    That looks fine for what I want it for.

    Looks as though you have a new customer. :)
     
    Rafael_CS likes this.
  20. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    Hello All,

    I want to call some function when the rope destroy. Can anybody tell me how to do this?

    I just want to know how to use callbacks with this system?
     
  21. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello MobApps,
    EasyRopes2D use c# event style to call events... here how to use it:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class MyRopeReceiver : MonoBehaviour
    5. {
    6.     #region Private Variables
    7.  
    8.     [SerializeField]
    9.     Rope2D m_myRopeInstance = null;
    10.  
    11.     #endregion
    12.  
    13.     #region Public Properties
    14.  
    15.     public Rope2D MyRopeInstance
    16.     {
    17.         get
    18.         {
    19.             return m_myRopeInstance;
    20.         }
    21.         set
    22.         {
    23.             if(m_myRopeInstance == value)
    24.                 return;
    25.             UnregisterEvents();
    26.             m_myRopeInstance = value;
    27.             RegisterEvents();
    28.         }
    29.     }
    30.  
    31.     #endregion
    32.  
    33.     #region Unity Functions
    34.  
    35.     protected virtual void OnEnable()
    36.     {
    37.         RegisterEvents();
    38.     }
    39.  
    40.     protected virtual void OnDisable()
    41.     {
    42.         UnregisterEvents();
    43.     }
    44.  
    45.     #endregion
    46.  
    47.     #region Rope Event Receivers
    48.  
    49.     //Receiver for rope event
    50.     protected virtual void HandleOnRopeDestroyed(Rope2D p_ropeDestroyed)
    51.     {
    52.         Debug.Log("Rope Destroyed!!!");
    53.         //TODO: Do something here!!
    54.     }
    55.  
    56.     #endregion
    57.  
    58.     #region Helper Functions
    59.  
    60.     protected virtual void RegisterEvents()
    61.     {
    62.         UnregisterEvents();
    63.         if(m_myRopeInstance!= null)
    64.         {
    65.             m_myRopeInstance.OnRopeDestroyed += HandleOnRopeDestroyed;
    66.         }
    67.     }
    68.  
    69.     protected virtual void UnregisterEvents()
    70.     {
    71.         if(m_myRopeInstance!= null)
    72.         {
    73.             m_myRopeInstance.OnRopeDestroyed -= HandleOnRopeDestroyed;
    74.         }
    75.     }
    76.  
    77.     #endregion
    78. }
    79.  
    If you have any questions about it, please send me an email:
    raf.csoares@gmail.com

    Best Regards
     
    Last edited: Feb 23, 2016
  22. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.6.0
    * Fixed bugs in Unity 5.3.4​
     
  23. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.7.0
    * Added new example scene
    * Added support to node collision detection (Discrete or Continous)​
     
  24. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.0
    * Added initial support to WebGL
    * Fixed bugs with WinRT
    PS: Delete previous KiltEngine.lib folder before upgrade to version 1.1.8.0
     
  25. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Easy on the colors! my eyes hurt
     
  26. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.1
    * Added initial support to WP8​

    PS: Delete previous KiltEngine.lib folder before upgrade to version 1.1.8.1
     
    Last edited: Jun 1, 2016
  27. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.2
    * Fixed bugs in WP8
    * Added support to WinRT8.1 and WinRT10​

    PS: Delete previous KiltEngine.lib folder before upgrade to version 1.1.8.2
     
  28. TurtleBlaze

    TurtleBlaze

    Joined:
    Mar 17, 2016
    Posts:
    4
    Is it possible to create the rope through code?, It seems to delete my object as soon as a try to add the Rope2D component?
     
  29. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello Turtle, you can create ropes with code but you must instantiate one of the pre-config rope prefabs... after instantiate you must set the two TackObjects..
    Remember, WHEN the rope call the Start() Function it will try to create self so if dont have the TackObjects defined the Rope GameObject will be deleted

    Best Regards.
     
  30. TurtleBlaze

    TurtleBlaze

    Joined:
    Mar 17, 2016
    Posts:
    4
    Thanks, got it working. Just upgraded to unity 5.4.0 getting some compile errors you might want to check out.
     
  31. chiwisdp23

    chiwisdp23

    Joined:
    Feb 24, 2014
    Posts:
    2
    Getting these errors in 5.4

    Assets/_KILT/_GameCore/Core/_CoreFrameworks/DefinesSystem/GlobalDefinesSystem/GlobalDefinesManager.cs(120,53): error CS0117: `UnityEditor.BuildTargetGroup' does not contain a definition for `GLESEmu'


    Assets/_KILT/_GameCore/Core/_CoreFrameworks/DefinesSystem/GlobalDefinesSystem/GlobalDefinesManager.cs(120,17): error CS1502: The best overloaded method match for `GlobalDefinesManager.WriteInPrefs(System.Collections.Generic.List<string>, UnityEditor.BuildTargetGroup, bool)' has some invalid arguments


    Assets/_KILT/_GameCore/Core/_CoreFrameworks/DefinesSystem/GlobalDefinesSystem/GlobalDefinesManager.cs(120,17): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEditor.BuildTargetGroup'
     
  32. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello Guys, i submited a new version to assetstore today, but to fix this error just remove the line with compiling error to the script... the GLESEmu was removed from unity 5.4
     
  33. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.4
    * Fixed compiling errors in Unity 5.4​
     
  34. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.5
    * Fixed deprecation warnings in unity 5.4​
     
  35. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    77
    Hello
    I'm interested in Easy Ropes 2D but I have a question
    Can I create ropes at run - time ? I would like to add slings to my game like player can use rope for pull enemy or object or enemy pull player Can do this?

    Thank you
     
  36. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Hello buddy, yeah, you can create ropes in real-time.

    Best Regard
     
  37. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 1.1.8.6
    * Fixed deprecation warnings in unity 5.6
     
  38. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 2.0.0.0
    * Removed Useless APIs
    * Renamed KiltUICamera and GlobalPressBehaviour to CameraInputController and ClickEffectController
    * Replaced old KiltEngine.lib to the new one (with less amount of scripts)
    * Removed dependence from "Example" Folder
    * Removed all assets from "Resources" folder so unity can discard unused assets when building the project (quick, clean and smaller builds)
    * Changed system namespace to Kilt.EasyRopes2D

    PS: Please, remove old version of the EasyRopes2D Before add the new one
     
  39. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 2.0.1
    * Undo Redo System in Prefabs
    * Support to Curve Width, End Cap Vertices and Corner Vertices in LineRenderer Ropes (Unity 5.5+)
     
  40. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 2.1.0
    * Fix some minor problems in rope.
    * Added new experimental mode to stabilize ropes when not tensioned.
     
  41. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    CHANGELOG VERSION 2.2.0
    * Add damping value to spring node
    * Fix minor bugs with mouse dragger
    * Other minor bug fixes
     
  42. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    181
    For anyone in need of the rope cutter trail working with a perspective camera (instead of orthographic).
    Replace line 429 in RopeCutterTrail.cs with:
    Code (CSharp):
    1. Vector3 v_position = CameraThatDrawThisObject.ScreenToWorldPoint(new Vector3(
    2.     Input.mousePosition.x,
    3.     Input.mousePosition.y,
    4.     transform.position.z - CameraThatDrawThisObject.transform.position.z));
    Note: It will still work with orthographic, too.
     
    Last edited: Feb 13, 2020
    Shodan0101 and Rafael_CS like this.
  43. Yurojs

    Yurojs

    Joined:
    Oct 18, 2020
    Posts:
    2
    Hello, I have problem with ropes.
    I trying to Instantiate a rope in real time, when object have collision with balloon I Instantiate a rope
    and attach the rope for a two objects, but its looks like in image
     

    Attached Files:

  44. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    162
    Unity 2D Physics is unprecise when trying to counteract a force in opposite direction resulted by huge amount of physics 2d joints calculations.
    So, to do it you must increase Position Iterations of Physics2D Settings in your unity project.

    By doing it you will be able to increase tension of the rope and keep the position stable but it will cost performance in your game.

    Go to Position Iteration (in Physics2DSettings) and change the value to something bigger (like 20.. or maybe something greater, like 160) and see that the rope will stabilize.

    You must test by yourself the perfect tradeoff between performance and what you want to do.

    Best Regards
     

    Attached Files:

  45. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    56
    Just brought it.What gonna happen when over 20 nodes and or change AmountOfNodes too quickly?I m gonna make a 2d special agent cat hanging from tall buildings like007 and player can control rope length