OUYA Game Development by Example


Ouya Game Development by ExampleOuya Game Development by Example by Jack Donovan

My rating: 4 of 5 stars

I found this book very easy for beginners. Though having knowledge of unity3d is always going to be helpful. This book starts with an intro to hardware console itself. First chapter is dedicated to features of the OUYA device. If you own OUYA device then probably can skip this chapter, but otherwise author has tried to provide a good detailed feature description, so that you can learn about OUYA hardware and features available in it.

Chapter 2 is completely dedicated for setting up Unity3D and installing core development toolchain like Java, Android SDK, ODK and configuring connections. Author took around 15 pages to explain everything for both MacOS X and Windows platform and also a quick intro about building and exporting OUYA packages. So far all slow paced and nicely written.

Real action starts from Chapter 3, in which author walkthrough to first OUYA application and towards end make it to run on hardware itself.

Chapter 4 & 5 are for inputs mainly (both keyboard and touch) and taking action based on inputs. Making marble reacting to player’s input and then adding force based on touch dynamics and reading mouse positions in unity3d are some basic elements from these 2 chapters, which are not specific to OUYA, but since Unity3D maps buttons of OUYA controller with input schema, without any additional effort same game is being ported and author has explained it well. Chapter 6 focus on saving data for various game states and highlight OUYA API for the same.

Chapter 7 is dedicated for In App Purchases implementation, an important aspect for any game. While on OUYA every game has to be free to try, at the end every developer would want to add some sort of revenue generation model in game. This chapter guide how to implement purchase screen, make it function and unlock content / feature based on purchases etc. Also there are 2 pages towards end of the chapter which explains which model of monetization to be picked.

Chapter 8 is about polishing, packaging and submission. One of the key part, which is usually not found in many books like how to submit real product to app stores. Author took time to explain core screens, features, audio, camera actions and then how to export package and create game in developer portal.

Chapter 9 is the best part for any Unity3D beginner, even if you are not going to use it for OUYA. It explains about version control, various development methodologies like Agile, Waterfall. Also it covers basic design patterns considering projects with larger code base. Also to make complete use of Unity3D’s powerful UI features author has provided intro about shaders, particle effect, GUI skins and physics materials. This last chapter itself is enough for a reason to buy this book.

Disclaimer: I received a review copy of the book from Packt Publication. Though this review is not influenced by that. You can grab one from here

View all my reviews


Unity 2D Game Development


Unity 2D Game DevelopmentUnity 2D Game Development by Dave Calabrese
My rating: 2 of 5 stars

When I purchased this book that time I was not having experience in game development with Unity3D & C#. Coming from Actionscript/Flash background when Unity announced 2D features, I was among many of developers who felt blessed and made goal of learning unity by porting existing 2D games which were made in AS3 earlier.

For some reasons, I couldn’t start with this book earlier as got to work on some 3D project. Later when I picked this book last month, I felt that my decision/chance of first getting my hands on 3D project was good, because this book except you to have basic unity3d interface and programming knowledge.

I find it a fast paced book, which drive through a 2d platformer game step by step. Given the intended audience is who know Unity3D, author doesn’t spend too much time on stuff like where to find specific option. Book has a good space dedicated to State machine concept, which helps to understand concept in general itself a lot. Same goes for basic 2d physics and AI too. However, at same time with lacking information of some features which are used in project (e.g Spirte -> Pixtel To Unit option for asset).

In the eBook copy I found many typos which usually I never find in other Packt Pub books. Also the source code companied with book is little confusing due to its file/folder structure. However, since expectation for us as a reader is to be someone having experience of Unity3D thats not a very big issue, as we are gonna to type code ourself instead of copy paste while following the book.

However somewhere to maintain fast pace or some other reasons author had to skip certain elements like audio, ray casting, screen resolution handling, mobile platform specific quirks with unity2d tools etc, which I think very important and must have been included in book.

Since author shared real word problems and solutions which his team applied in the game studio, it makes book helpful in that context.

Overall this book should be a good & recommended as quick reference if you are working in Unity3D for 3D games already and want to develop a 2D game. You can go through this as a quick guide to start with 2D tools. However don’t expect that reading this book alone would be enough to get your 2d game released, as I mentioned that it lacks some pointers.

