Monday, April 20, 2015

My review of "Unity 2D Game Development Cookbook"

Packt Publishing latest book on Unity is “Unity 2D Game Development Cookbook” by Claudio Scolastici.   Since it is a cookbook that means there are recipes on how to do many things with Unity 2D on 3D objects.  Packt Publishing also provides asset files as well as the code to download.  There is also a downloadable PDF that shows the colored images from the book.
    The book begins with techniques for importing models and scenes from Maya.  Maya is used for this demonstration because of its popularity and its ability to export FBX models.  Most 3D software can export FBX and this chapter explains how to import these models into Unity with little hassle. Importing of animation for the 3D models is also discussed.
    The next chapter discusses importing textures from Photoshop or other 2D programs and then turning them into materials that you can place on objects. One of the recipes also discusses how to set up a texture atlas from a group of images.  Another recipe covers animating 2D UV maps on a 3D object.
    The third chapter is all about creating and animating a game character.  The recipes cover everything from setting up an animation tree to creating a blend tree.  This is a nice overview of the Mecanim animation system.  I really enjoyed this chapter because almost every game is going to have some sort of character in it and being able to animate your character and have it move in a variety of different ways makes your games more realistic.
    The next two chapters take the character that was created in chapter three and give it a scene to move around in and provide physics to let the character react to objects.  First Unity’s standard assets are imported from the Unity store.  These assets contain a character controller package which includes prefabs, textures and scripts that are modified and used in our game.  Later on collision detection and scrolling backgrounds are discussed.  Lastly, a recipe for creating a camera that keeps our character at the center of the screen is created.
    Chapter six has us code a game manager that is a state machine that gives us better control over the game.  Recipes are provided for setting up the games UI as well as displaying “GAME OVER” and “GAME WIN” conditions. Chapter seven is focused on adding audio and video clips to the game.
    Finally, in chapter eight setting up a 2D game with sprites and spritesheets is briefly talked about.  Recipes are provided for animating the sprites and using keyframe animation with sprites.
    Overall the “Unity 2D Game Development Cookbook” was a very interesting book on using 2D objects in a 3D game.  I learned a lot from the different recipes and plan to keep this book on my reference shelf.

No comments:

Post a Comment