zaterdag 2 augustus 2014

Develop a Monkey Ball Inspired Game with Unity

Final product image
What You’ll Be Creating

Introduction


In this tutorial, you’ll learn how to create a mobile 3D game using C# and Unity. The objective of the game is to use the accelerometer to move the ball and reach the portal.


You will learn about the following aspects of Unity game development in this tutorial:


  • 3D Primitives

  • accelerometer controls

  • camera movement

  • physics

  • GUI Textures


1. Create a New Unity Project


Open Unity and select New Project from the File menu to open the new project dialog. Tell Unity where you want to save the project and set the Set up defaults for: menu to 3D.



2. Build Settings


In the next step, you’re presented with Unity’s user interface. Set the project up for mobile development by choosing Build Settings from the File menu and selecting your platform of choice.



3. Devices


The first thing we need to do after selecting the target platform is choosing the size of the artwork we’ll be using in the game. This will help us select a proper size for the 3D textures and 2D GUI without making the artwork blurry or use textures that are too large for the target device. For example, the artwork needs to have a higher resolution if you’re targeting an iPad with a retina display than a Lumia 520.


iOS


  • iPad without Retina: 1024px x 768px

  • iPad with Retina: 2048px x 1536px

  • 3.5″ iPhone/iPod Touch without Retina: 320px x 480px

  • 3.5″ iPhone/iPod with Retina: 960px x 640px

  • 4″ iPhone/iPod Touch: 1136px x 640px

Android


Because Android is an open platform, there’s a wide range of devices, screen resolutions, and pixel densities. A few of the more common ones are listed below.