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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Free 2D framework for Unity

Discussion in 'Assets and Asset Store' started by daemon3000, Dec 17, 2012.

  1. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    EDIT(15-09-2013): This project is closed and will not receive any new updates.

    Check the
    Bitbucket repository for the latest changes.


    What is tlk2D?

    tlk2D is a free 2D framework for Unity 3D, written in C#. It provides an easy way to add 2D images and animations to your game.
    Tested only on Windows/MAC/Linux and Web-Player. tlk2D requires Unity 4.

    Features:


    • Atlas Builder
    • Sprite Animator
    • Collider Editor(experimental)
    • Runtime Sprite classes
    • Sliced sprites for 9-slice scaling.
    • Static Sprite Batcher
    • Custom anchor points
    • Pixel perfect rendering
    • NEW: Text Sprites

    You can try a demo here. The demo uses iTween, created by
    Bob Berkebile.

    Documentation
    The documentation for tlk2D is available online, here.

    Download
    You can download tlk2D from here.

    Support
    Feel free to send me a message if you have any problems with the framework or leave a reply here, I will check the thread
    regularly.

    Screenshots




    Videos
    Videos showing the basic workflow using tlk2D.

    Part 1


    Part 2


    Part 3


    Part 4
     
    Last edited: Sep 14, 2013
  2. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Some of the new features:
    • Pixel perfect rendering
    • User defined custom anchor points
    • The Atlas Builder can now trim transparent pixels
    A list with all new features, as well as bug fixes, is included in the package.
     
  3. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    As the subject says, Unity 3.X support planned?

    Thanks.

    Btw,

    Looks great.
     
  4. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    The framework is compatible only with Unity 4.x because I use custom namespaces. If you want to use it with 3.x just edit the scripts and remove the namespace(send me a PM if you need help). I will consider making it compatible with Unity 3.x when i release a new version.

    Thanks for the feedback.
     
  5. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    Ahh. Thank you for the quick reply :)

    I'll check it out. I'll try removing the namespaces and see what that entails and try and report back in.

    Thanks for making this package available freely.
     
  6. simone007

    simone007

    Joined:
    Oct 30, 2008
    Posts:
    221
    Great work.... sliced sprites? they are so important for me :D
     
  7. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    My previous answer regarding Unity 3.5 was partially wrong. I've been using some new methods introduced in Unity 4 API so even if you removed the namespace you would still get some errors. I fixed those problems and uploaded a new package for Unity 3.5(I tested it only on Unity 3.5.7, the last version).
    You can find the link in the first post, and let me know if you have any problems with it.

    simone007, sliced sprites and text sprites will be added in the next release.
     
  8. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    Many thanks D :)

    I was just about to start porting it. Very happy to see it's been done.

    I'm using 3.5.7 so I assume it should work fine. Will report back.
     
  9. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    281
    Example scene works great.

    Thanks again.
     
  10. geomorillo

    geomorillo

    Joined:
    Jul 31, 2012
    Posts:
    12
    Exellent work pal ive tested it a bit and im using it in a little project i have and works great
     
  11. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Version 1.1 has been released

    Change Log:
    • Version 1.0
      • New Features
        • Collider Editor(experimental) - allows you to create custom mesh colliders for your sprites.
        • Static Sprite Batcher - gives you more control over the batching process.
        • Sliced sprites for 9-slice scaling.
        • A new container that can import sprite atlases exported in the Json format.
      • Improved features
        • The Atlas Builder has been rewritten and can show you in real-time how the sprites are packed. It can also export in the following formats:
          • tlk2D
          • Cocos2D
          • Json
        • The Sprite Animator has been improved.
        • All runtime sprite classes have been redesigned and rewritten.
    • Version 1.1
      • The pixel perfect rendering code has been improved, it now works with both orthographic and perspective cameras.
      • The AnimatedSprite class has a new option called "Animate Physics" that updates the center and size of the collider when the frame changes. It works only with the BoxCollider component.
     
    Last edited: Mar 11, 2013
  12. Seal_I

    Seal_I

    Joined:
    Apr 19, 2013
    Posts:
    7
    First of all want to thanks daemon3000 for the great work!

    Also have some questions: is this possible to handle sprite touch with this framework?
    I've tried to use raycasting, but it doen't work thou sprite doesn't have mesh collider... or something like that.
    Does anyone have any ideas?
     
  13. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    The framework doesn’t have any built-in functionality for handling mouse or touch input, however, you could use Camera.ScreenToWorldPoint to get the mouse/touch position in world space and see if the sprite contains that position. To check if the sprite contains a position, you need to create a Rect from the position and size of the sprite and make a call to the Contains method.

    This is a basic solution and it doesn’t work well if you have multiple sprite layers. In that situation you will need a manager script that controls the order in which sprites handle input.
     
  14. Seal_I

    Seal_I

    Joined:
    Apr 19, 2013
    Posts:
    7
    Thanks!
     
  15. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    A new version of the framework is available. It adds text sprites and containers to load bitmap fonts created with AngleCode's BMFont utility(only Xml and text formats).
     
  16. Loden_Heathen

    Loden_Heathen

    Joined:
    Sep 1, 2012
    Posts:
    456
    Found your tool gave it a try and like it good work very easy to use.

    1 suggestion; on the sprite I found it handy to be able to turn off the update rotate function. My use case is that I am actually using this to build out a 3D GUI (see attached screen); The panels you see are made with slice sprites so the border doesn't stretch all funky.

    It was easy enough to update the script with a bool faceCamera and added a test for that on the update rotate function so I'm good for my uses but I think this could be handy for others.

    Example:
    $ExampleCapture.JPG

    PS: I'll be using the slice sprite for the buttons you see top and bottom as well but in that case of course I want them to update rotate.