Search Unity

Orthello 2D Framework - 100% FREE

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

  1. DavidCBox

    DavidCBox

    Joined:
    Jul 23, 2012
    Posts:
    16
    I'm currently porting a commercial game to mobile using Orthello.
    After some test on a real device (actually, an iPhone 4S), I got slow performances with Orthello.
    I display a matrix with 7x7 sprites, using a sprite sheet.
    The FPS fall to 45 FPS when all the sprite are displayed and moving on the screen. Note: I'm currently working to improve my code as there is still a "GetComponent<type>" called every frame.
    I use the free version, and the Unity3D basic version too.
    I read this:
    http://www.thesecretpie.com/2012/07/comparison-of-2d-frameworks-for-unity-3d.html
    And I'm concerned as performances are very important with my game. I don't even have particles effect and vfx.
    And I'm wondering if buying the Orthello Pro version, with sprite batching, will really improve the performances?
    And is Unity Pro improve the performance as well, with a 2D plugin like Orthello?

    Thanks for your help.
     
  2. DavidCBox

    DavidCBox

    Joined:
    Jul 23, 2012
    Posts:
    16
    For information, I made progress.
    I bought Orthello pro and use the batch for my game layout and HUD.
    Then I removed all "GetComponent" call in Update().
    Then I cached the transform object for each tile (according to Unity3D performance guideline).
    I reduce my game field to 6x7 tiles.
    The game run now at 57 FPS instead of 45.

    Any other advice is welcome.
     
  3. PixelPigs

    PixelPigs

    Joined:
    Oct 7, 2012
    Posts:
    2
    Hi there,

    As a complete newbie in the ways of game development through Unity and C#, Orthello 2D has been a great learning experience for me. However, I've recently run into a block... if I could get a bit of help on this issue it would be much appreciated.

    I plan to expand this into level generation in the future, but for now I'd like to create a simple 5x5 square of prefab tiles during runtime. However, for whatever reason, I keep ending up with 25 tiles in the default position set by the prefab tile. If I start a new scene without the OT framework, I can instantiate the 5x5 square just fine, but as soon as I drop the OT framework back into the Hierarchy, all tiles instantiated will be instantiated in the default location (0,0,0).

    Here is the script in question:

    This is what happens if I use the script without the OT Framework:


    This is what happens if I try the same thing with the OT Framework:


    I'm sure that I'm just overlooking something embarrassingly simple. Thanks in advance for your help!
     
  4. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    To improve performance you did the right thing. So .. using sprite batch to reduce draw calls and eliminate component lookups on a frequent basis.

    Another thing you could consider is to de-activate scripts of objects that are not on screen or are not in need of processing (Update).

    NOTE! .. With Orthello, my first occupation is with functionality. Performance, like transform/renderer/collider caching and stuff, is something I still have to put some effort in, to really get an optimzed fps.
     
  5. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    @PixelPigs

    • When using Orthello , puting the OT main object in your scene is the first thing that has to be done.
    • Try to use OT.CreateSprite("Sprite Prototype Name"); to create orthello sprites instead of Instantiate.
    • You create a prototype by adding a sprite to your scene's hierarchy under OT.Prototypes and configure it manually in the editor.

    | Read More | about creating and destroying objects in Orthello

    so ... after setting up your tile as a prototype sprite 'tilePrototype' , you could create it like :

    Code (csharp):
    1.  
    2. void Start () {
    3.   GameObject board = new GameObject();
    4.   board.name = "Board";
    5.   for (int x = 0; x < board_size_x_; x++)
    6.   {
    7.     for (int y = 0; y < board_size_y_; y++)
    8.     {
    9.         OTSprite tile  = OT.CreateSprite("tilePrototype");
    10.         tile.transform.parent = board.transform;
    11.         tile.position = new Vector2(x,y);
    12.         tile.name = "Tile" + x + y;
    13.     }
    14.   }
    15. }
    16.  
     
    Last edited: Oct 7, 2012
  6. jacksmash2012

    jacksmash2012

    Joined:
    Sep 21, 2010
    Posts:
    27
    I'm using the latest version of Unity...

    Anyways, whenever I enter play mode, the Main Camera's size reverts from 10 (which is what I specified) to 384. I have no idea where 384 is coming from, and why it keeps reverting when I enter play mode.

    I'm not sure if there is an OT script somewhere that somehow changes the size of the camera... but I'm at a loss.

    Any suggestions?
     
    Last edited: Oct 7, 2012
  7. PixelPigs

    PixelPigs

    Joined:
    Oct 7, 2012
    Posts:
    2
    Thanks Mas, it works great now. I thought to use OT.CreateSprite but I didn't see any way to place it in a specific location. I guess I never thought to simply relocate it after creation :)
     
  8. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Try using OT.view.customSize

    Because Orthello takes full control of your camera, you will have to set it using the OT.view object.
     
  9. jacksmash2012

    jacksmash2012

    Joined:
    Sep 21, 2010
    Posts:
    27
    Thanks... totally missed that. The same happens to sprites ... scale sometimes gets set at runtime.
     
  10. DavidCBox

    DavidCBox

    Joined:
    Jul 23, 2012
    Posts:
    16
    Thanks a lot!
    Regarding moving a sprite. It seems my FPS drop down when I move sprites, not when the sprites are not moving.
    To move a sprite I do:

    Code (csharp):
    1.  
    2. // px and py are the position I want the sprite to go
    3. sprite.transform.localPosition = new Vector3(px,py,sprite.transform.localPosition.z);
    4.  
    I do this every FPS for sprite moving on the screen (e.g. falling).
    Is there a better way for performance?
     
  11. DavidCBox

    DavidCBox

    Joined:
    Jul 23, 2012
    Posts:
    16
    ... Waiting for your advices I did some test: it seems the "New Vector3" call every frame is CPU consuming! I changed for a cached vector2, that I just change values every frame, and I assign it to .position sprite property. It's much better!
     
  12. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Good to hear that you found a solution!

    The cpu consuming part is probably the retrieval of sprite.transform, this does a lookup internallly and I see 2 of them in your new Vector3 code. Caching the sprite.transform would probably also have improved things.

    That particular caching of transforms, renderers and other component based stuff is something that I still have to do into the Orthello core myself to get Orthello to a better performance. It is on my todo list.
     
  13. DavidCBox

    DavidCBox

    Joined:
    Jul 23, 2012
    Posts:
    16
    Good to know! Orthello is an amazing product, enhanced performances will rise it to the top.
    I'm currently porting, from scratch, my first commercial game (Geisha The Secret Garden) with it, and the game will be published by a big publisher.
     
  14. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Wow!! Great that you are trying to use Orthello to create and release a great 'already proven' game with Orthello. I will defenitly have to create some 'Orthello Inside' icon and build some 'Build with Orthello' functionality on my website for you guys to present your Orthello game projects...

    ... and get some www backlinks to your web stuff at the same time .. :))
     
  15. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Our first extension : Orthello Elements has been released (v1.0)


    It provides 4 components build with orthello ( that use orthello sprites ) to provide functionality and boost your development productivity. Elements includes : Buttons, Progress Bars, Lines and Circle Menu's. Every element can be build from scratch using your own images and sprites. There are several demo prefab objects included with the demo.​


    Price $30, with a 25% discount for Orthello Pro users ( also if you aquire Pro + Elements )
    Check and buy it | HERE |

    [click on demo screenshot to start the online demo]



     
    Last edited: Oct 13, 2012
  16. Martin Berlin

    Martin Berlin

    Joined:
    Oct 2, 2012
    Posts:
    1
    I gave Orthello a try for my 2D project on iOS. So far I'm really happy.

    If one thing would be possible it would help me a lot though:

    To define a sprite in the corresponding texture atlas I have to use the frame index.
    But when I add some sprites to the texture-atlas using Texturepacker, sometimes the sprites get rearranged. So all my frame index don't match anymore. Would it be easily possible to define the name of the sprite instead (as it is possible with animation) ?

    Thanks a lot
    Martin
     
  17. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    If you would update to the latest version 2.3 ( that is not in the asset store yet though ... but can be downloaded from our website ) you will see that an OTSprite has a sprite.frameName that you can use to get or set the frameIndex by specifying the frame name.
     
  18. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    FYI

    Regarding Orthello Development

    We are now working on :

    Performance improvements, by putting all transforms, colliders and renderers cached into the objects
    and removing all .GetComponent<> calls according to the Unity3D optimize performance guide.

    OTCircleSprite
    For circular gradient sprites to create bullets and circular progress indicators.

    RECT sprite.clip
    To be able to clip a sprite by some rect.

    PRO improvements
    Textured outlines, filled shapes, and collision shapes (Mesh Colliders).
     
  19. opdude

    opdude

    Joined:
    Sep 26, 2012
    Posts:
    2
    Hi Mas,

    I'm currently trying to animate an OTSprite using Unity's inbuilt animation window, however it seems as though the OTSprite likes to throw in hundreds of extra key frames as the OTSprite's position is updated back to the sprites original location, is there a way to turn this functionality off while animating within the editor?


    Thanks,
    Opdude
     
  20. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Hi there OpDude, I checked into this and it seems that the OT.recordMode is not valid when you are animating a sprite while not running the application.

    The OT.recordMode is used by Orthello to check if the animation window is up and recording, so dynamic adjusting of position is 'temporary' disabled to prohibit the creation of all those keys.


    To improve on your current situation change the OT.recordMode field in OT.cs to :

    Code (csharp):
    1.     public static bool recordMode
    2.     {
    3.         get
    4.         {
    5.             if (instance != null)
    6.             {
    7.                 if (!Application.isPlaying)
    8.                     instance._recordMode = instance.RecordMode(false,false);
    9.                 return instance._recordMode;
    10.             }
    11.             else
    12.                 return false;
    13.         }
    14.     }
    This should improve things.

    Let me know if it worked for you!
     
  21. opdude

    opdude

    Joined:
    Sep 26, 2012
    Posts:
    2
    That worked fantastically thanks!!!

    Edit: Just noticed a bug with the code when building a release version, the recordMode method is only compiled in the editor so need to change the code like below.

    Code (csharp):
    1.     public static bool recordMode
    2.     {
    3.         get
    4.         {
    5.             if (instance != null)
    6.             {
    7. #if UNITY_EDITOR
    8.                 if (!Application.isPlaying)
    9.                     instance._recordMode = instance.RecordMode(false, false);
    10. #endif
    11.  
    12.                 return instance._recordMode;
    13.             }
    14.             else
    15.                 return false;
    16.         }
    17.     }

    Opdude
     
    Last edited: Oct 17, 2012
  22. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Orthello 2.4 released

    - Performance update 50%/150% FPS increase
    - prototype scale bug solved.
     
  23. Mavco

    Mavco

    Joined:
    Oct 19, 2012
    Posts:
    3
    Hi Mas, good work on Orthello,

    I'm using the orthello to make a game in unity (i, likely, will buy the Pro version)... But now I have a problem with Cocos Atlas. How I can create the OTSpriteAtlasCocos2D at the runtime?

    I create the object but i can't assign the texture and xml data, in unity editor works correctly but in iPod touch send me a error:

    Code (csharp):
    1. Orthello : Atlas XML file could not be read!
    2.  
    3. (Filename: /Applications/buildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 43)
    4.  
    5. The requested feature is not implemented.
    To set this I use:

    Code (csharp):
    1. atlas.texture = ptrPrefabs.mid_elements[0];
    2. atlas.atlasDataFile = ptrPrefabs.mid_data_files[0];
    and elements are:

    Code (csharp):
    1. public Texture[] mid_elements;
    2. public TextAsset[] mid_data_files;
    Can you help me?

    Thanks a lot
    Marcus
     
  24. altheonix

    altheonix

    Joined:
    Oct 20, 2012
    Posts:
    19
    Wow, can't wait for the sprite clip feature :D

    I upgraded orthello from v2.1 to 2.4. There's a problem in OTSprite rect properties when i parent it to empty game object, the rect value is positioned to (0,0).
    for example, an OTSprite with x = 100, y = 100, Width = 60, Height 60. The sprite.rect properties will return left 70, top 70, width 60, heigh 60. but when I parent it to empty game object the sprite.rect properties will return left -30, top -30, width 60, heigh 60. (Note : the empty game object transform xyz postion is 0 and xyz scale is 1)

    it didn't happen when I use orthello v2.1. Is this a bug in v2.4?

    Thanks
     
  25. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I created a change so that the sprite.rect is parent related .. the same as the .position and .size.
    I will check into it and fix it asap.

    RIGHT .. found it ...

    change line 671/672 in OTObject.cs to

    Code (csharp):
    1.             if (otTransform.parent!=null)
    2.                 ce = otTransform.parent.worldToLocalMatrix.MultiplyPoint3x4(ce);
    3.  
     
    Last edited: Oct 20, 2012
  26. Zamaroth

    Zamaroth

    Joined:
    Oct 21, 2012
    Posts:
    2
    Hi I have a problem. I´m trying to make animating sprite. I made a script where animation starts when left arrow button is pressed. The animation starts with no problem, but after it starts, every frame, object position resets to the place where it was when I started game.

    Here is my project: http://www.ulozto.net/xpxjZD7/2d-game-rar

    I will be very glad for quick response, because I have to learn making 2D graphic in short time.
     
    Last edited: Oct 21, 2012
  27. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Hi there Zamaroth,

    I took a quick look at your code ..

    Code (csharp):
    1. function Start ()
    2. {
    3.     mySprite = GetComponent("OTAnimatingSprite");
    4. }
    5.  
    6. function Update ()
    7. {  
    8.     if(is_falling == true)
    9.     {
    10.         transform.Translate(-Vector3.up * (Time.deltaTime * speed));
    11.     }
    12.    
    13.     if(Input.GetKey('left'))
    14.     {
    15.         transform.Translate(-Vector3.right * (Time.deltaTime * speed));
    16.         mySprite.PlayLoop("runLeft");
    17.     }
    18.     if(Input.GetKey('right'))
    19.     {
    20.         transform.Translate(Vector3.right * (Time.deltaTime * speed));
    21.     }
    22. }
    some remarks ....

    regarding the animation

    By calling mySprite.PlayLoop("runLeft") each update() cycle while holding the left key,
    the animation will play the same frame because the sprite.Play methods will restart your animation.

    You wil have to find a way to only start the animation once, actually the first time you press the left key.

    regarding the movement

    I never use transform.Translate
    but the Vector2 sprite.position to set my sprites's position.

    regarding learning 2D

    I would advise to dive a bit into the many example scenes that come with
    Orthello. Those scenes (C# and JS examples) will show all kinds of
    ways to do things with orthello and can prove to be a good learning source.

    Kind regards and good luck,
     
  28. altheonix

    altheonix

    Joined:
    Oct 20, 2012
    Posts:
    19


    Thanks it works :D
     
  29. Bramble1

    Bramble1

    Joined:
    Oct 24, 2012
    Posts:
    2
    Mas,
    I've got the same problem as Zamaroth.

    (The animation starts when you press left or right but the player cannot move off his initial point).

    It worked fine on 2.3 last week but not on 2.4. Here's the update method (it's from Tim Miller's Loderunner clone tutorial on Rocket Design Studios website).


    void Update()
    {
    // run left
    if(xa.isLeft !xa.onRope !xa.onLadder !xa.falling currentAnim != xa.anim.WalkLeft)
    {
    currentAnim = xa.anim.WalkLeft;
    mySprite.Play("runLeft");
    }
    if(!xa.isLeft !xa.onRope !xa.falling currentAnim != xa.anim.StandLeft xa.facingDir == 1)
    {
    currentAnim = xa.anim.StandLeft;
    mySprite.ShowFrame(13); // stand left
    }

    // run right
    if(xa.isRight !xa.onRope !xa.onLadder !xa.falling currentAnim != xa.anim.WalkRight)
    {
    currentAnim = xa.anim.WalkRight;
    mySprite.Play("runRight");
    }
    if(!xa.isRight !xa.onRope !xa.falling currentAnim != xa.anim.StandRight xa.facingDir == 2)
    {
    currentAnim = xa.anim.StandRight;
    mySprite.ShowFrame(16); // stand left
    }


    Thankyou
     
  30. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    The code you show me only shows changing the animation. This code is valid because it keeps a reference to the current animation playing and only changes the animation when it has to be changed. The .Play() method is not called every update() cycle.

    regarding the 'non-moving' issue.

    You did not show any code where the moving takes place. So ... if you send your project over to info at wyrmtale dot com, I will have a look and see why it is not moving. Please also include instructions how to reproduce when you send me a mail.
     
  31. Mavco

    Mavco

    Joined:
    Oct 19, 2012
    Posts:
    3
    Hi Mas, can you help me?

    I can create a cocos atlas at runtime?

     
  32. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Hi there Mavco .. sorry missed your post earlier ...

    Runtime creation of atlasses should definitly be possible

    The message you are getting. is generated by the piece of orthello code
    (in OTSpriteAtlasImportXML.cs )

    Code (csharp):
    1.    
    2.     protected XmlDocument xml = new XmlDocument();
    3.     protected bool ValidXML()
    4.     {
    5.         try
    6.         {
    7.             xml.LoadXml(atlasDataFile.text);
    8.             return true;
    9.         }
    10.         catch (System.Exception err)
    11.         {
    12.             Debug.LogError("Orthello : Atlas XML file could not be read!");
    13.             Debug.LogError(err.Message);
    14.         }
    15.         return false;
    16.     }
    This method just loads the xml in an XMLDocument. This is just plain MONO .NET XML functionality. I really can not say why you are getting that message. It seems that the XML is not valid or that some other exception is raised when MONO is trying to parse the XML.

    The 'feature is not supported' message could refer to the XML but also (maybe) to the Debug.LogError(..);

    I would advise that you trace your bug and write some log so you can capture
    what is really going wrong on your IPod. Maybe try and comment the Debug Lines and
    check if the xml - text is really filled with the valid xml.

    Let us know what you find...

    Regards and food luck,
     
  33. Bramble1

    Bramble1

    Joined:
    Oct 24, 2012
    Posts:
    2
    I've tried to send a project but it's too big, (32mb). Do you need the whole thing?

    Thankyou
     
  34. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Yes .. you can send it using a website like www.wetransfer.com
    I also need instructions how to reproduce your error.

    regards,
     
  35. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    Is there a way to download older versions of Orthello? I'm experiencing some pretty severe bugs that weren't there before when trying to do animation playback even in test cases. Things like animations pausing or skipping frames when trying to play back simple, two or three frame animations.
     
  36. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    At this time I can not rollback so lets solve this ASAP
    Maybe you can rollback your project to a previous version?

    Meanwhile...

    Could you send me a sample with your error? The normal animating example scenes are working just fine so maybe I have missed something. If you do... I will dive into this with the highest priority.

    There is also some translate issue, that I am investigating as well..
     
    Last edited: Oct 30, 2012
  37. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    I can't really roll back since this is a new project on a fresh machine. Here's a demonstration of the problem though:

    http://dl.dropbox.com/u/50465445/UploadTest/test.html

    The numbers should just go 1, 2, 3, 4 over and over but after a few loops they start to drop or repeat frames.

    It's just a simple 4 frame sprite sheet but I've tested it with other sizes to the same effect. Any time I set an animation to last 1.5 seconds or less I end up getting 1, 2, 3, 4 for the first three or four loops until I start getting 1, 2, 4 or 1, 3, 4 or even sometimes 1, 4. I tested this on multiple computers and even had other people test it on their computers to see if the problem was just on my end.

    Here's the code starting the loop:

    Code (csharp):
    1. #pragma strict
    2.  
    3. var sprite:OTAnimatingSprite;
    4.  
    5. function Start () {
    6.     sprite.PlayLoop('WalkingCurly');
    7. }
    8.  
    9. function Update () {
    10.  
    11. }
    12.  




    Here's what the set-up containers and animations look like. The AnimatingSprite is completely stock, no changes. This seems to affect every multi-frame loop that runs for 1.5 seconds or less, making walk cycles really inefficient to implement unless I double up frames in the sprite sheet.

    This is just test environment stuff to make the problem super easy to repeat but it seems to be a problem for me in the latest version.
     
    Last edited: Oct 30, 2012
  38. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    @MarigoldFleur

    I have replicated the issue and I am finding a solution right now.
    to be continued....

    There is also an issue in the current version
    when using sprite.transform.Translate ..
    but if you just use the regular sprite.position ,, your safe ..
     
  39. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    @MarigoldFleur

    Ok , think I found the animation bug ...

    Line 775 : OTAnimatingSprite.cs

    change

    Code (csharp):
    1.  
    2.         if (frTime == 0 || frTime > frDurationDelta)
    3.         {      
    4.             frTime = 0;
    to

    Code (csharp):
    1.  
    2.         if (frTime == 0 || frTime >= frDurationDelta)
    3.         {                  
    4.             if (frTime>=frDurationDelta)
    5.                 frTime -= frDurationDelta;
    Let me know if this worked for you.
     
  40. dncwalk99

    dncwalk99

    Joined:
    Oct 21, 2012
    Posts:
    8
    I'm loving orthello2D. Great work. I'm having an issue though. I'm not sure if it's due to me missing something or something else. When ever I add an OT.Sprite and set the size to lets say 1280x720 and leave pixel perfect unchecked, the image doesn't scale to fill the entire screen/window. If I choose a resolution higher than the sprite size in the game configuration at runtime, it never scales up. Am I doing something wrong?

    Edit: Ok. Seems that running any resolution higher than what was used in sprite size in windowed mode causes this issue. Running in fullscreen, the images scale correctly.
     
    Last edited: Oct 31, 2012
  41. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    This seems to have done the trick, thanks!
     
  42. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Regarding the transform.position and transform.Translate not working since version 2.4c

    It is not a bug but a 'feature'

    I will explain :

    Because Orthello has a lot of functionality that has to be managed each update cycle, there are some things called 'dirtyChecks'. These checks are executed each update cycle and are meant especially to handle things in editor mode.

    Comparing the transform with the sprite.position and adjusting the sprite's attributes accordingly is one of those things. Working with the sprite's gameObject's transform class falls in this category.

    In the past versions (pre 2.4c) the bool OT.dirtyChecks was set to true, so that those dirty checks were performed at all time, but at a considerable cpu/fps cost.

    To improve (+150%) the overall performance of Orthello I have set OT.dirtyChecks to be false by default.

    When no dirty checks are performed (default in current version), moving sprites by setting the transform.position or transform.Translate, does not work anymore. The regular approach sprite.position is your way to go ....

    There are 3 possible solutions to resolve this.

    1. BEST: Use sprite.position, sprite.size and sprite.rotation to change your sprite.
      instead of the gameObject.transform class

    2. sprite.dirtyChecks= true;
      This particular sprite will execute its dirtyChecks (at a cpu/fps cost)

    3. OT.dirtyChecks = true;
      All sprites will execute dirtyChecks ( at a big cpu/fps cost)


    Hope this makes any sense.
     
    Last edited: Oct 31, 2012
  43. Bousa

    Bousa

    Joined:
    Aug 9, 2012
    Posts:
    6
    Hello I have a big trouble using Orthello free. I have almost on the end of development of my 2D game and I wanted to connect the app to the GameCenter on iOS. After you play level there is a box with your result shown on the scene. Before I connected it everything run just well. But now on the iPad1 it gets memory overflow. There is a lot of dynamic pictures and texts on the box so I think there is a problem on initialization of all the bitmaps into memory.
    Is there some solution how to decrease memory used and stay to use same graphics quality()? Does this solve Orthello Pro?
     
  44. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    FYI.

    Regarding again a big performance increase...

    I am almost ready to relase version 2.5. This version has a bool sprite.passive = true.

    This way you can set a sprite into passive mode so that it will stop the sprite's update cycle while still keeping most of the functionality and sprite's attributes like position, size , rotation, frameIndex working.

    Using passive sprites by default lets you handle like 90% of needed 2D sprite functionality and gaining a cpu/fps increase about 25% to 75%.
     
    Last edited: Oct 31, 2012
  45. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Hi there Bousa,

    I really have no experience with GameCenter integration so can give you no real sensible answer or guidance for this. However , to reduce your memory, maybe you could

    1. First load an empty scene or a scene with just one background sprite , before showing the GameCenter popup, This way memory is released. Make sure you put your global game data into static class variables so it will also be available in your 'empty' scene.

    or

    2. Load your textures and stuff from Resources dyanmicly, assigning them at runtime and unloading them when you no longer in need of them.

    but.. as I said .. I have no experience here.

    Note: First thing you need to know to solve this is (with a memory overflow) to see what is actually and exactly taking so much memory before you can form a good a strategy on how to reduce the memory print.

    regarding the pro version
    It is exactly the same as the 100% free edition with some addons. No improved GameCenter support there..
     
    Last edited: Oct 31, 2012
  46. PreetMinhas

    PreetMinhas

    Joined:
    Nov 1, 2012
    Posts:
    12
    Hi,
    Thanks a lot for providing such an awesome framework for free!
    I have been facing the following issue:

    After every X seconds, I create a new OTSprite by using the following call:
    OT.CreateObject("Bullet");

    2 scenarios:
    1. If I define the Bullet object as a prefab then almost 90% of the times, I get a blank white box in place of the sprite on screen.
    2. If the Bullet object is a deactivated gameobject from the hierarchy, everything works fine for a few minutes and then I start getting blank white boxes instead of the sprite on the screen.

    Points to be noted:
    1. The sprite is created using a sprite atlas as the container. If I pause and check the values in the inspector, the container is not set for the white sprites.
    2. I am using OT's object pooling mechanism.

    Please let me know if there is anything in particular that I need to check while creating/instantiating the objects.
     
    Last edited: Nov 1, 2012
  47. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    It sounds like you are doing the right thing. Is the bullet object located under OT.prototypes in the scene's hierarchy?
    May you can try to call OT.RuntimeCreationMode(); before creating your object.

    If it is still keeps failing create a sample package for me with instructions how to reproduce and I will look into it.
    You can send it to info at wyrmtale dot com, use www.wetransfer.com if it is too big.
     
  48. PreetMinhas

    PreetMinhas

    Joined:
    Nov 1, 2012
    Posts:
    12
    The object was not placed under the OT.prototypes. I have moved it there. Will check and let you know if I still face the issue.
     
  49. Rocketballs

    Rocketballs

    Joined:
    Sep 13, 2012
    Posts:
    23
    Is there any way to get shadows in 2D with Orthello (Free version)?
    The best solution found so far was to overlap 2 sprites, like this. This is the result.
    It comes with obvious limitations and the ways to get around them get more and more convoluted.
     
  50. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I am sorry to say that Orthello does not support 2d shadows and we do not plan to support it in the nearby future.

    However .....

    1 thing I can think off that might work is to use some custom material shaders and a spotlight.

    Orthello sprites are just flat rectangular meshes that use material shaders (the default materials provided ignore lights). You could simply setup some custom materials that you can link to the sprite using the sprite.materialReference. If those materials/shaders are effected by light you can control the scene's lighting model and thus create the effects you are looking for .. ( I think )

    | Read more about materials within Orthello |
     
    Last edited: Nov 9, 2012