Wednesday, April 30, 2014

Day 4 of C# Unity


It's Day 4 and I'm back to the Space Shooter!  The hands on experience with these projects has become a wonderful compliment to the Beginner Scripting lessons, but more on that later...

Project: Space Shooter
I began today's session by covering a quick review of the last video I had watched in the project.  This was very useful to 1. put my brain in "Unity" mode and 2. refresh where I had left off.  The Camera and Lighting video was an awesome refresher on Unity's orientation.  Remember: Left Handed.  I practiced orientation by putting my left hand in weird positions, then guessing what the camera would show.  It helped a lot!



The next lesson Adding a Background was pretty straight forward.  Create a quad, add texture/material, adjust shader, scale, and transform.  One cool trick I didn't know before involved dragging a texture directly onto the mesh in the scene.  Unity creates a material for you!  While creating a material yourself is not difficult, eliminating a couple steps eliminates possible errors and mishaps - always a good thing.



One thing to note, the shader step was very shallow. The reference material, provided in the links to documentation, was either too vague or too advanced. I really hope to find more on shaders and materials later.



 Moving the Player provided an awesome opportunity for me to practice the Beginner Scripting lessons from Day 3. The lesson reviewed public variables, FixedUpdate, Vector3, and rigidbody. It also provided an introduction for the next lessons in the Topics tutorials including an introduction to data types, GetAxis, and using classes.

I most enjoyed the segment on Mathf.Clamp.  This is probably the first time I've thought C# had a useful function.  Clamp is awesome.  It allows you to constrain a game object to whatever space you define, and all in just a few lines of code!



I followed along quite easily until the last segment using Quaternion.Euler.  Yikes.  When I clicked on the reference material it brought me to Intermediate Scripting.  I knew I wasn't ready for this level of scripting, but felt unsatisfied blindly typing away.



Overall the lesson was perfectly paired with Beginner Scripting.  I highly recommend using the Beginner Tutorial Scripting and Space Shooter project together.  Tomorrow is back to scripting lessons!

Have you found any useful beginner tutorials on shaders?? Please link them in the comments.  I would love to understand them better.
Read More

Monday, April 28, 2014

Day 3 of C# Unity

     

     After the weekend break, I'm back at it.  I started today with every intent to continue Unity Gems, however, I realized very quickly "Common Unity Gotchas" was a bit more advanced.  Rather than get frustrated with GetComponent and all the rules and scenarios (and a StormTrooper ??), I switched back to the Unity Topics: Beginner Scripting.

  

Beginner Scripting
     I instantly felt more comfortable.  I worked through lessons 5 - 10.  The first two were awesome "gear ups" reviewing "If Statements" and "Loops."  These bits of code in C# are not terribly different from their JavaScript counterparts.

     Lesson 7 covered "Scope and Access Modifiers".  I already knew Scope. I did not fully understand how Access Modifiers work within Unity.  In my first exposure, I might have complained about the redundancy between setting variables in scripts and then changing parameters in the Inspector tab.  I now wish I would have worked through the scripting primer from the start.

     The lesson used a variable called "alpha" as an example.  When set to public, you can adjust "alpha" in the Inspector tab.  This made so much sense now!  How convenient to be able to tweak a parameter and see the effects immediately?!   The lesson explained the value of a variable can be set in Start().  This overrides the Inspector setting, but once game play is under way, adjustments can be made in the Inspector.  What is Start()? A perfect segue to the next lesson!



     Awake() and Start() were the subjects of lesson 8.  A solid foundation of Unity requires understanding the difference, use, and timing of these functions.  I am a bit shocked I was able to finish a project without grasping how these functions work.  The script calls Awake() first, and Start() immediately before the first Update().  I had a bit more understanding of Update() and Fixed Update(), but truly enjoyed the refresher and iteration.  It does wonders for my coding confidence.

     The final lesson reviewed "Vector Maths."  I must admit how surprised I was to enjoy this lesson.  Speckled with humor, the video covers 2D and 3D coordinate basics, explains how unity is "Left Handed," and provides useful example applications  (Tank! Tank! Tank!).

  


I am loving the Unity Topics tutorials and can't wait to get back to my Space Shooter project tomorrow!



Read More

Thursday, April 24, 2014

Day 2 of C# Unity


