Unity 2022 Mobile Game Development - John P. Doran - E-Book

Unity 2022 Mobile Game Development E-Book

John P. Doran

0,0
29,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Unity is a well-established player in the mobile game development sphere, and its new release, Unity 2022, is packed with new, exciting features. In Unity 2022 Mobile Game Development, Third Edition, you'll get to grips with the Unity game engine by building a mobile game and publishing it on the most popular mobile app stores as well as exploring the all-new features.
This book provides a comprehensive and practical approach to mobile game development, helping you build an endless runner game. Starting with setting up a simple Unity project for mobile development, you’ll delve into various essential aspects needed to successfully create and publish your game. You’ll acquire a range of skills, such as incorporating touch gestures, monetizing your game with Unity Ads and in-app purchases, designing an intuitive UI, and seamlessly integrating social media functionalities. Additionally, you’ll gain valuable insights into player preferences and behavior using Unity's analytics tools. You’ll also explore features of augmented reality in Unity 2022, enhancing your game's appeal.
By the end of this book, you’ll be well-equipped to reap the power of Unity 2022 to build, optimize, and publish robust cross-platform mobile games with C#, as well as widening your skill set and enhancing your credentials as a game developer.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 397

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Unity 2022 Mobile Game Development

Third Edition

Build and publish engaging games for Android and iOS

John P. Doran

BIRMINGHAM—MUMBAI

Unity 2022 Mobile Game Development

Copyright © 2023 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Rohit Rajkumar

Publishing Product Manager: Nitin Nainani

Senior Editor: Mark D’Souza

Senior Content Development Editor: Feza Shaikh

Technical Editor: Simran Ali

Copy Editor: Safis Editing

Project Coordinator: Sonam Pandey

Proofreader: Safis Editing

Indexer: Manju Arasan

Production Designer: Vijay Kamble

Marketing Coordinator: Anamika Singh, Namita Velgekar, and Nivedita Pandey

First published: November 2017

Second edition: August 2020

Third edition: July 2023

Production reference:160623

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80461-372-6

www.packtpub.com

To my wife, Hien, who, has always believed in me and has supported me every step of the way as we’ve traveled all around the world. And to my precious daughter, Johanna, who’s inspired me with her boundless imagination and sense of wonder. This book is dedicated to you both with all my love and gratitude.

– John P. Doran

Contributors

About the author

John P. Doran is a passionate and seasoned technical game designer, software engineer, and author who is based in Songdo, South Korea. His passion for game development began at an early age. He later graduated from DigiPen Institute of Technology with a bachelor of science in game design and a master of science in computer science from Bradley University.

For over a decade, John has gained extensive hands-on expertise in game development, working in various roles ranging from game designer to lead user interface (UI) programmer, working in teams consisting of just himself to over 70 people in student, mod, and professional game projects, including working at LucasArts on Star Wars: 1313. Additionally, John has worked in game development education, teaching in Singapore, South Korea, and the US. To date, he has authored 17 books pertaining to game development and is a 2023 Unity Education Ambassador.

John is currently an instructor at George Mason University Korea. Prior to his present ventures, he was an award-winning videographer.

Learn more about John at http://johnpdoran.com.

I extend my deepest gratitude to the Packt Publishing team, including Mark D’Souza, Feza Shaikh, Sonam Pandey, and Nitin Nainani, for their invaluable support, expertise, and guidance in bringing this new edition of the book to life.

About the reviewers

Shubham Thakur is a full stack developer at Ceryx Digital in Pune. Proficient in JavaScript, PHP, and Flutter, he has worked on cutting-edge projects involving the Internet of Things (IoT), metaverse, augmented reality (AR), virtual reality (VR), and cloud computing using AWS. Shubham volunteers with Google Developer Groups Pune, has won various hackathons, and is learning Solidity for Web3. He’s a team player, collaborator, and effective communicator who is committed to delivering high-quality solutions on time and within budget.

I am deeply grateful to Priya for the unwavering support, boundless love, and endless inspiration she brings daily. Yash, thank you for always being there. Amit Jain, thank you for your exceptional mentorship. Thanks to Packt Publishing for the reviewer opportunity. Special thanks to Urvi Sambhav Shah for onboarding me and to Sonam Pandey for her invaluable assistance and guidance during the reviewing process.

