Make A 2D Game in Unity3D Using Only Free Tools Part 1
In this iDevBlogADay post, I’m going to kick off a new tutorial series that’s aimed at making a 2D sprite-based game in Unity3D using only freely available tools, scripts and plugins. This isn’t the first 2D in Unity3D tutorial series I’ve done here – I previously did a 5 part series that used Sprite Manager 2 for the sprite display and animation duties. This time around, I want to show you how to make a game basically for free and I’m going to up the ante in this new series by adding in some other great plugins like iTween and A* Pathfinding.
Over the course of this series, we’re going to recreate one of my all time favorite C64 games: Lode Runner! I always wanted remake Lode Runner for my own amusement but also as a way to try out some things I haven’t figured out how to do yet – like creating an AI that can follow the player on ladders.
In this first installment, I’m going to introduce you to the tools we’ll be using and show you how to set them up in Unity. In the next part, we’ll dive in and start making the game. While we’ll be using the free versions of these tools, most of them also have paid options which unlock additional features.
Tools:
- Unity3D: You probably already know that Unity3D is great tool for making 3D games, but it’s also pretty great at making 2D games with the addition of a few scripts and plugins. We’re going to be using the free version of Unity which will allow you to publish games to web as well as PC and Mac standalone but you can easily make the game work on iPhone or Android with a paid upgrade to those versions.
- Orthello 2D Framework: There are several different sprite plugins available for Unity, the most popular being Sprite Manager 2 which I have used extensively and wrote about in my earlier 2D game tutorial series. I recently found myself looking for an alternative to SM2 and while doing research, @jeedee mentioned that he was quite satisfied with Orthello so I thought I’d try it out. In some ways it’s not as easy to use as some of the other plugins out there – you have to make your own sprite atlases for example – but for a free plugin it offers a ton of great features and will work perfectly for our 2D project.
- iTween: iTween is my go-to animation system for every one of my projects here at Rocket 5. It’s ideal for animating everything from enemies to UI and it’s usually the first script I install when starting a new project.
- A* Pathfinding Project: A* Pathfinding is probably the most widely used pathfinding system available for Unity. It’s fast, powerful, easy to use and since there’s a free version it’s perfect for our project.
- TexturePacker: TexturePacker is a standalone app that makes it easy to create sprite sheets from your textures. You could use an image editing app like PhotoShop, Acorn or Gimp to make your atlases, but Orthello 2D recently added direct support for atlases generated by TexturePacker which should make things easier for us later on.
Starting A New Project:
- Install the latest version of Unity and then create a new project by going to File -> New Project, click the Set… button and browse to a location on your drive where you want to save your Unity projects, enter a name for the project and then click Save. Optionally you can select any packages that you want to import into the new project, I didn’t import any packages into my new project. Finally click the Create Project button.
- Create a new folder in your Project view and name it “Scenes” and then save the current scene by going to File -> Save Scene As, open the Scenes folder you created in the previous step, name it “level1” and then click Save.
Installing Orthello 2D:
- Open the Asset Store by going to Window -> Asset Store, search for “orthello2d“. The page for the plugin should display, click the Download button. Or download the latest version from the website, unzip the archive and double click on orthello.unitypackage.
- When the Import Package window appears, make sure that all the checkboxes are checked and then click Import. After a few seconds you should see an “Orthello” folder in your Project view.
Orthello 2D Initial Setup:
The Orthello website has tons of detailed information on setting up and working with the plugin so be sure to take a look. Following are my simplified steps to get you started.
In order for Orthello to work in the scene, you’ll need to setup a few things first. Note that you will need to repeat these steps in every new scene you create.
- In the Unity Project view, go to Orthello -> Objects and then drag the OT prefab into either the Scene view or the Hierarchy.
The OT prefab acts as a parent for Animations and Sprite Containers that we will be adding to the scene later on. Adding the OT object to your scene will also automatically make some changes to the Main Camara so that it will work properly for a 2D game – the main things are it changes the Projection to Orthographic and sets the Size to 332 (332 is kind of a weird size, but that’s the size that Orthello likes).
Installing iTween:
- Open the Asset Store again by going to Window -> Asset Store, search for “itween“. The page for the plugin should display, click the Download button.
- When the Import Package window appears, make sure that all the checkboxes are checked and then click Import. After a few seconds you should see an “iTween” folder in your Project view. If you want you can delete the “ReadMe!” and “Sample” folders if you want but they won’t hurt anything and it’s a good idea to look at the sample scene if you’ve never used iTween before.
Installing A* Pathfinding:
As I write this, the free version of A* Pathfinding is not available for download from the Unity Asset Store (the paid version is though).
- Go to the website, click on Download Latest Version and then click on A* Pathfinding Project in the Download area which should download a file named PathfindingProject_Free.unitypackage onto your computer.
- Double click on PathfindingProject_Free.unitypackage which will open the Importing Package window in Unity. Make sure all of the checkboxes are checked and then click Import. You should now see a folder named “AstarPathfindingProject” in your Project view.
A* Pathfinding Initial Setup:
Be sure to read the “getting started” page in the A* Pathfinding Documentation for a full explanation of how to setup A*. Here are my simplified steps to get you going.
- Create a new empty game object by going to GameObject -> Create Empty.
- Make sure that the x,y,z position of the game object is at zero and then rename the object to “A*“.
- Add the Astar Path script to the game object by going to Component -> Pathfinding and then click on Pathfinder.
- With the A* object selected in the Hierarchy, you should see Astar Path script’s options in the Inspector. At the top of the script you should see a message that says “Do you want to enable Javascript support?”. Since all of the scripts used in this tutorial are going to be written in C#, you can go ahead and click “No” (you can change this later in the settings if you want).
Conclusion:
If you followed all of the steps above, then your project should look something like this (click to see larger image).
The cool thing about the project is that you can use this as a starting point for creating all kinds of 2D games so keep this around as a base for starting new 2D projects (although be sure to check for the latest versions of the scripts).
More Tutorials In This Series
Make A 2D Game in Unity3D Using Only Free Tools Part 1
Make A 2D Game in Unity3D Using Only Free Tools Part 2
Make A 2D Game With Unity3D Using Only Free Tools Part 3
Make A 2D Game With Unity3D Using Only Free Tools Part 4
Make A 2D Game With Unity3D Using Only Free Tools: Beginning Enemy AI With A* Pathfinding
And here’s another tutorial series that uses Sprite Manager 2 for the sprite display and animation duties:
Creating 2D Games with Unity3D Part 1
Creating 2D Games with Unity3D Part 2
Creating 2D Games with Unity3D Part 3
Creating 2D Games with Unity3D Part 5
Show Your Support
If you find these tutorials useful, please considering buying one or more of our games and apps for iPhone and iPad. Your support helps to keep the tutorials flowing!
- Giant Moto: High flying arcade style motocross action!
- Small Space: Fly a spaceship, eat space creatures, score point!
- Holeshot Drag Racing: High speed drag racing action!
- Alien Booth: Transform pictures of your friends into awesome aliens!
- iSpoof Walken: A hilarious look into the world of Christopher Walken!
- Gaga Eyes: Transform pictures of your friends to give them huge anime eyes!
About the author
Tim Miller is a veteran game developer with over 15 years experience in the video game industry working as a Level Designer and Lead Level Designer at LucasArts, Secret Level and Nihilistic Software. He co-founded Rocket 5 Studios with his wife Cathy and their dog Rocket in 2009. Twitter, LinkedIn, Portfolio
This looks really interesting and i will have to follow your series, as getting into Unity is something on my list and having a well thuoght out approach like yours will be invaluable. Keep up the excellent work.
Da Voodoochief
Glad to hear you’re finding it useful.
Definitely going to follow this. Always interested to learn what Unity is all about. One question: what is that Editor folder in your project? My project didn’t end up having that one. Looking forward to the next post…
Good catch. I was originally going to include this script http://www.unifycommunity.com/wiki/index.php?title=IPhoneTextureImportSettings in the project but since Orthello doesn’t need the source textures to be in the project, I decided to leave it out. I didn’t notice the Editor folder was still in there until after I posted the screenshot.
Ah cool. Do you have any recommended tutorials out there for getting used to Unity in general (prior to going through the one you are working on)? My skills are primarily in C#/XNA and have never touched unity. Thanks!
@twitter-242149350:disqus I’ve really been liking these tutorials http://www.walkerboystudio.com/html/unity_training___free__.html
@rocket05:disqus I’m really looking forward to this tutorial. I loved Lode Runner!
The tutorials that Robert mentioned are awesome and 3D Buzz also has a lot of good tutorials: http://www.3dbuzz.com/vbforum/sv_home.php
I hadn’t see those Walker Boys tutorials before, nice find!
Just thought you might be interested to know the current Orthello 2d release has a tween class included in it.
Yep, I saw that. Haven’t tried it yet but I’m super happy with iTween and I’m already familiar with using it so I might still stick with iTween for the tutorial. It’s nice to have options tho.
Tim you’re GREAT!!
[...] Hier geht es zu dem ersten Teil der Tutorial-Serie Make A 2D Game in Unity3D Using Only Free Tools. [...]
[...] to part 2 of this tutorial series on making a Lode Runner-style 2D game with Unity 3D. In part 1, I introduced you to a bunch of free tools and scripts that we’ll be using and showed you how [...]
[...] Hier geht es zum ersten Tutorial Teil: Make A 2D Game in Unity3D Using Only Free Tools Part 1 [...]
Great Tutorial, really helped
The prices are crazy for unity!
Thanks, glad to hear it helped!
it looks like the link for a* pathfinding is dead,
would you mind to give another link or upload it?
sorry looks like the link is already up again
i have followed these and got stuck on the compement -> pathfinding -> pathfinder pls reply when i say this i mean i go onto complement and pathfinding docent come up what am i doing wrong
Hi, TexturePacker website seems to have issues (no more images) and I’m unable to get a copy of it. Do you know if it’s temporary or where I can get a free and legal copy ?
[...] to Part 3 in this series on making a 2D sprite-based game with Unity 3D. In Part 1 I introduced you to the tools we’ll be using to make a Lode Runner style action game and in [...]
[...] 4 of our tutorial series on making a 2D game in Unity3D with freely available tools and plugins. Part 1 introduced you to the tools we’re using, in Part 2 we built our first level and in Part 3 we [...]
[...] more recent tutorial series that uses Orthello (free) for the sprite display and animation duties: Make A 2D Game in Unity3D Using Only Free Tools Part 1 Make A 2D Game in Unity3D Using Only Free Tools Part 2 Make A 2D Game With Unity3D Using Only Free [...]
Awesome! I just need to do some simple 2d games and this is really useful! Thanks a lot!
With the latest version of Unity, and just attempting this tutorial today, I’m finding that the size of the Main Camera keeps reverting to 384 (instead of 10). Also, the first brick I create has a scale of 1, but whenever I enter Play mode, the scale changes to 0.3.
Any thoughts?
[...] a fairly nice walk through on making 2d games with Unity3D but I ran into a weird problem. While trying to setup a SpriteAtlas, I could set the fields for [...]
[...] Making a 2D Game in Unity 3D using only free tools – Rocket5 Studios (tutorial) [...]
[...] Making a 2D Game in Unity 3D using only free tools - Rocket5 Studios (tutorial) [...]
So your tutorial titled “only fee tools” included a paid tool. All I can say is wow, you are an embarrassment to tutorial makers everywhere.
Which tool? I just ran though the initial setup and I found free versions of all the utilities.
Perhaps you should look again before making incorrect and inappropriate accusations.
Yes, I’ve just got almost the same problem. I found when i changed Orthello2D size to 10 it doesn’t set Main Camera automatically to 10. It was 384. Brick didn’t change its scale but overall look of scene is weird. Unity 4 / Orthello2D for Unity 4.
[...] writing this post I came across this as well over at Rocket 5 Studio, which at first glance, looks interesting as [...]
[...] Make A 2D Game in Unity3D Using Only Free Tools Part 1 | Rocket 5 Studios. Share this:TwitterFacebookLike this:LikeBe the first to like this. ← Previous [...]

Pingback: Tutorial: Mit Unity3D ein 2D Spiel entwickeln – Part 1 - Der Softwareentwickler Blog
Pingback: Make A 2D Game with Unity3D Using Only Free Tools Part 2 | Rocket 5 Studios
Pingback: Tutorial: 2D Games in Unity3D mit kostenlosen Tools – Teil 2 - Unity News
Pingback: Make A 2D Game With Unity3D Using Only Free Tools Part 3 | Rocket 5 Studios
Pingback: Make A 2D Game With Unity3D Using Only Free Tools Part 4 | Rocket 5 Studios
Pingback: Creating 2D Games with Unity3D Part 5 Complex Collision | Rocket 5 Studios
Pingback: Orthello – Atlas Data doesn’t populate » Refactored scope
Pingback: The Roadmap to Develop Indie Games | Lion Inn Games
Pingback: El camino para desarrollar video juegos indie | Lion Inn Games
Pingback: The General Idea – 2D SideScroller
Pingback: 2D Game in Unity3D « 5 Story Building