Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Orthello 2D Framework - 100% FREE

Discussion in 'Assets and Asset Store' started by mas, Jul 7, 2011.

  1. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Can you send me the example project to check it? sounds like a bug.
    Send it to : info at wyrmtale dot com.
     
  2. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Actual z-value is calculated and managed by Orthello using the sprite.depth and a painteralgorithm using the x+y sprite.position for ordering purposes. You can disable the painterAlgorithm by calling OT.painterAlgorithm=false, after that z == sprite.depth. Manually adjusting z is not possible.
     
  3. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Regarding nesting .. I am improving on the batching possibilities so that you will be able ( upcoming 2.9 version ) to batch nested items and keeping them in their position, so without having to put them as childs of the batch.

    Update is not called anyway ( for most sprites) because of Orthello passive mode. Deactivate sprites should be on .. passive mode and this 'old' setting have been crossing so .. the 2.9 version will have major improvements on the batching stuff.

    ( the batch.AddSprite ( and RemoveSprite) is already in , but non-documented and in Beta .. but should already put nested objects in while retaining their position )


    After that update it should even be possible to batch elements, chart elements and form elements.

    CORRECTION: Deactivate sprites will totally de-activate the entire game object including all scripts. When not de-activating, all custom scripts will keep running and can adjust the sprite, that will auto-update the batch as it is changed.
     
    Last edited: Aug 4, 2013
  4. Mister-E2

    Mister-E2

    Joined:
    Jun 6, 2013
    Posts:
    179
    Ok then, Well orthello batching won't suit for my gameobjects then, but I seem to have a problem which maybe you will understand.

    My game basically consists of an NxN grid of orthello sprites, these grids are created at runtime, from a prototype gameobject in the scene. All these squares use the same spritesheet, all they differ with is colour and doing some tweening, yet it takes an extra draw call for every single one of them. This to me doesn't make sense, I thought unity itself had internal batching that did this kind of stuff? Also, I am nearly 100% sure it used to be only 1 draw call for them all.

    And I got 1 more problem since switching to Pro, I set the material to be transparent on a sprite like I always did, but now it sets the shader to be mobile/particle/additive automatically, so all my sprites in my game are now defaulting to that shader.

    Thanks


    EDIT: Oops, I found the cause of Unity not auto batching my sprites, it was due to the dynamic batching check box being disabled in the build settings. The other "problem" still remains
     
    Last edited: Aug 4, 2013
  5. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    The Pro is exactly the same as the 100% FREE version regarding the base and core functionality, like setting a sprite to transparent.

    However ..

    if you would provide me with a scene with instructions on how to reproduce your error I would be happy to take a peek. Send it to info at wyrmtale dot com.
     
  6. Sabun

    Sabun

    Joined:
    Nov 13, 2012
    Posts:
    12
    First off, thank you very much for making a free version of Orthello2D and for keeping it up to date to work well in current versions of Unity. I just have a few questions I'd like to ask you.

    Question 1:
    Am I doing the following rotation Tween correctly?

    Code (csharp):
    1. OTObject start = OT.ObjectByName("startbutton");
    2. new OTTween(start,1.0f,OTEasing.Linear).Tween("rotation",(mode==0)?10:0);
    3. mode = 1 - mode;
    If I set it to change between 10 and -10, then the button ends up doing a full 360 rotation which is not what I'm trying to do. However, if I set it to 10:0, then it rotates the way I'd like it to. I wish to have it rotate left then right then left again continuously, not in circles.
    If you could guide me on this, I would appreciate it.

    Question 2:

    I would like to buy Orthello2D Pro from the Asset Store ($35), however I am using Unity Basic [Free].
    Am I able to purchase and use Orthello2D Pro with Unity Basic? I would like to make use of the benefits of sprite batching and also support the further development of Orthello2D.

    Thanks in advance for any help you can provide me with :)
     
  7. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Regarding Thanks

    Your welcome! Now working on an upgrade to support windows 8 output
    ( where is my XmlDocument?!? bah.. )

    Regarding rotation tween

    The tween value when using tween.Tween is absolute, so tweeining it to -10 would rotate to 360-10
    Maybe tween.TweenAdd (additive tween value) will work better?


    Regarding Orthello Pro

    I understand that the 'Pro' naming is a bit confusing but Orthello Pro can be used with the 'Free' Unity Indie version.
     
    Last edited: Aug 5, 2013
  8. Sabun

    Sabun

    Joined:
    Nov 13, 2012
    Posts:
    12
    Thank you very much for the reply.

    I now understand the difference between Tween and TweenAdd.
    I have just bought Orthello 2D thanks to your guidance :)

    EDIT: One more question, I now have Orthello2D Pro. Should I remove the free version? Or is it fine to keep both?
    If I do have to remove the free version, whats the right way to remove it? Thanks in advance.
     
    Last edited: Aug 5, 2013
  9. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Thanks for your sale.

    You can import the pro package in any new project or into an existing that
    has Orthello Free, The code of both products are the same Pro just adds
    some extras.
     
  10. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    Hi people!

    I'm developing a jigsaw puzzle and I'm facing a problem with the pieces size.

    I'm using cocos 2d Atlas. When I create a sprite it doesn't have the real size, it has the size without transparent areas.

    I want to know, can I use the OTSprite in real size? I found the frameSize inside the atlas, but in the OTSprite I can't use it.
     
  11. citizen_12

    citizen_12

    Joined:
    Jun 21, 2013
    Posts:
    33
    Apologies if this has already been asked-- I don't see a way to search a single thread on the forums.

    I would like to use Orthello with LoadLevelAdditive, but it's not clear to me whether this works. I can construct my main Level and my sub-Level (both have OTSprites in them). When I load the sublevel I get two OT objects in the scene and I'm not clear if that should work. From my initial tests it does not-- I get exceptions thrown on Dragging where the owner OTObject is null.

    Thanks.
     
  12. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    You atlas has truncated the image to optimeze it. Cant you set that off in your atlas creation program?
     
  13. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    LoadLevelAdditive is not supported in Orthello ( because of the OT main object ).

    What happens if :

    - you put the entire sub-level into a prefab
    - put the prefab in some Resources folder
    - load the object from resources when you need it
    - Instantiate that object.

    Could work but I never tried, so no guarentee
     
    Last edited: Aug 6, 2013
  14. Notus

    Notus

    Joined:
    Dec 14, 2012
    Posts:
    8
    Hello. Sorry.. i upgrade orthello to 2.8v and bug was gone.
    my previosly version is 2.7
     
  15. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    Thanks for the answer!

    My TexturePacker has a option to trim images. I've deactivated it, and now every image has the same size, but my Atlas is now larger. I think it's not good. is there another way to make Orthello SpriteAtlas use the real size of the image using crop or trim in the TexturePacker?

    For now I'll deactivate trim from TexturePacker.
     
  16. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Good to hear it is solved!
     
  17. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    No there is no other way.
     
  18. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    Thank you for answer!

    I think I found a bug (I really don't know whether it is a bug).

    I'm using cocos2d Atlas. When I click in Generate Sprites option it generates Sprites, but when I delete the sprites and press Play in Unity, it continues to create it every Play. I can't deactivate it. I need to delete de Sprite Atlas and create another one.
     
  19. bluesnadrink

    bluesnadrink

    Joined:
    Aug 8, 2013
    Posts:
    1
    I picked up the Orthello Pro and really like it. Have animated sprites, collided, etc.
    Are there any plans to update this framework for Windows Store?
    Thanks.
     
  20. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Makes me very happy that you like it!

    Yes on the win8 .. steps will be ....

    1. I will have to upgrade my win7 environment to windows 8
    2. Buy me a win8 RT tablet device
    3. Change all XmlDocument implementations to XDocument
    4. Done. ( I think )

    UPDATE :
    step 1 - fase 1 Completed .. Upgrade aquired .. will upgrade my system over the weekend...
    (fingers crossed)



    ETA ... version 2.9
     
    Last edited: Aug 8, 2013
  21. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Good Find!

    Lets Squash ......

    change code to :
    OTContainer.cs : in void Update : Line 396

    Code (csharp):
    1.        
    2.         if (isReady  generateSprites  !Application.isPlaying)
    3.         {
    4.             GenerateSprites();     
    5.             CheckModifications();
    6.         }
    7.  
    This should improve it.
     
    Last edited: Aug 8, 2013
  22. ColeBKray

    ColeBKray

    Joined:
    Dec 18, 2011
    Posts:
    36
    Hey Mas!

    You've got a great framework here, but I'm running into a problem:

    I've got 5 similar objects in the scene with different names. Each has a script, that checks on Update if it was touched with the OT.Touched method.
    Each OT.Touched method was given the object name of the object that the script is attached to.

    The problem is, that each OT.Touched method returns true if one specific object of these five is touched, and none of the methods react if any of the 4 other objects are touched.

    Why is this happening?

    (Each of them has Register Input checked)
     
  23. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Can't really say .. OT.touched or OT.clicked has been in the core for a long time and I use it myself a lot and there are no known issues atmo.
    can you show some code?
     
  24. ColeBKray

    ColeBKray

    Joined:
    Dec 18, 2011
    Posts:
    36
    Yep, I'm using uScript Visual Scripting. This is the code that it generated:

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. [NodePath("Graphs")]
    6. [System.Serializable]
    7. [FriendlyName("Untitled", "")]
    8. public class OPP4Control : uScriptLogic
    9. {
    10.  
    11.    #pragma warning disable 414
    12.    GameObject parentGameObject = null;
    13.    uScript_GUI thisScriptsOnGuiListener = null;
    14.    bool m_RegisteredForEvents = false;
    15.    delegate void ContinueExecution();
    16.    ContinueExecution m_ContinueExecution;
    17.    bool m_Breakpoint = false;
    18.    const int MaxRelayCallCount = 1000;
    19.    int relayCallCount = 0;
    20.    
    21.    //externally exposed events
    22.    
    23.    //external parameters
    24.    
    25.    //local nodes
    26.    System.Boolean local_1_System_Boolean = (bool) false;
    27.    
    28.    //owner nodes
    29.    UnityEngine.GameObject owner_Connection_8 = null;
    30.    
    31.    //logic nodes
    32.    //pointer to script instanced logic node
    33.    uScriptCon_CompareBool logic_uScriptCon_CompareBool_uScriptCon_CompareBool_3 = new uScriptCon_CompareBool( );
    34.    System.Boolean logic_uScriptCon_CompareBool_Bool_3 = (bool) false;
    35.    bool logic_uScriptCon_CompareBool_True_3 = true;
    36.    bool logic_uScriptCon_CompareBool_False_3 = true;
    37.    
    38.    //event nodes
    39.    
    40.    //property nodes
    41.    
    42.    //method nodes
    43.    OTObject method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_o_0 = null;
    44.    System.Boolean method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_Return_0 = (bool) false;
    45.    #pragma warning restore 414
    46.    
    47.    //functions to refresh properties from entities
    48.    
    49.    void SyncUnityHooks( )
    50.    {
    51.       if ( null == method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_o_0 || false == m_RegisteredForEvents )
    52.       {
    53.          GameObject gameObject = GameObject.Find( "OPP4" );
    54.          if ( null != gameObject )
    55.          {
    56.             method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_o_0 = gameObject.GetComponent<OTObject>();
    57.          }
    58.       }
    59.       SyncEventListeners( );
    60.       if ( null == owner_Connection_8 || false == m_RegisteredForEvents )
    61.       {
    62.          owner_Connection_8 = parentGameObject;
    63.          if ( null != owner_Connection_8 )
    64.          {
    65.             {
    66.                uScript_Update component = owner_Connection_8.GetComponent<uScript_Update>();
    67.                if ( null == component )
    68.                {
    69.                   component = owner_Connection_8.AddComponent<uScript_Update>();
    70.                }
    71.                if ( null != component )
    72.                {
    73.                   component.OnUpdate += Instance_OnUpdate_2;
    74.                   component.OnLateUpdate += Instance_OnLateUpdate_2;
    75.                   component.OnFixedUpdate += Instance_OnFixedUpdate_2;
    76.                }
    77.             }
    78.          }
    79.       }
    80.    }
    81.    
    82.    void RegisterForUnityHooks( )
    83.    {
    84.       SyncEventListeners( );
    85.       //reset event listeners if needed
    86.       //this isn't a variable node so it should only be called once per enabling of the script
    87.       //if it's called twice there would be a double event registration (which is an error)
    88.       if ( false == m_RegisteredForEvents )
    89.       {
    90.          if ( null != owner_Connection_8 )
    91.          {
    92.             {
    93.                uScript_Update component = owner_Connection_8.GetComponent<uScript_Update>();
    94.                if ( null == component )
    95.                {
    96.                   component = owner_Connection_8.AddComponent<uScript_Update>();
    97.                }
    98.                if ( null != component )
    99.                {
    100.                   component.OnUpdate += Instance_OnUpdate_2;
    101.                   component.OnLateUpdate += Instance_OnLateUpdate_2;
    102.                   component.OnFixedUpdate += Instance_OnFixedUpdate_2;
    103.                }
    104.             }
    105.          }
    106.       }
    107.    }
    108.    
    109.    void SyncEventListeners( )
    110.    {
    111.    }
    112.    
    113.    void UnregisterEventListeners( )
    114.    {
    115.       if ( null != owner_Connection_8 )
    116.       {
    117.          {
    118.             uScript_Update component = owner_Connection_8.GetComponent<uScript_Update>();
    119.             if ( null != component )
    120.             {
    121.                component.OnUpdate -= Instance_OnUpdate_2;
    122.                component.OnLateUpdate -= Instance_OnLateUpdate_2;
    123.                component.OnFixedUpdate -= Instance_OnFixedUpdate_2;
    124.             }
    125.          }
    126.       }
    127.    }
    128.    
    129.    public override void SetParent(GameObject g)
    130.    {
    131.       parentGameObject = g;
    132.      
    133.       logic_uScriptCon_CompareBool_uScriptCon_CompareBool_3.SetParent(g);
    134.    }
    135.    public void Awake()
    136.    {
    137.      
    138.    }
    139.    
    140.    public void Start()
    141.    {
    142.       SyncUnityHooks( );
    143.       m_RegisteredForEvents = true;
    144.      
    145.    }
    146.    
    147.    public void OnEnable()
    148.    {
    149.       RegisterForUnityHooks( );
    150.       m_RegisteredForEvents = true;
    151.    }
    152.    
    153.    public void OnDisable()
    154.    {
    155.       UnregisterEventListeners( );
    156.       m_RegisteredForEvents = false;
    157.    }
    158.    
    159.    public void Update()
    160.    {
    161.       //reset each Update, and increments each method call
    162.       //if it ever goes above MaxRelayCallCount before being reset
    163.       //then we assume it is stuck in an infinite loop
    164.       if ( relayCallCount < MaxRelayCallCount ) relayCallCount = 0;
    165.       if ( null != m_ContinueExecution )
    166.       {
    167.          ContinueExecution continueEx = m_ContinueExecution;
    168.          m_ContinueExecution = null;
    169.          m_Breakpoint = false;
    170.          continueEx( );
    171.          return;
    172.       }
    173.       UpdateEditorValues( );
    174.      
    175.       //other scripts might have added GameObjects with event scripts
    176.       //so we need to verify all our event listeners are registered
    177.       SyncEventListeners( );
    178.      
    179.    }
    180.    
    181.    public void OnDestroy()
    182.    {
    183.    }
    184.    
    185.    void Instance_OnUpdate_2(object o, System.EventArgs e)
    186.    {
    187.       //reset event call
    188.       //if it ever goes above MaxRelayCallCount before being reset
    189.       //then we assume it is stuck in an infinite loop
    190.       if ( relayCallCount < MaxRelayCallCount ) relayCallCount = 0;
    191.      
    192.       //fill globals
    193.       //relay event to nodes
    194.       Relay_OnUpdate_2( );
    195.    }
    196.    
    197.    void Instance_OnLateUpdate_2(object o, System.EventArgs e)
    198.    {
    199.       //reset event call
    200.       //if it ever goes above MaxRelayCallCount before being reset
    201.       //then we assume it is stuck in an infinite loop
    202.       if ( relayCallCount < MaxRelayCallCount ) relayCallCount = 0;
    203.      
    204.       //fill globals
    205.       //relay event to nodes
    206.       Relay_OnLateUpdate_2( );
    207.    }
    208.    
    209.    void Instance_OnFixedUpdate_2(object o, System.EventArgs e)
    210.    {
    211.       //reset event call
    212.       //if it ever goes above MaxRelayCallCount before being reset
    213.       //then we assume it is stuck in an infinite loop
    214.       if ( relayCallCount < MaxRelayCallCount ) relayCallCount = 0;
    215.      
    216.       //fill globals
    217.       //relay event to nodes
    218.       Relay_OnFixedUpdate_2( );
    219.    }
    220.    
    221.    void Relay_Touched_0()
    222.    {
    223.       if ( relayCallCount++ < MaxRelayCallCount )
    224.       {
    225.          if (true == CheckDebugBreak("48d0239e-17b6-4cd1-b52a-cc2c845c58d3", "OT", Relay_Touched_0)) return;
    226.          {
    227.             {
    228.             }
    229.             {
    230.             }
    231.          }
    232.          method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_Return_0 = OT.Touched(method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_o_0);
    233.          local_1_System_Boolean = method_Detox_ScriptEditor_Plug_UnityEngine_GameObject_Return_0;
    234.          Relay_In_3();
    235.       }
    236.       else
    237.       {
    238.          uScriptDebug.Log( "Possible infinite loop detected in uScript OPP4Control.uscript at OT.  If this is in error you can change the Maximum Node Recursion in the Preferences Panel and regenerate the script.", uScriptDebug.Type.Error);
    239.       }
    240.    }
    241.    
    242.    void Relay_OnUpdate_2()
    243.    {
    244.       if (true == CheckDebugBreak("7c520f35-b91f-4e0f-ae6d-78061647d6ec", "Global Update", Relay_OnUpdate_2)) return;
    245.       Relay_Touched_0();
    246.    }
    247.    
    248.    void Relay_OnLateUpdate_2()
    249.    {
    250.       if (true == CheckDebugBreak("7c520f35-b91f-4e0f-ae6d-78061647d6ec", "Global Update", Relay_OnLateUpdate_2)) return;
    251.    }
    252.    
    253.    void Relay_OnFixedUpdate_2()
    254.    {
    255.       if (true == CheckDebugBreak("7c520f35-b91f-4e0f-ae6d-78061647d6ec", "Global Update", Relay_OnFixedUpdate_2)) return;
    256.    }
    257.    
    258.    void Relay_In_3()
    259.    {
    260.       if ( relayCallCount++ < MaxRelayCallCount )
    261.       {
    262.          if (true == CheckDebugBreak("bffd92a4-ab19-4c37-ad99-98713dcde912", "Compare Bool", Relay_In_3)) return;
    263.          {
    264.             {
    265.                logic_uScriptCon_CompareBool_Bool_3 = local_1_System_Boolean;
    266.                
    267.             }
    268.          }
    269.          logic_uScriptCon_CompareBool_uScriptCon_CompareBool_3.In(logic_uScriptCon_CompareBool_Bool_3);
    270.          
    271.          //save off values because, if there are multiple, our relay logic could cause them to change before the next value is tested
    272.          
    273.       }
    274.       else
    275.       {
    276.          uScriptDebug.Log( "Possible infinite loop detected in uScript OPP4Control.uscript at Compare Bool.  If this is in error you can change the Maximum Node Recursion in the Preferences Panel and regenerate the script.", uScriptDebug.Type.Error);
    277.       }
    278.    }
    279.    
    280.    private void UpdateEditorValues( )
    281.    {
    282.       uScript_MasterComponent.LatestMasterComponent.UpdateNodeValue( "OPP4Control.uscript:1", local_1_System_Boolean);
    283.       uScript_MasterComponent.LatestMasterComponent.UpdateNodeValue( "e2c62cf9-927a-4103-8a07-93b6f6bb8bdd", local_1_System_Boolean);
    284.    }
    285.    bool CheckDebugBreak(string guid, string name, ContinueExecution method)
    286.    {
    287.       if (true == m_Breakpoint) return true;
    288.      
    289.       if (true == uScript_MasterComponent.LatestMasterComponent.HasBreakpoint(guid))
    290.       {
    291.          if (uScript_MasterComponent.LatestMasterComponent.CurrentBreakpoint == guid)
    292.          {
    293.             uScript_MasterComponent.LatestMasterComponent.CurrentBreakpoint = "";
    294.          }
    295.          else
    296.          {
    297.             uScript_MasterComponent.LatestMasterComponent.CurrentBreakpoint = guid;
    298.             UpdateEditorValues( );
    299.             UnityEngine.Debug.Log("uScript BREAK Node:" + name + " ((Time: " + Time.time + "");
    300.             UnityEngine.Debug.Break();
    301.             #if (!UNITY_FLASH)
    302.             m_ContinueExecution = new ContinueExecution(method);
    303.             #endif
    304.             m_Breakpoint = true;
    305.             return true;
    306.          }
    307.       }
    308.       return false;
    309.    }
    And here's how it looks in uScript:

    $Screen Shot 2013-08-08 at 11.22.56 AM.png
     
  25. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I have to dissapoint you but Orthello does not support visual coding systems out of the box. The behaviour you are experiencing is probably caused by code generated through uScript. As we do not support this I can not give you any sensible solution or anwer.

    suporting such systems is also not on our short ( or even long) to do list.
     
  26. fsellanes

    fsellanes

    Joined:
    Jun 6, 2013
    Posts:
    15
    Since we are testing Unity for develop mobile games, we are developing a prototype using Unity 3D 4.2 Orthello 2D. The game is actually running in Android and iOS. In this moment we are taking notes of the pros and the contras of doing the game with those tecnologies.

    We are not so experienced in game development, due to that, we are facing some doubts.

    ¿Why the most 2D oriented libraries, for Unity, uses atlas and sprites for create texts fonts ?

    ¿Why not use directly GUIText or GUILabal for that purpose?

    ¿Have GUI of Unity a bad performance for mobile? ¿They are not recomended for mobile development?

    We are interested in use some .ttf fonts.

    Thanks in advanced, and sorry for my english.
     
  27. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I believe the strongest reason for that would be the number of drawcalls ( so less performance )
    If you do a search in google on 'performance of Unity3D GUI' and you will find lots of info about this.

    Atlasses are linked to textures that are used on your meshes that can be batched and rendered very quickly by the GPU

    Especially on mobile it is NOT recommended to use the Unity GUI.
     
  28. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    YAY!

    That works beautifully! thanks! :D
     
  29. Sabun

    Sabun

    Joined:
    Nov 13, 2012
    Posts:
    12
    Hey mas,

    I'm experiencing a bit of difficulty understanding how the camera system works with Orthello2D. As you can see below, the yellow lines show where the camera cuts off the image. The problem is that I've set the resolution to 1280x720 in OT view, yet it seems the camera doesn't adhere to the change.

    $camerasizeproblem.png

    When I build it and run it at 1280x720, you can clearly see that each edge (left and right) has been cut off too early.

    $sizecuttingoff.png

    What can I do to make it adhere to 1280x720? The background texture is in the 16:9 aspect ratio, at 1280x720. Yet, it seems the Orthello2D camera is a box that I can't change the width of or aspect ratio of. I've tried unticking and ticking Always Pixel Perfect just to see if it makes a difference, but the results are the same (edges cut off too early).

    I would like to make it properly show the entire background image at 1280x720, no edges being cut off. If you could guide me on getting this to work out right, that would be great.
     
  30. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Did you try to set your OT.view.pixelPerfectResolution to 1280x720 and OT.view.alwaysPixelPerfect=false
     
  31. Sabun

    Sabun

    Joined:
    Nov 13, 2012
    Posts:
    12
    In the Inspector, when selecting OT view, I have already set Pixel Perfect Resolution to 1280x720 and turned off Always Pixel Perfect. The camera size does not change, and the edges still get cut off.

    Should this be done in a script instead? How should I do it?
     
  32. Sabun

    Sabun

    Joined:
    Nov 13, 2012
    Posts:
    12
    Sorry for the trouble, it looks like something went wrong with the Orthello2D files after Unity3D crashed last night.
    I tried removing it completely from my project, then checked the Asset store and updated Orthello2D Pro to the newest version. After importing the new updated version and rerunning it, it now works as expected (no more edges being cut off).
     
  33. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    (thumbs up)
    :)
     
  34. XmattX

    XmattX

    Joined:
    Aug 5, 2013
    Posts:
    3
    Edit: Well, that was quick :D I updated to 2.8.2a and it made loading a 40x40 grid go in 6 seconds. Now, that's not the performance I'm looking for quite yet, but it's a hell of a lot better :)
    ---
    I have an issue with instantiating OTSprite objects. They seem to take a very long time.

    The situation: I'm generating a tiled background using prefab objects as the tiles (prefab structure: GameObject with 3 child OTSprite objects). When I instantiate anything over 6x6 tiles there is a very noticeable delay which seems to increase exponentially with the number of objects. (10 seconds for 20x20 (400 objects), 20 seconds for 24x24 (576 objects), 60 seconds for 28x28 (784 objects)) And since I'll be needing a map of at least 100x100 tiles at some point, this is a problem :)).

    I've traced the delay back to the OTSprite script, which just seems to be taking a (relatively) long time (longer the more objects are in the scene? seems like it).

    Now, I'm fairly new to all of this, so there's probably some sort of mistake in my setup (I'm assuming generating tiled backgrounds is a fairly common use of Orthello). Any thoughts?
     
    Last edited: Aug 11, 2013
  35. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    At this time there is no known issue when instantiating objects, other than normal Unity3d gameobject instantiating overhead.

    Our best approach is always to :

    * have a lot of objects already living in your scene on apllication start and adjust those on the run...

    or

    * OT.Prefabricate your base orthello objects at start.

    or

    * better to create one big mesh ( OTTilesSprite, OTTilemap ) with all your tiles instead of 1600 ( x 3 ?? ) sprites .. 1600 sprites will give you a lot of drawcalls and cpu overheads, where you only need one big tile sprite.
    (Only available in the Orthello Pro edition)
     
    Last edited: Aug 11, 2013
  36. XmattX

    XmattX

    Joined:
    Aug 5, 2013
    Posts:
    3
    Yup, that'll have to do. I wanted the tiles to react dynamically to (for instance) a unit moving over (or near) them, but will have to settle for a little less eyecandy for now :)

    As soon as I have money again I'll throw some your way :)

    Oh, en goed bezig. Super plugin.
     
  37. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    Hi!

    Before the last release I was able to change the OTSprite texture anytime in my scene, but now it doesn't work. it only work on Start().
     
  38. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    There are lots of ways to code sprite (animating) based reactions on specific tiles using OTTilessprite or OTTilemap. You can alter its apearance of even in certain cases just overlay a tile with some special sprite, hiding the tile but simulating tile effect.

    Dank je!
     
    Last edited: Aug 12, 2013
  39. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696

    Can you display some code how you set this texture?
     
  40. dyego_s

    dyego_s

    Joined:
    Mar 26, 2013
    Posts:
    24
    Thanks for answer!

    I set my code like this:

    BGSprite.image = arrayOfImages[5];
     
  41. nopcode

    nopcode

    Joined:
    Apr 29, 2011
    Posts:
    66
    I'm trying to set Orthello2D up to use the "toon border" shader, but can't seem to get it to work. I've created a material with the shader used, and set the colors on it, and added a named material to the OT object ("outline"). With my OTCircle Sprit, I changed the Material Reference to "outline" and the preview box shows the item correctly, but it does not render in the program, either in live edit or when doing a play-preview. I just want a simple green dot with a black border for right now, but can't seem to get it...
     
  42. citizen_12

    citizen_12

    Joined:
    Jun 21, 2013
    Posts:
    33
    I upgraded to 2.8.2 (I think-- I get mine from your site and not the Unity store). Now I am once again having perf issues with creating OTSprites and adding them to an OTSpriteBatch. The picture below says it all, I think. Looks like allocs are getting bigger and bigger. I am only adding about 600 sprites to the scene.

    Code is simple:

    Code (csharp):
    1.             OTSprite outlineSprite = OT.CreateSprite( mosaicManager.tilePrefab );
    2.             if ( mosaicManager.staticBatch )
    3.                 outlineSprite.transform.parent = mosaicManager.staticBatch.transform;
    4.  
    Is there a better way of quickly adding a bunch of sprites to a batch?

    Thanks,
    James
     

    Attached Files:

  43. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Can you send a package with this issue to info at wyrmtale dot com so we can check it out?
     
  44. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Can you send a package with this issue to info at wyrmtale dot com so we can check it out?
     
  45. krooked590

    krooked590

    Joined:
    Aug 14, 2013
    Posts:
    1
    i was wondering how to actually do this. what i would like to happen is that every individual tile can be selected and have information attached to it such as the image used, grid id, local position, world position, even custom data like if the tile is a warp to somewhere or if the tile is passable or not. The closest thing i can think of is having OTTilessprite but be bale to load the images from Tiled. is there anyway i can achieve this?
     
  46. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    OTTilesSprite can display a specific tilegrid on screen and can be 'fed' by an OTTilemap. This way only the visible tiles are on screen. You can calculate local and world position of a specific tile very easy and find its id, Also each tile can have a custom object (class) attached where you put your tilespecific info. The OTTilesSprite example in the Orthello PRO edition shows how this is done.

    | Read more about it here |
     
  47. niparasc

    niparasc

    Joined:
    Jul 18, 2013
    Posts:
    4
    Hello,

    I am using OTTileMap to create a tiled level in my game. The map is created in Tiled following the instructions from here. The map consists of 8 layers in Tiled. The problem I am facing is that when I start the game in Unity some layers of the map are not shown. This happens randomly. Sometimes the map is shown properly and sometimes there are missing layers. The problem also occurs when I reload a level while the game is running. What could be the issue? Is there any fix?

    I think the same is happening with the Tiled example in Orthello Pro (CProExample6). Clicking the Reload button while the example is running within Unity causes one of the two layers (the Sewers layer) of the map (TiledSupport-1) to be shown or not (randomly).

    Thank you,
    Nikos
     
  48. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I will investigate.
     
  49. Shobo

    Shobo

    Joined:
    Jul 29, 2013
    Posts:
    4
    I'm working on creating an isometric game that uses a 3d environment with 2d sprites and I was hoping to use Orthello for my sprite management.
    I've set my OT.World to World3D but I can't seem to find a way to manipulate the sprite in 3d space, only 2d.

    Am I missing something or is this just not possible?
     
  50. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    What happens when you set the sprite.transform.position?