Day Two brought me to Unity's own tutorials which they have titled Learn.  Simple and straight to the point.  Under this tab you can find Tutorials, Documentation, Live Training (if something is scheduled), and other Support options.  The Tutorials consist of Topics - specific sessions and assignments that you choose from and Projects - guided, step-by-step from set up to final build of example games.

Scripting
As I am most concerned about my scripting practices, I decided to start with the Topic: Scripting.  There are a total of 47 lessons, over half of which are for beginners.  Perfect!  The topics are a series of YouTube videos, and not interactive, but each provide downloadable code and links to reference documentation.

The first four lessons are foundation builders.  I felt they were there to make sure everyone was on the same page.  Collectively, lessons covered the concept of scripts, basic components, and best practices for conventions and syntax within Unity.  I truly enjoyed all of them.



Project: Space Shooter
If you have not yet done a Unity Projects tutorial, I highly suggest it.  By far it was the best experience for me during the Global Game Jam.  The projects allow you to get your feet wet, experience all the things, and provide links to reference material if you have any questions.

The projects come complete with all the assets you need to finish the game and are awesomely organized. This is a big plus for me as I find Unity's importing and file structure something I definitely need to learn.  I watched the videos, took notes, then completed the tasks on my own.  This helped me iterate what I was learning a couple of times. My notebook is a best friend and I often use it as a reference later.



The one downside: these projects can be a bit over the top with the hand holding.  If you just follow the steps are you really learning it?  The notebook helps, but I try and make sure I don't use it as a crutch.  I also take time to play with the tools outside of the project lesson's "scope."  A good friend of mine recently said "When you get a new tool, you should ask yourself 'How can I "break it"?' and then learn from that process."

The first few lessons in the Space Shooter give you an overview of the game you will make, orientate you with creating a new project, and give you a good understanding for creating a player game object.  Each video has a single concept that is fleshed out in a series of tasks.  I really enjoy the setup.

Day 3 is already here! Let me know if you have a similar "notebook" experience in the comments below. 


Read More

Tuesday, April 22, 2014

Day 1 of C# Unity


It's Day 1.   I have checked over quite a few tutorials and guides and will be using the following in my 30 Days of C# Unity:

Now, I must put in a bit of a disclaimer: I have been around Unity for about 6 years and this year I used Unity for the first time during the Global Game Jam.  The vocabulary and UI are somewhat familiar to me.  That said, let's begin!

Unity Gems
    I began with the "Getting Started" card and focused on "Coding Conventions."  Some of you may know I am a huge fan of the book "Eloquent Ruby" by Russ Olsen.  The closer to convention and the more beautiful I can write my code, the happier I am.  "Coding Conventions" provided an extremely helpful foundation in the form of an article.  While I prefer an interactive tutorial, I was very happy with the content and presentation of information.  One thing I didn't notice was the name of the author or contributors.  This might be a useful addition to the site as it appears to have multiple/different contributors.


Unity Cookie
    I continued my Day 1 with Unity Cookie.  This YouTube video based tutorial site was highly recommended to me by my husband ( a Unity veteran of 6+ years).  Chris said it was one of the best tutorials for "Best Practices" within Unity.  I started at the beginning with Crash Course: Learn Unity by Wes McDermott.
    I must admit videos 1.1 - 1.4 moved a little slow for me.  This is where my disclaimer from earlier is most important.  The first video began with an overview of what the next three videos would cover.  The last video was actually a recap of what videos 1.2 and 1.3 covered.  This is excellent practice when giving a talk or presentation, but as each video was divided between links it seemed a bit wasteful.
    As promised, videos 1.2 and 1.3 gave a general overview of all that is Unity 3d. Wes spent time on whiteboards before going into the Unity Editor and identifying items and ideas covered in the whiteboard sessions.  I found it a little dry, but it might be due to the fact I am familiar with Unity's basic concepts already.  If you have watched these videos I would love to hear your opinion in the comments below.  Another perspective is always appreciated.



I stopped there and will begin Unity's Learn Tutorials on Scripting and the Space Shooter project tonight.  Watch for a blog post tomorrow morning on the results!
Read More

Monday, April 21, 2014

30 Days of C# Unity


Today starts a new chapter.  As you can surmise from the title, I will begin learning a bit of C# and the Unity game engine.  I will be using a variety of learning tools, tutorials, and as always, writing a response to the day's exercises here :)  I would absolutely love it if you followed along on my 30 day journey and always welcome comments, questions, and tips.  Are you ready?  30 Days of C# Unity begins... now!
Read More