Search Unity

Orthello 2D Framework - 100% FREE

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

  1. millordme

    millordme

    Joined:
    Feb 18, 2012
    Posts:
    6

    Great, looking forward to the new release !
     
  2. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Free Version 1.11 + Pro 1.7 released

    In this version :

    - Unity 3.5 full Prefab support (with auto container/animation mapping)

    Create a prefab and drag an animation, a sprite container or sprites into it. Orthello will mark the changes of position, scale, rotation and name as you change it using your scene, so no resetting back to original states anymore. Orthello will even map animation and containers onto the sprites as soon as they are discovered, the order of dragging animations, containers and sprites does not mind. The lookups are by name so make sure you name your containers and animations well.

    Check the new Example 8 to try it out.

    Note - when already using prefabs .. in the worst case and because we did not supported prefabs before .. you could end up re-creating your prefabs and re-instantiating objects in your Orthello scenes

    - Improved framerate of example 3 - Shooting Asteroids

    The example with the asteroids was dropping framerate massively in the first phase when shooting a lot of asteroids and this was caused by the fact that a lot of new gameobjects had to be instantiated. This was improved by scaling up the objectpools for the astroids - OT.Prefabricate(150) - and by disabling the orthello script when an asteroid got below a size of 50 ( the animation would stop anyway ). Almost no FPS drop now.

    - Solved some bugs and some other minor improvements.

    GL ...
     
    Last edited: Mar 7, 2012
  3. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Great news! Thanks for adding prefab support!
     
  4. MindJuice

    MindJuice

    Joined:
    Jun 10, 2009
    Posts:
    18
    Hi Martijn,

    I'm trying to select a 2D framework for an upcoming non-game project.

    One of the things I need to be able to do is load images from PNG files from a server, cache them locally, then load them into a texture I can display and manipulate with the 2D framework.

    I can use the WWW framework to load a PNG file and called the www.texture. Can Orthello create sprites and/or sprite sheets from PNGs loaded this way?

    Thanks,

    Ken
     
  5. OmniverseProduct

    OmniverseProduct

    Joined:
    Feb 26, 2012
    Posts:
    1,568
    Great news indeed. Thank you!
     
  6. AllSynergy

    AllSynergy

    Joined:
    Nov 1, 2011
    Posts:
    47
    Thanks.... that update was great news. Now only that Flash support... eh? Demanding customers ;) Well, I try to support you by buying something from your web-store when I'm not completely broke :D Orthello pro is nice product... hopefully updates keep coming in the future.
     
    Last edited: Mar 8, 2012
  7. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    The thing with flash is that a number of problems have to be solved. The problems are with systems that are not supported at this time by flash.

    As far as I can see :

    - The OTTween class - because it uses .NET reflection to discover and adjust properties on provided objects
    - .NET reflection in general , because this is used to create event callbacks to JS code : OTObject.InitCallbacks();
    - and some minor bugs/classes that I will have to rewrite to as3.

    It is on my todo list.
     
  8. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    In Orthello it is possible to setup SpriteContainers (base of you sprites and animations) by code, so I see no problems with assigning textures you load with the WWW class. I am not sure if you will be able to cache those files yourself because of the Unity security sandbox .. but this is a unity thing.

    Best thing is to setup a little test and try it out .. the 100% free edition awaits your download ....
     
  9. beco13

    beco13

    Joined:
    May 31, 2011
    Posts:
    30
    HI mas... thanks for you reply and the tip(even though I knew it) lol, but thanks ...

    I've been able to solve the alpha problem now....

    Right now I'm deploying application for iOS....the problem now is I can't change the color correctly....here a snipet of my code

    Code (csharp):
    1.  
    2.     switch(theColor)
    3.     {
    4.         case EnemyColor.green   :
    5.             oTSprite.tintColor  = Color.green;
    6.         break;
    7.        
    8.         case EnemyColor.red :
    9.             oTSprite.tintColor  = Color.red;
    10.         break;
    11.        
    12.         case EnemyColor.orange  :
    13.             oTSprite.tintColor  = Color(166.0/256.0, 67.0/256.0, 4.0/256.0, 204.0/256.0);
    14.         break;
    15.     }
    16.  
    In short...I create an enemy using OT prototype. and was able to recreate the enemy with the expected behavior..but a problem occurs when I deploy it on iOS the color sometimes doesn't change as it should be. and when I take a deeper look on inspector, the material doesn't apply the color change.... how am I supposed to change it? a direct access to material or is it something wrong with OT? thanks for your reply
     
  10. WolfGames

    WolfGames

    Joined:
    Jul 25, 2011
    Posts:
    65
    Hey. I have a question. Why does not a lot of animation and sprites. So much is falling productivity? You can fix it like?
    In stage 5 animations and 20 sprites = 40 fps, when we add another animation is 30 fps.
     
  11. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    The proces of tinting a sprite (and setting alpha) goes like this :

    first you set the material reference. Orthello will than lookup the material reference (specified in OT.materials) and will check if the shader tint and/or alpha field name is set. It will set the found material and adjust the shader field tint of alpha and setting the value.

    If this is not working on iOS you might consider using another shader and add this to the OT.materials and so create a custom material. You need to check what the exact field names are for color tinting and alpha if you want to use it.
     
  12. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I really dont know why.

    Having a lot of animation on screen at once or a lot of 'living' objects in your scene , will definitly be costly processor wise, as traversing frames in an animtion is a cpu thing. In addition, each sprite and OTObject has its own update cycle which can generate a lot of cpu when many objects are living in your scene.

    When creating big and complex games it is important to be smart and make sure that you optimize stuff .. for example .. disabling scripts when objects are not longer viisble, moving static sprites in batches etc etc.

    Orthello was not created to make games that have lots and lots of simultanious animating sprites on screen at once.

    If you look at the latest version of Example 3 - Shooting asteroids ..

    If all asteroids big and small would be animating, I think a framerate of about 8 fps would be expected, especially when a lot of asteroid debree is active on screen.

    To optimize this I :


    - OT.Prefabricated a lot of asteroid instances, so that there would be no GameObject Instantiate overhead.
    - Disable the OTAnimating sprite class when debree gets smaller than 50px, the moving and rotating is done in another custom script.

    By aplying these simple optimizations I keep an FPS af around 50-60 instead of 8

    Just an example.

    You could also use the profiler to check where the most cpu is lost and try to optimize there...
     
    Last edited: Mar 9, 2012
  13. kuramayoko10

    kuramayoko10

    Joined:
    Mar 11, 2012
    Posts:
    2
    Hi, I don't know if this was already asked in this topic (too many pages to look :)), but it is a problem that I am having with this library (and other people too)

    I compose my scene, put the objects where I want them, but when I press play some objects (ramdomly) warp to (0,0,0), and some scale up or down.

    Have you noticed this problem before? How could I fix this?
     
  14. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    The problem you describe, and the other in the answers thread, were caused by changes in the prefab system of the Unity3D version 3.5. These are fixed in the latest version 1.11 of orthello.

    could be you have to create your prefabs again .. but check out this latest version and look/try example 8 - prefab support.
     
  15. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Version 1.11a released.

    - More Prefab improvements

    DEPRECATED OTPB , OTPrefabBreaker classes
    Now manually calling UnityEditor.PrefabUtility.RecordPrefabInstancePropertyModifications(this); in the right places.

    - Added auto atlasdata reload + auto sprite frame reloads on corrupt scene's
    Because of wrong property changed notifications and the new prefab system, insome cases the AtlasData of an SpriteAtlas was empty when a scene was loaded. Orthello now checks that, reloads the data , and forces all sprites in the scene that use the Atlas to reload. So if you encountered strange mixup of frame display data, showing wrong frames or even the entire atlas texture instead of a frame .. this update will auto fix that when you load your scene.

    The example 'Loderunner' game of rocket5 studios 'Make A 2D Game With Unity3D Using Only Free Tools' , that showed the strange frame distortions, will now show and work correctly with this last update.
     
    Last edited: Mar 12, 2012
  16. kuramayoko10

    kuramayoko10

    Joined:
    Mar 11, 2012
    Posts:
    2
    Thanks for your response Mas.

    I am going to try to develop a complete iOS game using Orthello2D. As for what I have seen on your website, deploying Orthello2D games for iOS is still not fully tested, right?

    I have a simple question at first. How do I set my OT->view object so that it will work fine with the different iPhone devices resolutions?
    I mean, the iOS developers suggest not using Pixel Perfect resolution as it changes from older to newer devices, and iPad. However, the Rocket5Studios tutorial use PixelPerfect resolution.

    Do you have any advice?
     
  17. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I have tested several Orthello programs and samples on my IPhone and iPad1 + 2 and they work just fine.

    Pixel-Perfect resolution would be a good approach if you are targeting one type of device that has the same screen dimensions. Or if you are going to write a game that matches the 'playing; size of the game world to the devices resolution. In Orthello you will get this result by setting the OT.view.alwaysPixelPerfect to true;

    If you want to publish your game to multiple devices with different resolutions and you want your game/app to always show the same world and look the same ( auto zoom feature ). you can do this in Orthello by setting OT.view.alwaysPixelPerfect to false and the OT.view.pixelPerfectResolution to the number 'auto-zoomed' of pixels you would like to show on your device.

    example..

    OT.view.alwaysPixelPerfect=false
    OT.view.pixelPerfectResolution = 1024 x 768

    on iPad1 + 2 -> pixelperfect
    on iPhone -> auto zoom out.
    on iPad3 -> auto zoom in ( theoreticly - haven't tested this )

    Hopes this makes sense.

    You can try this by seprating your game window and setting the size to a specific dimension and run your game.
     
  18. SMillard

    SMillard

    Joined:
    Mar 16, 2012
    Posts:
    1
    Hi,
    Thanks for making such an awesome 2D framework. I've been playing around with it, and I managed to do a lot of stuff so far, but I'm having one strage problem..

    When I create a looping animation (like an idle animation f.x.) the animation works fine, except it looks like it's slowly "crawling" to one side (and then jumping back to the original position when the loop occurs). At first I thought there was something wrong with the image, but I checked it several times and it's 600 pixels wide and 100 pixels tall, a total of 6 frames, and with each individual image at exactly the same position within their 100x100 box..

    I tried out the example projects included, and the sprites there don't seem to have this problem, although I'm doing everything pretty much exactly the same way :(
    Right now I'm updating to the newest version of orthello, to fix the prefab problems etc.. And I'll see if my animation problem persists.. Is anyone else having a similar problem?

    Regards, Simon
     
  19. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I think it has something to do with the settings of your sprite container, in relation to your image texture.

    If, after updating , you still have the same problem, can you create a package and send it to info @ wyrmtale (dot) com ? ... I will check and see whats wrong.
     
  20. yotes

    yotes

    Joined:
    Mar 18, 2012
    Posts:
    15
    Hi man! just want to say thanks! Im reading right now all the documentation an trying some stuffs, but this seems to be a great great tool. I'm with the free version right now, just to give it a try, but i want the pro! just let me test it a little :D. Keep on the good job!

    saludos desde Argentina :D!
     
  21. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Thanks Yotes! Happy that you like it!

    Just FYI

    .. now working on Orthello PRO ..

    NOT - auto creation of NavMesh when loading an OTTilemap from TILED.exe

    seems to be that a navmesh is locked topdown to worldcoordinates. Because Orthello has a frontleft orrientation it is not usable at this time. ​
    - auto creation of Collider and Trigger area's when loading an OTTilemap from TILED.exe
    - auto instancing of (prototype) Orthello Objects when loading Objects from an in TILED.exe created OTTilemap

    Kind regards,
     
    Last edited: Mar 20, 2012
  22. Rnd

    Rnd

    Joined:
    Mar 18, 2012
    Posts:
    2
    Hi thx for the great Orthello mas

    can I change the sprite width and height offset??
    cos I had a SpriteSheet that has different sprite width height offset per row
    so they need differents width height in every frameset
     
    Last edited: Mar 21, 2012
  23. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I think it will be hard ( maybe even impossible ) to do this manually, but a OTSpriteAtlas lets you specify the area of each sprite that is contained on an Atlas.

    the OTSpriteSheet always has an uniform image-width+height. the OTSpriteAtlas#### objects can be used in combination with the free atlas creating utility 'TexturePacker' (http://www.texturepacker.com/) Using texturepacker you can auto generate your atlas and atlas meta data file.
     
  24. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    Hello,

    I am currently looking at several alternatives regarding 2D toolkits for Unity and I would like to ask you the same question I asked in the ex2D official thread in these forums.
    Basically, I would be working on (continuing work I already started with Cocos2D) a side scrolling game with pseudo 3D levels like Final Fight.

    http://forum.unity3d.com/threads/10...Unity-RELEASED?p=875720&viewfull=1#post875720

    Is Orthello2D using a similar approach to the one used by Cocos2D? What would your advice be for such a game done with Unity and Orthello 2D? One draw call per sprite?

    Thank you!
     
  25. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    As I dont know the workings of Cocos2D and do not know that game I can not give you a usefull answer, I Guess.

    However ...

    Regarding batching

    Orthello 100% Free caches and re-uses materials so sprites and animations of the same atlas get batched automaticly.

    Orthello Pro has a batched sprite component that behaves like a sprite and where you can put your sprites and pack their textures so you could end up with only one draw call. you can animate sprites that are in the batch, but this will be a CPU thing because the UV coords will than be changed when the frames changes, but still only a few (multi material) or one ( texturepacked ) drawcall.

    regarding z depth / layering

    Each sprite/animating sprite has a (z)Depth property that determines drawing order. I am not sure if this will always work if you are working with sinlge or multi material sprite batch component.
    In addition, Orthello uses a 'painter algorithm' by default to draw sprites that have the same depth value, so lower sprites are always drawn over higher (y) sprites.
    ( essentially it sets the z part of the Vector3 transform.position, based on the actual x/y position )
     
    Last edited: Mar 28, 2012
  26. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    Hello Martijn,

    Thanks for the answers.

    Basically Cocos2D implements a VERY similar approach to yours (the API's you use are not dissimilar either). Through the use of a Scene Graph they bsaically implement/accelerate the painter's algorithm drawing sprites back to front and ordering them with a fake Z we can call zOrder (its integer in Cocos2D too just like in Orthello2D). Sprites have the same depth value and Cocos2D manages their draw order based on this zOrder.

    It's interesting what you say about the way you calculate the actual z vertex component, in this you differ from Cocos2D I think, but I'd have to check.

    I would need to try it, but I would not be surprised if batching messed with this. In Cocos2D if you alter the zOrder (the Integer Sprite depth you have in Orthello) you can do for sprites batched together but this does not work the way you want with other batched sprites.

    Say you have Batch A_node and Batch B_node. Batch A has 4 sprites A1-A4 and Batch B has 2 sprites B1 and B2.

    You have added A_node to the scene layer and then B_node. So, say that A_node has zOrder=1 and B_node has zOrder=2.

    Now, regardless of the zOrder you set even manually on A1, A2, A3, and A4 as well as B1 and B2 the zOrder you set on each of them is only useful to know if A1 is drawn on top of A2, A3, and A4 and if B1 is drawn on top of B2, but A1-through-A4 will always be drawn above B1 and B2.
     
  27. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    I have one more question about this. In the same example I was talking about, there is a case in which a change in Y coordinate should NOT change the drawing order, namely jumps. In this case, the default vertex z calculation which would work perfectly well with the case of walking sprites, would seem not to work too well as it is one case in which I would not want the higher Y to mean closer to the screen and thus appearing on top of another object with lower Y.
    So, in such kind of cases, what should I do with Orthello2D to get consistent depth ordering?

    Another question, about animation this time, are there visual tools which could help with sorting animation frames, creating animations, deal with animation objects and containers, etc...?

    Thanks for your answers, you have been a great help!
     
  28. Aruche

    Aruche

    Joined:
    Mar 29, 2012
    Posts:
    1
    I am trying Orthello 2D by creating a simple side scrolling game. Here's what I did:

    - Add one Player object and ALL Enemy objects (even those not visible from starting view position) directly onto the level via Scene view.
    - Scroll by adding a (deltaTime * speedVector) to view.position.
    (I deduct the same speedVector from objects that shouldn't be scrolling)

    Just wanted to check if there's anything I could use to optimise on those two things.

    I am overall impressed by Orthello's simplicity of use, thanks for providing the free version!
     
  29. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    If you make sure that the entire jump animation is in your atlas, the position while jumping wil be the same
    as when walking. The painter algorith uses the Vector2 position to calculate the right Vector3 x/y/z position.
    Using Texturepacker for your animations, your animation frames can be trimmed ( white space removed ) and Orthello will use the atlas offset to set the sprite at the right position.

    I can only think of TexturePacker to create your animations texture atlasses.

    No Problem.
     
  30. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Thanks .. I am very happy that you like the framework.

    I can think of 2 little tips :

    - Make sure that you disable the enemy GameObjects that are hidden, this will save CPU (Update cycles).
    ( sprite.gameObject.active = false/true )

    - You could also attach (as a child) an empty gameobject with a BoxCollider, as an 'activation' trigger, to your OT.view and position it in such a way (in front of the view movement) that you can use this trigger to 'auto-activate' the enemy objects when they enter the activation trigger

    Hopes this makes sense ...
     
    Last edited: Mar 29, 2012
  31. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    So, basically the draw order of the sprite (let's call it zOrder to be consistent) will change when jumping the same way it does when walking up and down the screen?

    If Orthello 2D changes the vertexZ in relation to the current X/Y position it will not be able to discern when the user is walking up or jumping. Am I correct?

    Then, if I am understanding this right, with Orthello 2D, the more Y increases the more the object moves into the screen (Z increases in a LHCS and decreases in a RHCS, with +X going to the right and +Y going up), right?

    Ok, assuming I was correct in the above statement, how would I handle the jumping case? (If I was correct) If my character walks upward it is natural that it goes from being in front of another sprite (currently standing still) to being behind it as its Z has been increasing as well.

    What would not be natural would be this: character A is at Y = 20, character B is at Y = 40 (A is drawn on top of B now) --> character A jumps and so its Y coordinate gets to be Y = 22 (B is drawn on top of A). This would be correct if A walked that distance in pseudo 3D space, but it is not if A jumps.

    Is this last paragraph correct?

    I am sorry for taking up your time, I hope it is not a waste of forum bandwidth because I hope that maybe others have this doubts as well. Thank you again for your help, I do appreciate it.
     
  32. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    The part about creating the atlas was not the source of concern (if we can call it a concern), the Pro version of Orthello 2D looks very promising on that side. What I am looking for is something more similar to SpriteHelper (example video: http://www.spritehelper.org/?p=311) because of the ability to create the animations visually instead of by code only (animation frames, preview, animation length, looping, etc...) like in this page: http://www.wyrmtale.com/orthello/sprites#animatingsprite.
     
  33. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    No .. I mean ... if the jump animation is contained in the Atlas ( the y movement is located in the Atlas) the sprite.position will not change when the character jumps. Only the animation will change .. so a jumping character will move (vector3) y+ but its z-order will be the same because the sprite.position.y will not change.

    Yes .. if you are moving the sprite.position.y when your character jumps, orthello could not tell trhe difference between a jump and a walk. But as stated above , when the sprite.position.y stays the same and you sprite.play("jump") your animation, and the y-movement is in the atlas ( atlas sprite offset after trimming <- TexturePacker ). The sprite will actually move upwards and will stay at the same vertexZ


    I dont know where LHCS and RHCS stand for but y+ (up) will move the sprite into the scene (z>) and y- will move the sprite towards the camera (<z)

    Aswered in the first part of this post.

    I agree :))

    Only if you decide to move the position.y when jumping.

    No Problem ...
     
    Last edited: Mar 29, 2012
  34. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696

    I do not aware of any sprite animation, ordering tools that can be used to create your spritesheets and atlases. Maybe there are some general tools .. I dont know...
     
  35. Panajev

    Panajev

    Joined:
    Mar 26, 2012
    Posts:
    42
    Thanks for the detailed answer, you cleared quite a bit of things out.

    Now, I would like not to include the jump animation inside the texture atlas to save memory, but it could be a sacrifice worth taking in the application, it would solve quite a bit of problems doing it this way.

    Edit: if I did not do it that way, how could I "trick" Orthello 2D into not changing the sprite's vertexZ?

    BTW, sorry for the short hand (incorrect too) form... Right Handed Coordinate System, Left Handed Coordinate System.

    Thank you again!
     
    Last edited: Mar 29, 2012
  36. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Texturepacker will trim the empty space and record the correct offset to conserve memory for you, so this should not be a problem.

    The only other solution is to write your own depth algorithm and put that into a custom component. This way you will have full control over the vertexZ your self by setting the depth manually related to the y-position. In your own algorithm you could take the state (walking/jumping) into account.

    (The painter algorithm is only effective if sprites are at the same depth)
     
    Last edited: Mar 30, 2012
  37. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Version 1.12 (Pro 1.8) released

    - Added OTGradientSprite
    - Fixed some Atlas stuff
    - PRO : improved OTPathController - added Start(), Stop(), Resume()
    - PRO : added another example PRO Example 3 - Movement On Path ( CProExample3a )
    that demonstrates the new functionality.

    Regarding the OTGradientSprite

    Add a custom gradient to your scene. You can set it up using multiple colors. Each color can be positioned (0-100)
    manually and can have a size (= solid color area ). A gradient can be horizontally or vertically oriented. Gradient is achieved using vertex colors.

    Read more about this here ...

    examples :





    Read more about this here ...
     
  38. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
  39. ufon68

    ufon68

    Joined:
    Jan 10, 2011
    Posts:
    4
    Hi, i'm looking into Orthello for my needs, looks pretty good so far, but i can't figure out how one can tell if there is a certain animation playing on the Animated Sprite component.

    So basically, what i'm looking for is something like

    myAnimationSprite.IsPlaying("jump")

    This is pretty essential in my opinion,yes, i can work around this by keeping track of what i'm playing using boolean variables, but that involves quite a bit of work and is not very elegant.
     
  40. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    You could try :

    Code (csharp):
    1. If (myAnimationSprite.isPlaying  myAnimationSprite.animation.name == "jump")
    2. {
    3. ....
    4. }
    Or if you are playing a specific animation's frameset....

    Code (csharp):
    1. If (myAnimationSprite.isPlaying  myAnimationSprite.animationFrameset == "jump")
    2. {
    3. }
    4.  
    Check info about all Orthello's C# classes , OTAnimatingSprite as well.
     
    Last edited: Apr 9, 2012
  41. AllSynergy

    AllSynergy

    Joined:
    Nov 1, 2011
    Posts:
    47
    Great. Pro update sounds great. Must test when I find more time. Keep up the good work.
     
  42. ufon68

    ufon68

    Joined:
    Jan 10, 2011
    Posts:
    4
    Thanks,

    will look into it when i can.
     
  43. Pgatti

    Pgatti

    Joined:
    Apr 10, 2012
    Posts:
    4
    Hi, this is my first post,

    I'm studying 2D game development and also using this awesome Orthello 2D package , but I'm having a problem with the sprite atlas. Maybe it's my fault but I can't let the sprites in order inside the atlas (I'm using TexturePacker), so I can't set the animation frames sequence right, like start at frame... and end at frame... Can I make the animation "jump" from a frame to another, without following a sequence like, from 1 to 6? Something like 1 to 3, then 5 to 6, or just by coding?
    I'm sorry, but I'm a begginer and my focus is design/art and not programing.

    PS: Sorry by the english skills too, I'm from Brazil.
     
  44. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Hi There Pgatti,

    Your english is good and understandable.....

    some info.....

    * OTAnimation objects can contain 1 or more OTAnimtionFramesets

    * OTAnimation object (or frameset) will be played by your OTAnimatingSprites

    * You will be able to play all framesets in one animation object at once or only one specific frameset

    * A Frameset can be formed by specifying a container, start and end frame

    or

    * A Frameset can be formed by specifying a container and an array of container (Atlas) Frame Names

    This last option is the one that will help you. When you have imported the atlas data into your orthello atlas object, you can see in Atlas Data that all frames have a name, imported from the texture packer data.

    When creating one or more framesets in an Orthello animation object, you have a frameset property
    Frame Names, that lets you specify all frames by name in the order that you want.

    This way you will have full control over all atlas frames that have to be displayed sequentially.
     
    Last edited: Apr 11, 2012
  45. TheMonarch

    TheMonarch

    Joined:
    Apr 12, 2012
    Posts:
    3
    Hi,
    we're just starting a little Jump'n'Run Project and try to work with Orthello.

    We want to build a room and created the textures fitting to the resolution 1280x720, but can't get them into the game correctly.
    Somehow it's either to small or to big and we don't know how to fix this.

    We've tryed playing with the Pixel Perfect Option and Custom Size so on but it didn't work.

    As a tutorial we used this http://www.rocket5studios.com/tutorials/make-a-2d-game-with-unity3d-using-only-free-tools-part-2/ especially this part:
    Can anybody help us and tell us how it's done, so that we have a clean start?:)
     
  46. Pgatti

    Pgatti

    Joined:
    Apr 10, 2012
    Posts:
    4
    Hi TheMonarch,

    I did this tutorial too and I didn't have any trouble. Try checking these textures options:

    Filter mode: point (i'm using bilinear, in my opnion it's better)
    Max size: it must be the same size or higher than your texture file.
    Format: truecolor

    I just had problems to scale the background of my project because I didn't create containers for that. I used textures directly in sprites (orthello > objects > sprite). For that you must know if you have a resolution of 1280x720 and, for example, a camera size of 5, you'll have: 720 / 5 = 144 / 2 = 72, in other words, each 1 unit will be 72 pixels.
    In my case I'm using a resolution of 2048x1536 and I have a background of 4096x1536 and a camera size of 5, so each unit is equal to 153,6 pixels, so my sprite has 10 units height and 26,6666666 of width.
    I'm not experienced so... It worked for me I hope it could work for you too.
     
  47. TheMonarch

    TheMonarch

    Joined:
    Apr 12, 2012
    Posts:
    3
    Okay, thanks for replying.

    The camera size thing is very confusing. It's jumping between 229,5 (in the editor) and 360 ( when we start it and its "maximised on play" ) ... we just want the right camera in the editor, cause it seems that the sprite texture size is right, when we are starting it ( "maximised on play" ON ) :)
     
  48. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Regarding view pixels and sizes.

    Orthello default : 1 pixel== 1 Unity3d unit

    OT.View -> Always pixel perfect (on) , will make sure that your sprites.size is always pixel prefect on each device. This gives your app a bigger playing size on a bigger resolution device than a smaller device. Your scene will look smalller on a bigger device.

    OT.View -> Always pixel perfect (off) will make sure the camera size is auto-adjusted (zoomed), so that your world will be pixel perfect at the OT.View.pixelPerfect resolution. This way your app will look the same on every device, independend of the resolution.

    Read more about handling the view here

    The custom size, can be adjusted and will be used by orthello to set the right Unity transform sizes to get the sprites pixel perfect.
     
    Last edited: Apr 13, 2012
  49. TheMonarch

    TheMonarch

    Joined:
    Apr 12, 2012
    Posts:
    3
    I think our problems seems to be, that if we drop a texture onto a sprite container it is automatically scaled to potencies of 2...

    So its all deformed and we have to adjust that with each sprite...

    Is it possible to switch this off?

    Greetings
    Arne
     
  50. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    Orthello resizes your sprite to the exact pixel width or height the first time you assign an image or spritecontainer.

    If you end up with a power of 2 sprite, it means that your image is that size. This is usually the case when Unity imports your image as a normal texture. You could set the image/textute importer in your project inspector to GUI instead of texture, so that Unity will know the exact size.