David Cantón Nadales is a software engineer from Seville, Spain, with more than 20 years of experience. He is currently a technical leader at Grupo Viajes El Corte Inglés, a leading travel company in Europe. He has done a multitude of projects and games with Unity, VR with Oculus/Meta Quest 2, Hololens, HTC Vive, DayDream, and LeapMotion. He was an ambassador of the Samsung community “Samsung Dev Spain,” and organizer of “Google Developers Group Sevilla.” He has led more than 100 projects throughout his career. As a social entrepreneur he created the app “Grita”, a social network that emerged during the confinement of COVID-19 that allowed people to talk to other people and help each other psychologically. In 2022, he won the Top Developer Award organized by Samsung.

Table of Contents

Preface

Part 1: Gameplay/Development Setup

1

Building Your Game

Technical requirements

Setting up the project

Creating the player

Moving the player through a C# script

Improving our scripts with attributes and XML comments

Using attributes

XML comments

Update function versus FixedUpdate function

Putting it all together

Having the camera following our player

Creating a basic tile

Making it endless

Creating obstacles

Summary

2

Project Setup for Android and iOS Development

Technical requirements

Introducing the Build Settings menu

Building a project for a PC

Exporting a project for Android

Installing Android Build Support for Unity

Updating build and player settings for Android projects

Running the Android APK with an emulator

Putting the project on your Android device

Unity for iOS setup and Xcode installation

Building a project for iOS

Running the project via the iOS simulator

Summary

Part 2: Mobile-Specific Features

3

Mobile Input/Touch Controls

Technical requirements

Using mouse input

Screen space versus world space

Moving using touch controls

Using Unity Remote

Android setup For Unity Remote

Enabling developer mode and debugging

Unity Remote setup for iOS

Implementing a gesture

Scaling the player using pinches

Using the accelerometer

Detecting touch on game objects

Summary

4

Resolution-Independent UI

Technical requirements

Creating a title screen

The Rect Transform component

Adjusting and resizing the title text

Selecting different aspect ratios

Working with buttons

Adding a pause menu

Pausing the game

Summary

5

Advanced Mobile UI

Technical requirements

Adding a pause screen button

Implementing an on-screen joystick

Adapting GUIs for notch devices

Summary

6

Implementing In-App Purchases

Technical requirements

Setting up Unity IAP

Creating our first purchase

Adding a button to restore purchases

Configuring purchases for the stores of your choice

Summary

7

Advertising Using Unity Ads

Technical requirements

Setting up Unity Ads

Displaying a simple ad

Utilizing ad callback methods

Opt-in advertisements with rewards

Adding in a cooldown timer

Summary

8

Integrating Social Media into Our Project

Technical requirements

Adding a scoring system

Sharing high scores via Twitter

Downloading and installing Facebook’s SDK

Logging in to our game via Facebook

Displaying a Facebook name and profile picture

Summary

Part 3: Game Feel/Polish

9

Keeping Players Involved with Notifications

Technical requirements

Setting up notifications

Scheduling notifications ahead of time

Customizing notifications

Canceling notifications

Summary

10

Using Unity Analytics

Technical requirements

Setting up Analytics

Tracking custom events

Sending basic CustomEvents

Sending custom events with properties

Working with funnels

Summary

11

Remote Config

Technical requirements

Remote Config setup

Creating key-value pairs

Integrating Game Overrides into gameplay

Summary

12

Improving Game Feel

Technical requirements

Animation using LeanTween

LeanTween setup

Creating a simple tween

Adding tweens to the pause menu

Working with materials

Using postprocessing effects

Adding particle effects

Summary

13

Building a Release Copy of Our Game

Technical requirements

Generating release builds for app stores

Summary

14

Submitting Games to App Stores

Technical requirements

Putting your game on the Google Play Store

Setting up the Google Play Console

Publishing an app on Google Play

Putting your game on the Apple iOS App Store

Apple Developer setup and creating a provisioning profile

Adding an app to App Store Connect

Summary

15

Augmented Reality

Technical requirements

Setting up a project for AR

Basic setup

Interacting with the AR environment

Spawning objects in AR

Summary

Index

Other Books You May Enjoy

Part 1: Gameplay/Development Setup

In this part of the book, we will be exploring the foundational elements of Unity game development, specifically with a focus on preparation for creating mobile games. The chapters in this part will provide you with the necessary knowledge and skills to set up your development environment, as well as guide you through the process of building a game project and deploying it to a mobile device.

By the end of this part, you will have a solid foundation of knowledge about Unity game development and will be ready to move on to the more advanced topics covered in subsequent parts of the book.

This part has the following chapters:

Chapter 1, Building Your GameChapter 2, Project Setup for Android and iOS Development