Unity 3: Trying to get 2D for Free

Wishing there was a Unity 2D

You hear from a lot of people online (especially at helpful sites such as gamedev to use the best right tool for the job. Unity 3 is an excellent 3D game engine, however because of the abstractions needed for 3D it sometimes over complicates making simpler games, such as a 2D game.

Regardless of what Unity was designed to do, I wrote previously how I’ve been enamored with the engine and decided to see what it would be like to develop a 3D game on it.

Luckily I still have all the art assets from the MonkeySpin game I had used to dip my feet into XNA.

Initially I found development to be a real challenge, however using Unity’s awesome asset store I quickly realized how much you can truly leverage and how powerful the engine can be. The double edge of the sword however turned out to be the price.

Unity’s asset store was stuff full with packages designed to alleviate 2D development in the engine. Offering tools to help with Sprite management, 2D animation and camera. However they ranged from 50$ – 150$ in price. Luckily a free alternative existed, named Orthello. As you might expect, the free price is bundled with lacking functionality and documentation/examples. I was however pleased to at least give it an attempt!

Orthello and my Woes

Orthello offers you the power to create and control sprite sheets, scroll-able sprites (parallax scrolling), and animated sprites. I was able to put together the basic working of Monkey Spin however I hit smashed at 100mph into a roadblock on using animations in which I’d like to move the character. Let me explain…

Normally to animate sprites, you provide a sprite sheet that has all the graphics of the sprite animating on the spot. This is great for movement controlled by the player such as walking, jumping, running, crouching etc… Where things started to fall apart for me is when I wanted the animation to include movement. Including the movement in the animation left me with some new questions (these may be due to my inexperience with game development).

  • Should animations with movement still be animated in the center (i.e. on the spot)?
  • How do you take care of moving the sprite during the animation? Lerp the position?
  • How do you tie in the movement distance/time it takes to get there with the number of frames in the animation?

If you have any advice, tips, trips of hints please let me know! 🙂

2 Replies to “Unity 3: Trying to get 2D for Free”

  1. I realize this is pretty old now, but figured I’d comment anyways.

    Traditionally, when a character animation contains an offset like this, you hold the character’s world position in-place, and after the animation is finished, warp the character to the end position. (Or warp to the end position, and have the animation “catch up” to that spot, depending on what’s better for gameplay). Doing it this way gives the most control to the animator.

    The downside of this approach is that it tends to waste texture space. A good middle ground is if your sprite renderer allows per-frame offsets (I don’t recall that Orthello does, but most tools which use Atlases instead of Sprite Sheets allow for this) In which case you animate with the “full animation”, then trim the frames of whitespace and fix the offsets so they replicate the full animation. (A tool like SpritePacker will do it automatically).

    Hope that helps!

  2. @Graham J:
    Ah cool interesting.
    I didn’t think Orthello had this functionality. I’ve only been exposed to 2D animations where they occur in place, so it was a bit confusing having to change it around.

    I’m not sure if Orthello has the concept of an anchor as well which I know could’ve been used.

Leave a Reply

Your email address will not be published. Required fields are marked *