Book Image

Mastering Android Game Development with Unity

By : Siddharth Shekar
Book Image

Mastering Android Game Development with Unity

By: Siddharth Shekar

Overview of this book

Game engines such as Unity are the power-tools behind the games we know and love. Unity is one of the most widely-used and best loved packages for game development and is used by everyone, from hobbyists to large studios, to create games and interactive experiences for the Web, desktop, mobile, and console. With Unity's intuitive, easy-to-learn toolset and this book, it's never been easier to become a game developer. You will begin with the basic concepts of Android game development, a brief history of Android games, the building blocks of Android games in Unity 5, and the basic flow of games. You will configure an empty project for the Jetpack Joyride Clone Game, add an environment and characters, and control them. Next you will walk through topics such as particle systems, camera management, prefabs, animations, triggers, colliders, and basic GUI systems. You will then cover the basic setup for 3D action fighting games, importing models, textures and controlling them with a virtual on-screen joystick. Later you will set up Scene for 3D Configuration, create basic gameplays, and manage input controls. Next you will learn to create the interface for the main menu, gameplay, game over, achievements, and high score screens. Finally you will polish your game with stats, sounds, and Social Networking, followed by testing the game on Android devices and then publishing it on Google Play, Amazon, and OUYA Stores.
Table of Contents (15 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Unity3D and game engines


A game engine is a software framework designed for the creation and development of video games. Many tools and frameworks are available for game designers and developers to code a game quickly and easily without building from the ground up. As time passed by, game engines have become more mature and easy for developers, with feature-rich environments. Starting from native code frameworks for Android such as Unity, Unreal, Cocos2D-x, LibGDX , and so on, the game engines started providing clean user interfaces and drag-drop functionalities to make game development easier for developers. These engines include lots of the tools which are different in user interface, features, porting, and many more things but all have one thing in common; that is they create video games at the end.

We will discuss some of the most popular game engines in this section by comparing those on the basis of:

  • User Interface and environment like how easy it is to learn and develop games.
  • Features and functionality like what game engine can achieve and do and on what level of quality.
  • Pricing like is it free or paid.

Let's get into more details with this comparison.

Unreal Engine

Unreal Engine (http://www.unrealengine.com) is a game engine developed by Epic Games. It was an in-house game engine of Epic Games and was first showcased in 1998 first person shooter game Unreal. Unreal Engine is mostly used for creating first-person or third-person shooter games but it has also shown quite good quality in other genres such as stealth, MMORPGs etc. Unreal Engine includes high degree of portability and easy interface features with more logic and behaviors written in C++ language.

The latest release called as Unreal Engine 4 supports almost all platforms supported by Unity including Windows, Xbox One, Windows RT, OS X, Linux, PlayStation 4, iOS, Android, Ouya, and browsers using WebGL.

Unreal Engine 4 was released in March 2014 for the public use. Unreal Engine has nice user interface and navigation controls are very polished and easy to use. Unreal Engine provides very easy flow and interface to create first person shooter games and contains features to produce AAA quality game including real-time global illumination using voxel cone tracing, eliminating pre-computed lighting.

You can download the engine and use it for everything from game development, education, architecture, and visualization to VR, film and animation. When you ship a game or application, you pay a 5% royalty on gross revenue after the first $3,000 per product, per quarter Unreal Engine's learning curve is a little high so it's not best suited for new aspiring game developers:

Figure 1.3 Unreal Engine 4 Interface

Adobe Flash professional

Adobe Flash (formerly called as Macromedia Flash) (http://www.adobe.com) is a multimedia and software platform used for creating vector graphics, animations, games, and rich internet applications (RIAs) that can be viewed, played, and executed in Adobe Flash Player. The Flash is widely used for creating animations and mostly advertisements for web browsers but its use of creating games is declined very heavily in recent years by HTML5 framework.

There was a time when Adobe Flash was most popular game engine for online browser games and made a quite big wave of independent game developers creating games for online portals such as Kongregate and Miniclip.

The Adobe Flash includes very easy interface to create amazing and robust animations allowing artists to create vector art directly in the editor. It also supports Adobe Illustrator and Adobe Photoshop layers as well to make it easy integrated with vector art and animations. Adobe Flash allowed developers to port their games and animations from browsers to Desktops (Mac and Windows), Android, and iOS using Adobe AIR framework but couldn't grasp the much attention of game developers and artists due to low performance on end devices.

Adobe Flash has a Free 30-day trial but once the trial is finished you must buy a license unlike other engines discussed in this section.

Figure 1.4 Adobe Flash CC Interface

Game Maker Studio

Game Maker Studio (originally names Animo and later Game Maker) is an event-driven game creation system created by Mark Overmars in Delphi programming language in 1999. Originally created for 2D animations, it quickly moved up high on to being a very robust and easy-to-use drag-drop tool for creating 2D games.

Game Maker Studio uses pre-defined events to create actions in the game, which makes it very easy for developers to create games without needing prior knowledge of programming and coding stuff. The tool comes with a sandboxed language called Game Maker Language (GML), which allows developers to define custom and more complex behaviors for their games.

The Game Maker Studio comes with a clean and slick user interface that lets developers build and deploy their games on Windows, macOS X, Ubuntu, HTML5, Android, iOS, Windows Phone 8, and Tizen. The latest version also introduced Xbox One and PlayStation deployment.

Note

Tizen is the open source operating system (OS) of everything, including mobiles, wearables, in-vehicle infotainment, and TV.

Figure 1.5 Game Maker Studio Interface

Unity3D

Unity (http://unity3d.com) is cross-platform game engine developed by Unity Technologies. It made its first public announcement at Apple's Worldwide Developers Conference in 2005 and supported only game development for Mac OS, but since then it has been extended to target more than 15 platforms for desktop, mobile, and consoles. It is notable for its one-click ability to port games on multiple platforms, including BlackBerry 10, Windows Phone 10, Windows 10, OS X, Linux, Android, iOS, Unity Web Player (including Facebook), Adobe Flash, PlayStation 3, PlayStation 4, PlayStation Vita, Xbox 360, Xbox One, Wii U, and Wii.

Unity has a fantastic interface that lets the developers manage the project really efficiently from the get-go. It has nice drag-drop functionality with connecting behavior scripts written in C# and Boo (a dialect of JavaScript) to define the custom logic and functionality with visual objects quite easily. Unity has been proven quite easy to learn for the new developers who are just starting out with game development and now more large studios have also started it using, and that is also for good reasons.

Unity is one of those engines that provides support for both 2D and 3D games without putting developers in trouble and confusion. It has vast collection of online tutorials, great documentation, and a very helpful community of developers. Also, Unity has the Asset Store, where developers sell reusable components of Unity to reduce the development time and efforts for other developers. You can check Unity Asset Store at http://assetstore.unity3d.com.

Unity Plus and Pro are available for a fee, and Unity Personal has no fee; it is available any use to individuals or companies with less than US $100,000 of annual gross revenue. For more information, visit the Unity store at https://store.unity.com/:

Figure 1.6 Unity3D Engine Interface