You can check book & TOC at http://bit.ly/1rrMS4D

Disclaimer: I got an offer for review copy of the book from Packt Pub, but since I had already purchased this one and was reading, I decided to share my review.

View all my reviews

My notes on Ruby on Rails – Day 3 (Riding Ruby)


So far I have explored basic concept of Ruby frameworks and commands to initiate a RoR web application. However, just like any other framework, rails also require basic knowledge of Ruby scripting language. Without that you can develop basic application but you can’t really understand generated code.
Keeping this in mind, I decided to enter in first R of RoR which is Ruby. I downloaded Ruby 1.9 and “The book of Ruby” pdf.

I completed chapter 1 today and in post I will summarize that.

  • Ruby is case sensitive.
  • Brackets are optional for methods in Ruby, however in some cases these are required.
  • Like perl, there isn’t any data type for variables. Also you don’t need to declare them in advance.
  • Global variables are defined with $ symbol, like $globalvar.
  • Semi colon after each statement is not required. However, if you add one, ruby won’t complain either.
  • To output line on console, we have 2 methods. puts and print. puts add a line feed after text while print doesn’t. That means, when we want to have cursor in same line, we should use print.
  • gets method is used to read user input from console. 
  • When we want to build a string with our variable in it, we can do this by adding #{varname}. For eg., lets say we have a variable name. And we want to say ‘Hello name‘. We can write like puts “Hello #{name}”.
  • Likewise PHP, single quoted strings having variables won’t be interpolated and will get printed as is. So if our previous statement is written like puts ‘Hello #{name} then out put will be Hello #{name} as opposed to Hello name.
  • #{ } can be used to embed non printing characters (\n, \t etc). Also we can even embed ruby methods or mathematical expression using this. In other words, anything enclosed with #{ } in a string will be executed by ruby interpreter as ruby code and will be replaced with output.
  • In ruby, we can write comments like perl starting with # sign. #this is a comment ^^
  • If we want to add multiline comments, then we need to use =begin and =end. And these should flush with left margin. 
  • Everything is an object in Ruby including numbers, strings. That said, we can call methods directly on these objects. For eg.,
    rate = 10.05
    amount = gets()   #this will read value from console
                                 #and store like a string.

    #this will convert string to float number (to_f is a method in String class).
    amount = amount.to_f    puts “Tax is Rs.#{(amount * rate) / 100)}”
  • Like Delphi/Pascal, we need to add then after if block. A typical if block looks like:
    #like wise methods, brackets are optional in
    #if statement too but, we should add
    if (amount < 0.0) then  
          #check if amount is negative and if so, change to 0.
          amount = 0.0
  • Sometime, we can find code which have entire if block as single line. In that case, then isn’t must. However at the same time, it doesn’t make code clean and readable too. So its not advisable.
  • Methods are defined with def statement. def methodname …. end.
  • +, – are operators in other languages. But in Ruby, these are methods. Consider this:
    x = 1 + 2
    Here + is a method of Fixnum (Integer) object 1. Value 2 is sent as argument to it.  Result 3 is returned and assigned to x.
  • To define a class in Ruby, we need to start a class .. end block. Class name should start with capital letter.
    class Animal
    #…. class body here.
  • To define an instance variable, we use @ prefix in classes. Like
    class Animal
       def set_name ( aName )
                @name = aName
  • To create an object of defined class, we use Class.new method. Then we can call methods using that object. Like:
    dog = Animal.new
    dog.set_name( “Tommy” )
  • If we want to define a constructor for our class, we can do it by defining initialize method in our class. 
  • Since like Java and most modern programming languages, Ruby has built in garbage collector. So we don’t need to define destructors.
  • To override a method, we just need to redefine that in our class. For example, if in our custom class, we define a method to_s then it will override to_s method which is used in standard Ruby object hierarchy.
  • To look inside an object, we can call another built-in method which is inspect and part of standard Ruby object hierarchy. For example, dog.inspect will print details about dog object.
  • There is a shortcut method p to inspect and print details about any object. Like:
    p ( dog )