A very basic Unity 2D tutorial in C#

On YouTube there is a popular tutorial for Unity 2D game development for beginners, in 18 videos, starting here:

Unity 2d game tutorial–part 1 of 18

where you create a Galaga-like game.

The code in the videos is in JavaScript, I followed the tutorial re-writing all code in C#. Note: I am not the author of the YouTube tutorial.
It was quite noticeable while writing code how simply using a statically typed language as C# can avoid quite a number of errors in writing the code.

You can download the complete project written in C# here:
https://docs.google.com/uc?id=0B3QdVbIN8dohRmQtS2ZKai16Qms&export=download

Now some note of caution on the tutorial:

– It is not a tutorial on how to write code correctly in C#, or on how to structure object oriented programming for a game made in Unity, or on how to model AI, game mechanics and so on.

– It is not a tutorial on how to write real, commercial 2D games in Unity – more so now that Unity 4.3 is coming with a brand new integrated approach to 2D games.

The tutorial just introduces Unity as a 2d game tool and makes you use the very basic concepts. From what you learn you can use Unity to test basic game mechanics, but from this to creating professional games in Unity there is a long way to go. I’m proceeding with the books linked and with more complex projects: but thank you tutorial, it was a nice first go at it.

You can keep in contact with me on Twitter.

Social Share Toolbar

Comments

  1. Thanks for the post, this is right where I’m at. I am excited to work through these and try it in both Javascript and C#.

  2. Note: Unity 4.3 with integrated 2D support is out now http://unity3d.com/unity/download so you have even easier ways to proceed in 2D development.

  3. we are trying to create a Hidden Object Game in unity 2d… were completely newbies about game development so we would like to ask some help if anyone could…

  4. Umair Hassan says:

    Hi,
    I am beginner in C# and unity 3d, i want all scripting tutorials for camera ,pinching and zooming functions, for android game development… Kindly help me//
    Thanks

  5. Hi is this a true android tutorial ? As people say this is a mobile tut and yet they input no touch controllers ??

    • pietro says:

      Hi, it is not specifically oriented to Android devices – but if you don’t know this stuff it will not be possible to use unity 2d for android…

      • Thanks I’m just getting into mobile game development with unity 3d. Can you please advise on whats the best way to go about true android/ios game development as most guides and tutorials are not mobile oriented. Thanks

  6. Hi, does your tutorial has text or pdf version?

Leave a Reply to ton Cancel reply

*